create_prediction
Create a prediction on Replicate and poll for its completion
Generate an image from a prompt — one, a batch, or variants of the same idea — and reach any other Replicate model through the same token.
LABSCO SUMMARY
The Flux tools expose the parameters that make an image reproducible — seed, inference steps, megapixels — so a result you liked can be regenerated rather than re-rolled. When the model you need is not Flux, get_model_schema hands you its input shape and run_replicate_model runs it, which keeps one integration where there would have been two.
A Replicate client built around Flux Schnell image generation, with SVG generation on Recraft and a general path that runs any model hosted on Replicate by reference.
A Replicate account and an API token in REPLICATE_API_TOKEN, plus npx on your PATH.
One command plus a key — REPLICATE_API_TOKEN=<YOUR_REPLICATE_API_TOKEN> npx -y replicate-flux-mcp
USE CASES
One prompt, with aspect ratio and output format set for where the image is going, and a seed recorded so the same image can be produced again rather than approximated.
Variants keep the prompt and vary it under a mode you pick; the multi-prompt call takes an array and returns one image each. Both save you re-prompting one image at a time.
SVG generation goes to the Recraft model with a size and style, so what comes back is vector output rather than a raster you would have to trace.
Fetch the model's input schema first so you know the shape it expects, then run it by its owner/name reference — video, audio, upscaling, anything hosted there — through the same token.
Predictions are addressable after the fact: list the recent ones or fetch a specific ID, which is how you recover an output when the original call has scrolled away.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
create_predictionCreate a prediction on Replicate and poll for its completion
generate_imageGenerate an image from a text prompt using Flux Schnell model
generate_image_variantsGenerate multiple variants of the same image from a single prompt
generate_multiple_imagesGenerate multiple images from an array of prompts using Flux Schnell model
generate_svgGenerate an SVG from a text prompt using Recraft model
get_model_schemaFetch the OpenAPI input schema and description for a Replicate model so you know what parameters to pass to run_replicate_model.
get_predictionGet details of a specific prediction by ID
prediction_listGet a list of recent predictions from Replicate
run_replicate_modelRun any model hosted on Replicate by its 'owner/name[:version]' reference. Call get_model_schema first if you don't know the input shape.
BEFORE YOU INSTALL
9 tools when we connected. The documented run_model is not available; create_prediction is available but undocumented. Only run_replicate_model accepts any Replicate model, since the curated image and SVG tools reject a model_id outside a built-in allowlist.
All 3 documented clients run the server on your machine.
CONTEXT COST
Rated by the size of the 9 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
REPLICATE_API_TOKEN=<YOUR_REPLICATE_API_TOKEN> npx -y replicate-flux-mcp{
"mcpServers": {
"replicate-flux-mcp": {
"command": "npx",
"args": [
"-y",
"replicate-flux-mcp"
],
"env": {
"REPLICATE_API_TOKEN": "<YOUR_REPLICATE_API_TOKEN>"
}
}
}
}Only REPLICATE_API_TOKEN is needed. To change the default models, add REPLICATE_IMAGE_MODEL_ID (one of black-forest-labs/flux-schnell, google/imagen-4, black-forest-labs/flux-kontext-pro, ideogram-ai/ideogram-v3-turbo, black-forest-labs/flux-1.1-pro, black-forest-labs/flux-dev) or REPLICATE_SVG_MODEL_ID (recraft-ai/recraft-v3-svg) to the env table — any other value is rejected. Left out, images use flux-schnell and SVGs use recraft-v3-svg.
[mcp_servers.replicate]
command = "npx"
args = ["-y", "replicate-flux-mcp"]
startup_timeout_sec = 30000
[mcp_servers.replicate.env]
REPLICATE_API_TOKEN = "<YOUR_REPLICATE_API_TOKEN>"