generate_imageLABSCO SUMMARY
One call shape, two billing relationships.
Being able to move between Replicate and Together without changing how the assistant calls it is the practical benefit — provider pricing and model availability shift, and here that is a variable rather than a rewrite. The default model is a fast one, so raise MODEL_NAME if you want quality over latency.
What it is
A small image generator that sits in front of two providers. You pick one at start-up; the tool call stays the same either way.
What you get
generate_imagetakes apromptand returns the generated image- Optional
widthandheight, both defaulting to 512, andnumberOfImagesdefaulting to 1 - Provider choice between Replicate and Together, switched by an environment variable rather than a different tool
Requirements
A clone of the repository, run locally over stdio through pnpx and tsx, or built into the repository's Docker image serving SSE on port 3000 — nothing is published to npm. PROVIDER must be set to replicate or together, with the matching credential in REPLICATE_API_TOKEN or TOGETHER_API_KEY. MODEL_NAME defaults to black-forest-labs/flux-schnell.
Setup effort
Build from source — git clone https://github.com/gmkr/mcp-imagegen.git
USE CASES
Getting an illustration into a draft
Describe the image in the conversation and get it generated without opening a separate tool.
Trying several variations at once
Ask for multiple images from one prompt and compare them side by side.
Serving image generation to a team
Run the container and point clients at the SSE endpoint instead of every person holding a key.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation.
Requires
- Node.js
- pnpm
- PROVIDER set to replicate or together, with that provider's key in REPLICATE_API_TOKEN or TOGETHER_API_KEY
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/gmkr/mcp-imagegen.git
cd mcp-imagegen
pnpm installMCP Clients
Any MCP client
{
"mcpServers": {
"imagegenerator": {
"command": "pnpx",
"args": [
"-y",
"tsx",
"<YOUR_PATH_TO_MCP_IMAGEGEN>/src/index.ts"
],
"env": {
"PROVIDER": "replicate",
"REPLICATE_API_TOKEN": "<YOUR_REPLICATE_API_TOKEN>"
}
}
}
}To use Together AI instead of Replicate, set PROVIDER to together and use TOGETHER_API_KEY, holding your Together key, instead of REPLICATE_API_TOKEN.