Replicate Flux MCP is an advanced Model Context Protocol (MCP) server designed to empower AI assistants to generate high-quality images and vector graphics. Its target users are developers, who use it to integrate AI-driven design generation into their workflows and quickly create visual assets.
Key Capabilities
- High-quality image generation: By default, it uses black-forest-labs/flux-schnell to generate raster images, and supports overriding the model via environment variables or during tool calls.
- Vector graphics generation: Uses recraft-ai/recraft-v3-svg to generate SVG, suitable for logos, icons, diagrams, and more.
- Batch and variant generation: Supports generating multiple images from multiple prompts, or generating multiple variants from a single prompt (based on seeds or prompt modifiers).
- Any Replicate model: Through run_replicate_model, any Replicate model in the form owner/name[:version] can be run, and get_model_schema can be used to obtain the OpenAPI input schema. An allowlist can optionally be set via REPLICATE_MODEL_ALLOWLIST.
- Structured output: Each generate_* tool returns human-readable content as well as machine-readable structuredContent, matching each tool's output schema (URL, prompt, format, aspect ratio, seed for each variant, etc.).
- Progress notifications: Batch and variant generation send progress notifications via notifications/progress, and clients that support progressToken can subscribe to them.
- Curated prompts: Provides 5 ready-to-use prompt templates (logo, portrait, svg-icon, product-shot, isometric-diagram), displayed in Claude Desktop's slash menu and Cursor's @-menu.
- Tool annotations: readOnlyHint / destructiveHint / openWorldHint / idempotentHint are correctly set to help clients assess safety and cost.
- Structured logging: Server-side errors are delivered through notifications/message rather than stderr.
- Generation history: Browse past run records through the imagelist, svglist, and predictionlist resources.
- General MCP compatibility: Follows MCP protocol 2025-11-25 and is compatible with Claude Desktop, Cursor, Cline, Zed, and any spec-compliant client.
Usage
Quick Start
- Register with Replicate and obtain an API Token.
- Choose an integration method: Cursor, Claude Desktop, Smithery, Glama.ai, or Codex.
- Make a natural language request to the AI assistant, for example: "Can you generate an image of a serene mountain landscape at sunset?"
- Explore advanced features: adjust parameters, use generate_svg to generate SVG, and try batch generation or variant generation.
Integration Configuration
- Cursor: Create or edit .cursor/mcp.json in the project directory, enter the Replicate API Token, and restart Cursor.
- Claude Desktop: Create or edit mcp.json in the configuration directory, and restart Claude Desktop.
- Smithery: As a hosted service, after registering, add the server to the workspace, and configure the MCP client to use the Smithery workspace URL.
- Glama.ai: As a hosted service, after registering, install the server to the workspace.
- Codex: Add the server to ~/.codex/config.toml, replacing environment variables as needed.
Available Tools
- generate_image: Generate an image from a text prompt (allowlist models only).
- generate_multiple_images: Generate multiple images from an array of prompts (allowlist models only).
- generate_image_variants: Generate multiple variants from a single prompt (allowlist models only).
- generate_svg: Generate SVG/vector output from text prompts (list-only models allowed).
- predictionlist: Get a list of recent predictions.
- predictioninfo: Get detailed information about a specific prediction.
- run_whitelisted_model: Run a whitelisted model and pass in the raw input payload (suitable for video or restoration models).
- run_replicate_model: Run any Replicate model; you must provide an owner/name[:version] reference; you can first use get_model_schema to understand the input structure.
- get_model_schema: Get the OpenAPI input schema and description of a Replicate model.
- imagelist: Browse the history of generated images.
- svglist: Browse the history of generated SVGs.
Available resources
- Image generation history (imagelist)
- SVG generation history (svglist)
- All Replicate prediction history (predictionlist)
Available prompts
- Five templates: logo, portrait, svg-icon, product-shot, isometric-diagram.
Environment variables
- REPLICATE_API_TOKEN: Required, Replicate API token.
- REPLICATE_IMAGE_MODEL_ID: Override the default image model (default black-forest-labs/flux-schnell).
- REPLICATE_SVG_MODEL_ID: Override the default SVG model (default recraft-ai/recraft-v3-svg).
- REPLICATE_MODEL_ALLOWLIST: Comma-separated owner/name entries that restrict which models can be called; if not set, any model is allowed; if set but empty, all are denied.
Model allowlist
Image generation allowlist: 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. SVG generation allowlist: recraft-ai/recraft-v3-svg. Additional models for legacy run_model: minimax/video-01, luma/reframe-video, topazlabs/video-upscale, topazlabs/image-upscale, szcho/codeformer, tencentarc/gfpgan.
Use cases
Suitable for developers to quickly generate visual assets that match their code style during coding, such as app icons, logos, diagrams, product showcase images, etc. It can also be used for scenarios that require batch generation of images or variants, as well as scenarios for running specific Replicate models (such as video, image restoration).
Limitations
- A Replicate API Token is required to use it.
- Models have built-in safety filters that may block certain prompts.
- For larger images or busy servers, you may need to adjust pollingAttempts or pollingInterval in the configuration.
- There is currently no automated test suite; verification is done through builds and MCP Inspector.
- The project is under the MIT license.
Development and testing
- Clone the repository and install dependencies.
- Start the TypeScript watcher.
- Build the project.
- Use MCP Inspector for smoke testing.
- Use npm run build for type checking and npm run inspector for end-to-end testing.
Technical details
- Uses the Model Context Protocol SDK to implement core MCP functionality.
- Accesses advanced AI image generation models through the Replicate API.
- Uses TypeScript to ensure type safety.
- Uses Zod for runtime type validation.
For more information, please refer to the official documentation and the Replicate API documentation.