Replicate Flux MCP
Table of Contents
- Getting Started & Integration
- Features
- Documentation
- Development
- Technical Details
- Troubleshooting
- Contributing
- License
- Resources
- Examples
Getting Started & Integration
Setup Process
- Obtain a Replicate API Token
- Choose Your Integration Method
- Ask Your AI Assistant to Generate an Image
- Explore Advanced Features
Cursor Integration
Method 1: Using mcp.json
- Create or edit the
.cursor/mcp.jsonfile in your project directory:
- Replace
YOUR_TOKENwith your actual Replicate API token
- Restart Cursor to apply the changes
Method 2: Manual Mode
- Open Cursor and go to Settings
- Navigate to the "MCP" or "Model Context Protocol" section
- Click "Add Server" or equivalent
- Enter the following command in the appropriate field:
- Replace
YOUR_TOKENwith your actual Replicate API token
- Save the settings and restart Cursor if necessary
Claude Desktop Integration
- Create or edit the
mcp.jsonfile in your configuration directory:
- Replace
YOUR_TOKENwith your actual Replicate API token
- Restart Claude Desktop to apply the changes
Smithery Integration
- Visit Smithery and create an account if you don't have one
- Navigate to the Replicate Flux MCP server page
- Click "Add to Workspace" to add the server to your Smithery workspace
- Configure your MCP client (Cursor, Claude Desktop, etc.) to use your Smithery workspace URL
Glama.ai Integration
- Visit Glama.ai and create an account if you don't have one
- Go to the Replicate Flux MCP server page
- Click "Install Server" to add the server to your workspace
- Configure your MCP client to use your Glama.ai workspace
Features
- ** High-Quality Image Generation** - Create stunning images using Flux Schnell, a state-of-the-art AI model
- ** Vector Graphics Support** - Generate professional SVG vector graphics with Recraft V3 SVG model
- ** AI Assistant Integration** - Seamlessly enable AI assistants like Claude to generate visual content
- ** Advanced Customization** - Fine-tune generation with controls for aspect ratio, quality, resolution, and more
- ** Universal MCP Compatibility** - Works with all MCP clients including Cursor, Claude Desktop, Cline, and Zed
- ** Secure Local Processing** - All requests are processed locally for enhanced privacy and security
- ** Comprehensive History Management** - Track, view, and retrieve your complete generation history
- ** Batch Processing** - Generate multiple images from different prompts in a single request
- ** Variant Exploration** - Create and compare multiple interpretations of the same concept
- ** Prompt Engineering** - Fine-tune image variations with specialized prompt modifications
Documentation
Available Tools
`generate_image`
`generate_multiple_images`
`generate_image_variants`
`generate_svg`
`prediction_list`
`get_prediction`
Available Resources
`imagelist`
`svglist`
`predictionlist`
Development
- Clone the repository:
- Install dependencies:
- Start development mode:
- Build the project:
- Connect to Client:
Technical Details
Stack
- Model Context Protocol SDK - Core MCP functionality for tool and resource management
- Replicate API - Provides access to state-of-the-art AI image generation models
- TypeScript - Ensures type safety and leverages modern JavaScript features
- Zod - Implements runtime type validation for robust API interactions
Configuration
CONFIG object in src/config/index.ts:Troubleshooting
Common Issues
Authentication Error
- Ensure your
REPLICATE_API_TOKENis correctly set in the environment
- Verify your token is valid by testing it with the Replicate API directly
Safety Filter Triggered
- The model has a built-in safety filter that may block certain prompts
- Try modifying your prompt to avoid potentially problematic content
Timeout Error
- For larger images or busy servers, you might need to increase
pollingAttemptsorpollingIntervalin the configuration
- Default settings should work for most use cases
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature)
- Commit your changes (
git commit -m 'Add some amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
License
Resources
Examples
[object Object] | [object Object] |
[object Object] | [object Object] |
Batch Image Generation with `generate_multiple_images`
Image Variants with `generate_image_variants`
Replicate Flux MCP
Table of Contents
- Getting Started & Integration
- Features
- Documentation
- Development
- Technical Details
- Troubleshooting
- Contributing
- License
- Resources
- Examples
Getting Started & Integration
Setup Process
- Obtain a Replicate API Token
- Choose Your Integration Method
- Ask Your AI Assistant to Generate an Image
- Explore Advanced Features
Cursor Integration
Method 1: Using mcp.json
- Create or edit the
.cursor/mcp.jsonfile in your project directory:
- Replace
YOUR_TOKENwith your actual Replicate API token
- Restart Cursor to apply the changes
Method 2: Manual Mode
- Open Cursor and go to Settings
- Navigate to the "MCP" or "Model Context Protocol" section
- Click "Add Server" or equivalent
- Enter the following command in the appropriate field:
- Replace
YOUR_TOKENwith your actual Replicate API token
- Save the settings and restart Cursor if necessary
Claude Desktop Integration
- Create or edit the
mcp.jsonfile in your configuration directory:
- Replace
YOUR_TOKENwith your actual Replicate API token
- Restart Claude Desktop to apply the changes
Smithery Integration
- Visit Smithery and create an account if you don't have one
- Navigate to the Replicate Flux MCP server page
- Click "Add to Workspace" to add the server to your Smithery workspace
- Configure your MCP client (Cursor, Claude Desktop, etc.) to use your Smithery workspace URL
Glama.ai Integration
- Visit Glama.ai and create an account if you don't have one
- Go to the Replicate Flux MCP server page
- Click "Install Server" to add the server to your workspace
- Configure your MCP client to use your Glama.ai workspace
Features
- ** High-Quality Image Generation** - Create stunning images using Flux Schnell, a state-of-the-art AI model
- ** Vector Graphics Support** - Generate professional SVG vector graphics with Recraft V3 SVG model
- ** AI Assistant Integration** - Seamlessly enable AI assistants like Claude to generate visual content
- ** Advanced Customization** - Fine-tune generation with controls for aspect ratio, quality, resolution, and more
- ** Universal MCP Compatibility** - Works with all MCP clients including Cursor, Claude Desktop, Cline, and Zed
- ** Secure Local Processing** - All requests are processed locally for enhanced privacy and security
- ** Comprehensive History Management** - Track, view, and retrieve your complete generation history
- ** Batch Processing** - Generate multiple images from different prompts in a single request
- ** Variant Exploration** - Create and compare multiple interpretations of the same concept
- ** Prompt Engineering** - Fine-tune image variations with specialized prompt modifications
Documentation
Available Tools
`generate_image`
`generate_multiple_images`
`generate_image_variants`
`generate_svg`
`prediction_list`
`get_prediction`
Available Resources
`imagelist`
`svglist`
`predictionlist`
Development
- Clone the repository:
- Install dependencies:
- Start development mode:
- Build the project:
- Connect to Client:
Technical Details
Stack
- Model Context Protocol SDK - Core MCP functionality for tool and resource management
- Replicate API - Provides access to state-of-the-art AI image generation models
- TypeScript - Ensures type safety and leverages modern JavaScript features
- Zod - Implements runtime type validation for robust API interactions
Configuration
CONFIG object in src/config/index.ts:Troubleshooting
Common Issues
Authentication Error
- Ensure your
REPLICATE_API_TOKENis correctly set in the environment
- Verify your token is valid by testing it with the Replicate API directly
Safety Filter Triggered
- The model has a built-in safety filter that may block certain prompts
- Try modifying your prompt to avoid potentially problematic content
Timeout Error
- For larger images or busy servers, you might need to increase
pollingAttemptsorpollingIntervalin the configuration
- Default settings should work for most use cases
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature)
- Commit your changes (
git commit -m 'Add some amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
License
Resources
Examples
[object Object] | [object Object] |
[object Object] | [object Object] |