Replicate Flux MCP is an advanced server that enables AI assistants to generate high-quality images and vector graphics. It leverages Black Forest Labs' Flux Schnell model for raster images and Recraft's V3 SVG model for vector graphics, connecting to these services via the Replicate API.
Before using this MCP server, you'll need to:
Method 1: Using mcp.json
.cursor/mcp.json
file in your project directory:{
"mcpServers": {
"replicate-flux-mcp": {
"command": "env REPLICATE_API_TOKEN=YOUR_TOKEN npx",
"args": ["-y", "replicate-flux-mcp"]
}
}
}
YOUR_TOKEN
with your actual Replicate API tokenMethod 2: Manual Mode
env REPLICATE_API_TOKEN=YOUR_TOKEN npx -y replicate-flux-mcp
YOUR_TOKEN
with your actual Replicate API tokenmcp.json
file in your configuration directory:{
"mcpServers": {
"replicate-flux-mcp": {
"command": "npx",
"args": ["-y", "replicate-flux-mcp"],
"env": {
"REPLICATE_API_TOKEN": "YOUR TOKEN"
}
}
}
}
YOUR_TOKEN
with your actual Replicate API tokenThis MCP server is available as a hosted service on:
Simply ask your AI assistant to generate an image:
{
prompt: string; // Required: Text description of the image to generate
seed?: number; // Optional: Random seed for reproducible generation
go_fast?: boolean; // Optional: Run faster predictions with optimized model (default: true)
megapixels?: "1" | "0.25"; // Optional: Image resolution (default: "1")
num_outputs?: number; // Optional: Number of images to generate (1-4) (default: 1)
aspect_ratio?: string; // Optional: Aspect ratio (e.g., "16:9", "4:3") (default: "1:1")
output_format?: string; // Optional: Output format ("webp", "jpg", "png") (default: "webp")
output_quality?: number; // Optional: Image quality (0-100) (default: 80)
num_inference_steps?: number; // Optional: Number of denoising steps (1-4) (default: 4)
disable_safety_checker?: boolean; // Optional: Disable safety filter (default: false)
}
{
prompts: string[]; // Required: Array of text descriptions (1-10 prompts)
seed?: number; // Optional: Random seed for reproducible generation
go_fast?: boolean; // Optional: Run faster predictions (default: true)
megapixels?: "1" | "0.25"; // Optional: Image resolution (default: "1")
aspect_ratio?: string; // Optional: Aspect ratio (default: "1:1")
output_format?: string; // Optional: Output format (default: "webp")
output_quality?: number; // Optional: Image quality (default: 80)
num_inference_steps?: number; // Optional: Denoising steps (default: 4)
disable_safety_checker?: boolean; // Optional: Disable safety filter (default: false)
}
{
prompt: string; // Required: Text description for the image
num_variants: number; // Required: Number of variants (2-10, default: 4)
prompt_variations?: string[]; // Optional: Prompt modifiers to apply
variation_mode?: "append" | "replace"; // Optional: How to apply variations (default: "append")
seed?: number; // Optional: Base random seed
go_fast?: boolean; // Optional: Run faster predictions (default: true)
megapixels?: "1" | "0.25"; // Optional: Image resolution (default: "1")
aspect_ratio?: string; // Optional: Aspect ratio (default: "1:1")
output_format?: string; // Optional: Output format (default: "webp")
output_quality?: number; // Optional: Image quality (default: 80)
num_inference_steps?: number; // Optional: Denoising steps (default: 4)
disable_safety_checker?: boolean; // Optional: Disable safety filter (default: false)
}
{
prompt: string; // Required: Text description of the SVG to generate
size?: string; // Optional: Size of the SVG (default: "1024x1024")
style?: string; // Optional: Style of the image (default: "any")
// Options: "any", "engraving", "line_art", "line_circuit", "linocut"
}
{
"prompts": [
"A red sports car on a mountain road",
"A blue sports car on a beach",
"A vintage sports car in a city street"
]
}
{
"prompt": "A futuristic city skyline at night",
"num_variants": 4,
"seed": 42
}
{
"prompt": "A character portrait",
"prompt_variations": [
"in anime style",
"in watercolor style",
"in oil painting style",
"as a 3D render"
]
}
REPLICATE_API_TOKEN
is correctly set and validTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "replicate-flux-mcp" '{"command":"env REPLICATE_API_TOKEN=YOUR_TOKEN npx","args":["-y","replicate-flux-mcp"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"replicate-flux-mcp": {
"command": "env REPLICATE_API_TOKEN=YOUR_TOKEN npx",
"args": [
"-y",
"replicate-flux-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"replicate-flux-mcp": {
"command": "env REPLICATE_API_TOKEN=YOUR_TOKEN npx",
"args": [
"-y",
"replicate-flux-mcp"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect