Replicate Flux MCP is an advanced Model Context Protocol (MCP) server that empowers AI assistants to generate high-quality images and vector graphics. Leveraging Black Forest Labs' Flux Schnell model for raster images and Recraft's V3 SVG model for vector graphics via the Replicate API. - Getting Started & Integration - Setup Process - Cursor Integration - Claude Desktop Integration - Smithery Int
Add this skill
npx mdskills install awkoy/replicate-flux-mcpComprehensive MCP server enabling AI image generation with detailed tool descriptions and setup guidance
1[](https://mseep.ai/app/awkoy-replicate-flux-mcp)23# Replicate Flux MCP456789[](https://smithery.ai/server/@awkoy/replicate-flux-mcp)10111213<a href="https://glama.ai/mcp/servers/ss8n1knen8">14 <img width="380" height="200" src="https://glama.ai/mcp/servers/ss8n1knen8/badge" />15</a>1617**Replicate Flux MCP** is an advanced Model Context Protocol (MCP) server that empowers AI assistants to generate high-quality images and vector graphics. Leveraging [Black Forest Labs' Flux Schnell model](https://replicate.com/black-forest-labs/flux-schnell) for raster images and [Recraft's V3 SVG model](https://replicate.com/recraft-ai/recraft-v3-svg) for vector graphics via the Replicate API.1819## ๐ Table of Contents2021- [Getting Started & Integration](#-getting-started--integration)22 - [Setup Process](#setup-process)23 - [Cursor Integration](#cursor-integration)24 - [Claude Desktop Integration](#claude-desktop-integration)25 - [Smithery Integration](#smithery-integration)26 - [Glama.ai Integration](#glamaai-integration)27- [Features](#-features)28- [Documentation](#-documentation)29 - [Available Tools](#available-tools)30 - [Available Resources](#available-resources)31- [Development](#-development)32- [Technical Details](#-technical-details)33- [Troubleshooting](#-troubleshooting)34- [Contributing](#-contributing)35- [License](#-license)36- [Resources](#-resources)37- [Examples](#-examples)3839## ๐ Getting Started & Integration4041### Setup Process42431. **Obtain a Replicate API Token**44 - Sign up at [Replicate](https://replicate.com/)45 - Create an API token in your account settings46472. **Choose Your Integration Method**48 - Follow one of the integration options below based on your preferred MCP client49503. **Ask Your AI Assistant to Generate an Image**51 - Simply ask naturally: "Can you generate an image of a serene mountain landscape at sunset?"52 - Or be more specific: "Please create an image showing a peaceful mountain scene with a lake reflecting the sunset colors in the foreground"53544. **Explore Advanced Features**55 - Try different parameter settings for customized results56 - Experiment with SVG generation using `generate_svg`57 - Use batch image generation or variant generation features5859### Cursor Integration6061#### Method 1: Using mcp.json62631. Create or edit the `.cursor/mcp.json` file in your project directory:6465```json66{67 "mcpServers": {68 "replicate-flux-mcp": {69 "command": "env REPLICATE_API_TOKEN=YOUR_TOKEN npx",70 "args": ["-y", "replicate-flux-mcp"]71 }72 }73}74```75762. Replace `YOUR_TOKEN` with your actual Replicate API token773. Restart Cursor to apply the changes7879#### Method 2: Manual Mode80811. Open Cursor and go to Settings822. Navigate to the "MCP" or "Model Context Protocol" section833. Click "Add Server" or equivalent844. Enter the following command in the appropriate field:8586```87env REPLICATE_API_TOKEN=YOUR_TOKEN npx -y replicate-flux-mcp88```89905. Replace `YOUR_TOKEN` with your actual Replicate API token916. Save the settings and restart Cursor if necessary9293### Claude Desktop Integration94951. Create or edit the `mcp.json` file in your configuration directory:9697```json98{99 "mcpServers": {100 "replicate-flux-mcp": {101 "command": "npx",102 "args": ["-y", "replicate-flux-mcp"],103 "env": {104 "REPLICATE_API_TOKEN": "YOUR TOKEN"105 }106 }107 }108}109```1101112. Replace `YOUR_TOKEN` with your actual Replicate API token1123. Restart Claude Desktop to apply the changes113114### Smithery Integration115116This MCP server is available as a hosted service on Smithery, allowing you to use it without setting up your own server.1171181. Visit [Smithery](https://smithery.ai/) and create an account if you don't have one1192. Navigate to the [Replicate Flux MCP server page](https://smithery.ai/server/@awkoy/replicate-flux-mcp)1203. Click "Add to Workspace" to add the server to your Smithery workspace1214. Configure your MCP client (Cursor, Claude Desktop, etc.) to use your Smithery workspace URL122123For more information on using Smithery with your MCP clients, visit the [Smithery documentation](https://smithery.ai/docs).124125### Glama.ai Integration126127This MCP server is also available as a hosted service on Glama.ai, providing another option to use it without local setup.1281291. Visit [Glama.ai](https://glama.ai/) and create an account if you don't have one1302. Go to the [Replicate Flux MCP server page](https://glama.ai/mcp/servers/ss8n1knen8)1313. Click "Install Server" to add the server to your workspace1324. Configure your MCP client to use your Glama.ai workspace133134For more information, visit the [Glama.ai MCP servers documentation](https://glama.ai/mcp/servers).135136## ๐ Features137138- **๐ผ๏ธ High-Quality Image Generation** - Create stunning images using Flux Schnell, a state-of-the-art AI model139- **๐จ Vector Graphics Support** - Generate professional SVG vector graphics with Recraft V3 SVG model140- **๐ค AI Assistant Integration** - Seamlessly enable AI assistants like Claude to generate visual content141- **๐๏ธ Advanced Customization** - Fine-tune generation with controls for aspect ratio, quality, resolution, and more142- **๐ Universal MCP Compatibility** - Works with all MCP clients including Cursor, Claude Desktop, Cline, and Zed143- **๐ Secure Local Processing** - All requests are processed locally for enhanced privacy and security144- **๐ Comprehensive History Management** - Track, view, and retrieve your complete generation history145- **๐ Batch Processing** - Generate multiple images from different prompts in a single request146- **๐ Variant Exploration** - Create and compare multiple interpretations of the same concept147- **โ๏ธ Prompt Engineering** - Fine-tune image variations with specialized prompt modifications148149## ๐ Documentation150151### Available Tools152153#### `generate_image`154155Generates an image based on a text prompt using the Flux Schnell model.156157```typescript158{159 prompt: string; // Required: Text description of the image to generate160 seed?: number; // Optional: Random seed for reproducible generation161 go_fast?: boolean; // Optional: Run faster predictions with optimized model (default: true)162 megapixels?: "1" | "0.25"; // Optional: Image resolution (default: "1")163 num_outputs?: number; // Optional: Number of images to generate (1-4) (default: 1)164 aspect_ratio?: string; // Optional: Aspect ratio (e.g., "16:9", "4:3") (default: "1:1")165 output_format?: string; // Optional: Output format ("webp", "jpg", "png") (default: "webp")166 output_quality?: number; // Optional: Image quality (0-100) (default: 80)167 num_inference_steps?: number; // Optional: Number of denoising steps (1-4) (default: 4)168 disable_safety_checker?: boolean; // Optional: Disable safety filter (default: false)169}170```171172#### `generate_multiple_images`173174Generates multiple images based on an array of prompts using the Flux Schnell model.175176```typescript177{178 prompts: string[]; // Required: Array of text descriptions for images to generate (1-10 prompts)179 seed?: number; // Optional: Random seed for reproducible generation180 go_fast?: boolean; // Optional: Run faster predictions with optimized model (default: true)181 megapixels?: "1" | "0.25"; // Optional: Image resolution (default: "1")182 aspect_ratio?: string; // Optional: Aspect ratio (e.g., "16:9", "4:3") (default: "1:1")183 output_format?: string; // Optional: Output format ("webp", "jpg", "png") (default: "webp")184 output_quality?: number; // Optional: Image quality (0-100) (default: 80)185 num_inference_steps?: number; // Optional: Number of denoising steps (1-4) (default: 4)186 disable_safety_checker?: boolean; // Optional: Disable safety filter (default: false)187}188```189190#### `generate_image_variants`191192Generates multiple variants of the same image from a single prompt.193194```typescript195{196 prompt: string; // Required: Text description for the image to generate variants of197 num_variants: number; // Required: Number of image variants to generate (2-10, default: 4)198 prompt_variations?: string[]; // Optional: List of prompt modifiers to apply to variants (e.g., ["in watercolor style", "in oil painting style"])199 variation_mode?: "append" | "replace"; // Optional: How to apply variations - 'append' adds to base prompt, 'replace' uses variations directly (default: "append")200 seed?: number; // Optional: Base random seed. Each variant will use seed+variant_index201 go_fast?: boolean; // Optional: Run faster predictions with optimized model (default: true)202 megapixels?: "1" | "0.25"; // Optional: Image resolution (default: "1")203 aspect_ratio?: string; // Optional: Aspect ratio (e.g., "16:9", "4:3") (default: "1:1")204 output_format?: string; // Optional: Output format ("webp", "jpg", "png") (default: "webp")205 output_quality?: number; // Optional: Image quality (0-100) (default: 80)206 num_inference_steps?: number; // Optional: Number of denoising steps (1-4) (default: 4)207 disable_safety_checker?: boolean; // Optional: Disable safety filter (default: false)208}209```210211#### `generate_svg`212213Generates an SVG vector image based on a text prompt using the Recraft V3 SVG model.214215```typescript216{217 prompt: string; // Required: Text description of the SVG to generate218 size?: string; // Optional: Size of the generated SVG (default: "1024x1024")219 style?: string; // Optional: Style of the generated image (default: "any")220 // Options: "any", "engraving", "line_art", "line_circuit", "linocut"221}222```223224#### `prediction_list`225226Retrieves a list of your recent predictions from Replicate.227228```typescript229{230 limit?: number; // Optional: Maximum number of predictions to return (1-100) (default: 50)231}232```233234#### `get_prediction`235236Gets detailed information about a specific prediction.237238```typescript239{240 predictionId: string; // Required: ID of the prediction to retrieve241}242```243244### Available Resources245246#### `imagelist`247248Browse your history of generated images created with the Flux Schnell model.249250#### `svglist`251252Browse your history of generated SVG images created with the Recraft V3 SVG model.253254#### `predictionlist`255256Browse all your Replicate predictions history.257258## ๐ป Development2592601. Clone the repository:261262```bash263git clone https://github.com/awkoy/replicate-flux-mcp.git264cd replicate-flux-mcp265```2662672. Install dependencies:268269```bash270npm install271```2722733. Start development mode:274275```bash276npm run dev277```2782794. Build the project:280281```bash282npm run build283```2842855. Connect to Client:286287```json288{289 "mcpServers": {290 "image-generation-mcp": {291 "command": "npx",292 "args": [293 "/Users/{USERNAME}/{PATH_TO}/replicate-flux-mcp/build/index.js"294 ],295 "env": {296 "REPLICATE_API_TOKEN": "YOUR REPLICATE API TOKEN"297 }298 }299 }300}301```302303## โ๏ธ Technical Details304305### Stack306307- **Model Context Protocol SDK** - Core MCP functionality for tool and resource management308- **Replicate API** - Provides access to state-of-the-art AI image generation models309- **TypeScript** - Ensures type safety and leverages modern JavaScript features310- **Zod** - Implements runtime type validation for robust API interactions311312### Configuration313314The server can be configured by modifying the `CONFIG` object in `src/config/index.ts`:315316```javascript317const CONFIG = {318 serverName: "replicate-flux-mcp",319 serverVersion: "0.1.2",320 imageModelId: "black-forest-labs/flux-schnell",321 svgModelId: "recraft-ai/recraft-v3-svg",322 pollingAttempts: 25,323 pollingInterval: 2000, // ms324};325```326327## ๐ Troubleshooting328329### Common Issues330331#### Authentication Error332- Ensure your `REPLICATE_API_TOKEN` is correctly set in the environment333- Verify your token is valid by testing it with the Replicate API directly334335#### Safety Filter Triggered336- The model has a built-in safety filter that may block certain prompts337- Try modifying your prompt to avoid potentially problematic content338339#### Timeout Error340- For larger images or busy servers, you might need to increase `pollingAttempts` or `pollingInterval` in the configuration341- Default settings should work for most use cases342343## ๐ค Contributing344345Contributions are welcome! Please follow these steps to contribute:3463471. Fork the repository3482. Create your feature branch (`git checkout -b feature/amazing-feature`)3493. Commit your changes (`git commit -m 'Add some amazing feature'`)3504. Push to the branch (`git push origin feature/amazing-feature`)3515. Open a Pull Request352353For feature requests or bug reports, please create a GitHub issue. If you like this project, consider starring the repository!354355## ๐ License356357This project is licensed under the MIT License - see the LICENSE file for details.358359## ๐ Resources360361- [Model Context Protocol Documentation](https://modelcontextprotocol.io)362- [Replicate API Documentation](https://replicate.com/docs)363- [Flux Schnell Model](https://replicate.com/black-forest-labs/flux-schnell)364- [Recraft V3 SVG Model](https://replicate.com/recraft-ai/recraft-v3-svg)365- [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)366- [Smithery Documentation](https://smithery.ai/docs)367- [Glama.ai MCP Servers](https://glama.ai/mcp/servers)368369## ๐จ Examples370371372373| Multiple Prompts | Prompt Variants |374|-----------------|-----------------|375|  |  |376377Here are some examples of how to use the tools:378379### Batch Image Generation with `generate_multiple_images`380381Create multiple distinct images at once with different prompts:382383```json384{385 "prompts": [386 "A red sports car on a mountain road",387 "A blue sports car on a beach",388 "A vintage sports car in a city street"389 ]390}391```392393### Image Variants with `generate_image_variants`394395Create different interpretations of the same concept using seeds:396397```json398{399 "prompt": "A futuristic city skyline at night",400 "num_variants": 4,401 "seed": 42402}403```404405Or explore style variations with prompt modifiers:406407```json408{409 "prompt": "A character portrait",410 "prompt_variations": [411 "in anime style",412 "in watercolor style",413 "in oil painting style",414 "as a 3D render"415 ]416}417```418419---420421Made with โค๏ธ by Yaroslav Boiko422423
Full transparency โ inspect the skill content before installing.