gmkr_mcp_imagegen

gmkr_mcp_imagegen

by GMKR

Clone the repository

Skip to content

You signed in with another tab or window. Reload
to refresh your session. You signed out in another tab or window. Reload
to refresh your session. You switched accounts on another tab or window. Reload
to refresh your session. Dismiss alert

GMKR / mcp-imagegen Public

MCP Server for Generating images

3 stars
1 fork
Branches
Tags
Activity

Star

Notifications
You must be signed in to change notification settings

GMKR/mcp-imagegen

main

1 Branch
0 Tags


Go to file

Code

Folders and files

| Name | | Name | Last commit message | Last commit date |
| --- | --- | --- | --- |
| Latest commit
-------------

GMKR
GMKR

fix replicate error

Mar 16, 2025

9ecccce
 · Mar 16, 2025

History
-------

13 Commits

| | |
| src | | src | fix replicate error | Mar 16, 2025 |
| .dockerignore | | .dockerignore | Added sse | Mar 15, 2025 |
| .gitignore | | .gitignore | initial commit | Mar 15, 2025 |
| Dockerfile | | Dockerfile | added smithery | Mar 15, 2025 |
| Dockerfile.server | | Dockerfile.server | added smithery | Mar 15, 2025 |
| README.md | | README.md | Added replicate provider | Mar 16, 2025 |
| package.json | | package.json | Added replicate provider | Mar 16, 2025 |
| pnpm-lock.yaml | | pnpm-lock.yaml | Added replicate provider | Mar 16, 2025 |
| smithery.yaml | | smithery.yaml | Added replicate provider | Mar 16, 2025 |
| View all files | | |

Repository files navigation

MCP Image Generator

A Model Context Protocol (MCP) server for generating images using Together AI's image generation models. This MCP Server can be run locally or using an SSE endpoint. The MCP Image Generator required a provider, only "Replicate" and "Together" are supported currently. You need to set the TOGETHER_API_KEY or REPLICATE_API_TOKEN environment variables. and set the PROVIDER environment variable to "replicate" or "together"/

SSE Endpoint (Docker environment)

Clone the repository

git clone https://github.com/gmkr/mcp-imagegen.git
cd mcp-imagegen

Build and run Docker container

docker build -f Dockerfile.server -t mcp-imagegen .
docker run -p 3000:3000 mcp-imagegen

Configuring with MCP Client

{
  "mcpServers": {
    "imagegenerator": {
      "url": "http://localhost:3000/sse",
      "env": {
        "PROVIDER": "replicate",
        "REPLICATE_API_TOKEN": "your-replicate-api-token"
      }
    }
  }
}

Adjust the url to the endpoint of the MCP server you want to use. provider can be "replicate" or "together".

Running locally using stdio

Prerequisites

  • Node.js
  • Together AI API key or Replicate API token

Installation

  1. Clone the repository:

    shell git clone https://github.com/gmkr/mcp-imagegen.git cd mcp-imagegen

  2. Install dependencies:

    shell pnpm install

Configuration

Create a configuration file for your MCP client. Here's an example configuration:

{
  "mcpServers": {
    "imagegenerator": {
      "command": "pnpx",
      "args": [\
        "-y",\
        "tsx",\
        "/path/to/mcp-imagegen/src/index.ts"\
      ],
      "env": {
        "PROVIDER": "replicate",
        "REPLICATE_API_TOKEN": "your-replicate-api-token"
      }
    }
  }
}

Replace /path/to/mcp-imagegen with the absolute path to your cloned repository and your-replicate-api-token with your actual Replicate API token.

Usage

The MCP Image Generator provides a tool called generate_image that can be used to generate images based on text prompts.

Tool: generate_image

Generates an image based on the provided prompt.

Parameters:

  • prompt (string): The text prompt to generate an image for
  • width (number, optional): The width of the image to generate (default: 512)
  • height (number, optional): The height of the image to generate (default: 512)
  • numberOfImages (number, optional): The number of images to generate (default: 1)

Environment Variables

  • PROVIDER: The provider to use for image generation (default: "replicate")
  • REPLICATE_API_TOKEN: Your Replicate API token
  • TOGETHER_API_KEY: Your Together AI API key
  • MODEL_NAME: The model to use for image generation (default: "black-forest-labs/flux-schnell")

License

MIT

About

MCP Server for Generating images

Resources

Readme

Activity

Stars

3 stars

Watchers

1 watching

Forks

1 fork

Report repository

Releases


No releases published

Packages 0


No packages published

Languages

You can’t perform that action at this time.

Features & Capabilities

Categories
mcp_server model_context_protocol

Implementation Details

Stats

0 Views
3 GitHub Stars

Repository Info

GMKR Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300