Replicate Flux MCP

Generates raster images and SVGs through Replicate, with Flux Schnell as the image model

By Yaroslav Boiko (individual) TypeScript Local · stdio MediaAI and ML

52 popularity score ★ 106 ↓ 1.8k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs REPLICATE_API_TOKEN. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add replicate-flux -e REPLICATE_API_TOKEN=<REPLICATE_API_TOKEN> -- npx -y replicate-flux-mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "replicate-flux": {
      "command": "npx",
      "args": [
        "-y",
        "replicate-flux-mcp"
      ],
      "env": {
        "REPLICATE_API_TOKEN": "<REPLICATE_API_TOKEN>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "replicate-flux": {
      "command": "npx",
      "args": [
        "-y",
        "replicate-flux-mcp"
      ],
      "env": {
        "REPLICATE_API_TOKEN": "<REPLICATE_API_TOKEN>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "replicate-flux": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "replicate-flux-mcp"
      ],
      "env": {
        "REPLICATE_API_TOKEN": "<REPLICATE_API_TOKEN>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.replicate-flux]
command = "npx"
args = ["-y", "replicate-flux-mcp"]

[mcp_servers.replicate-flux.env]
REPLICATE_API_TOKEN = "<REPLICATE_API_TOKEN>"
Gemini CLITerminal
gemini mcp add --scope user -e REPLICATE_API_TOKEN=<REPLICATE_API_TOKEN> replicate-flux npx -- -y replicate-flux-mcp

Settings 2

REPLICATE_API_TOKEN Required: Replicate API token; the server exits at start without it.
REPLICATE_MODEL_ALLOWLIST Optional: Comma-separated owner/name list limiting run_replicate_model; unset allows any model, set but empty blocks all; read once at start.

What it does

Replicate Flux MCP is a local stdio server that sends image requests to Replicate's hosted models using your own API token. In the published 0.4.0 release, raster images come from black-forest-labs/flux-schnell and vector output from recraft-ai/recraft-v3-svg; both model ids are fixed in src/config/index.ts at that tag. It can make one image, a batch from up to 10 prompts, or 2 to 10 variants of one prompt (by seed or by prompt modifiers), and returns the image URLs together with structured metadata such as prompt, format and seed.

Beyond the curated tools, run_replicate_model runs any model on Replicate by owner/name[:version], and get_model_schema fetches that model's input schema first, so the server can reach video, upscaling or other models as well. It can also list and look up your past Replicate predictions, and exposes history resources (imagelist, svglist, predictionlist) and five prompt templates (logo, portrait, svg-icon, product-shot, isometric-diagram).

The 0.4.0 code registers nine tools, one more than the README documents: create_prediction starts a prediction on the Flux Schnell model with a raw input and waits for it. Calls that wait on Replicate poll 25 times at 2-second intervals (about 50 seconds) before reporting a timeout, per the config file.

What it needs

RuntimeNode.js

Node.js with npx. A Replicate account and API token in REPLICATE_API_TOKEN; the server exits at start without it. Replicate bills per prediction, so generating images costs money on your Replicate account beyond any free allowance.

Limits

The GitHub README describes unreleased 0.4.1 code: REPLICATE_IMAGE_MODEL_ID, REPLICATE_SVG_MODEL_ID, the per-call model_id override and the run_model tool are not in the 0.4.0 package on npm, where the curated tools always use Flux Schnell and Recraft V3 SVG (the README's Codex example sets those two variables, which 0.4.0 ignores). Waiting calls give up after about 50 seconds (25 polls, 2 s apart), a value set in code, not by a setting. generate_image makes 1 to 4 images per call; num_inference_steps is capped at 4. Replicate's safety filter may block prompts. The project has no automated tests, per its README.

Who it suits

Suits developers who already pay for Replicate and want quick Flux Schnell images, simple SVG icons, or one-off runs of other Replicate models from Claude Desktop, Cursor or Codex, with no GPU of their own. It is a community project, not Replicate's own. If you need to choose a different curated image model, wait for the 0.4.1 release or call it through run_replicate_model. If you want broad management of Replicate (models, deployments, trainings) rather than image generation, look at a general Replicate server instead.

Tools 9

generate_image
Makes 1-4 images from one prompt with Flux Schnell, with size, ratio, format and seed options
generate_multiple_images
Makes one image for each of up to 10 prompts in a single call
generate_image_variants
Makes 2-10 variants of one prompt, varying the seed or applying prompt modifiers
generate_svg
Makes a vector SVG from a prompt with Recraft V3 SVG, with size and style options
get_prediction
Returns the details of one Replicate prediction by its id
create_prediction
Starts a raw-input prediction on the image model and waits for the result (not in the README)
prediction_list
Lists your recent Replicate predictions, 50 by default, up to 100
run_replicate_model
Runs any Replicate model by owner/name[:version] with a free-form input, unless an allowlist blocks it
get_model_schema
Fetches a Replicate model's input schema and description before running it

Similar servers