replicate flux.com
replicate flux.com logo

Replicate Flux

Integrates with Replicate's Flux image generation model, enabling image creation capabilities within conversation interf...

Created byApr 22, 2025

Replicate Flux MCP

MCP Compatible License TypeScript Model Context Protocol ![smithery badge](https://smithery.ai/badge/@awkoy/replicate-flux-mcp) NPM Downloads Stars
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.

Table of Contents

  • Getting Started & Integration
  • Features
  • Documentation
  • Development
  • Technical Details
  • Troubleshooting
  • Contributing
  • License
  • Resources
  • Examples

Getting Started & Integration

Setup Process

  1. Obtain a Replicate API Token
  1. Choose Your Integration Method
  1. Ask Your AI Assistant to Generate an Image
  1. Explore Advanced Features

Cursor Integration

Method 1: Using mcp.json

  1. Create or edit the .cursor/mcp.json file in your project directory:
  1. Replace YOUR_TOKEN with your actual Replicate API token
  1. Restart Cursor to apply the changes

Method 2: Manual Mode

  1. Open Cursor and go to Settings
  1. Navigate to the "MCP" or "Model Context Protocol" section
  1. Click "Add Server" or equivalent
  1. Enter the following command in the appropriate field:
  1. Replace YOUR_TOKEN with your actual Replicate API token
  1. Save the settings and restart Cursor if necessary

Claude Desktop Integration

  1. Create or edit the mcp.json file in your configuration directory:
  1. Replace YOUR_TOKEN with your actual Replicate API token
  1. Restart Claude Desktop to apply the changes

Smithery Integration

This MCP server is available as a hosted service on Smithery, allowing you to use it without setting up your own server.
  1. Visit Smithery and create an account if you don't have one
  1. Navigate to the Replicate Flux MCP server page
  1. Click "Add to Workspace" to add the server to your Smithery workspace
  1. Configure your MCP client (Cursor, Claude Desktop, etc.) to use your Smithery workspace URL
For more information on using Smithery with your MCP clients, visit the Smithery documentation.

Glama.ai Integration

This MCP server is also available as a hosted service on Glama.ai, providing another option to use it without local setup.
  1. Visit Glama.ai and create an account if you don't have one
  1. Go to the Replicate Flux MCP server page
  1. Click "Install Server" to add the server to your workspace
  1. Configure your MCP client to use your Glama.ai workspace
For more information, visit the Glama.ai MCP servers documentation.

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`

Generates an image based on a text prompt using the Flux Schnell model.

`generate_multiple_images`

Generates multiple images based on an array of prompts using the Flux Schnell model.

`generate_image_variants`

Generates multiple variants of the same image from a single prompt.

`generate_svg`

Generates an SVG vector image based on a text prompt using the Recraft V3 SVG model.

`prediction_list`

Retrieves a list of your recent predictions from Replicate.

`get_prediction`

Gets detailed information about a specific prediction.

Available Resources

`imagelist`

Browse your history of generated images created with the Flux Schnell model.

`svglist`

Browse your history of generated SVG images created with the Recraft V3 SVG model.

`predictionlist`

Browse all your Replicate predictions history.

Development

  1. Clone the repository:
  1. Install dependencies:
  1. Start development mode:
  1. Build the project:
  1. 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

The server can be configured by modifying the CONFIG object in src/config/index.ts:

Troubleshooting

Common Issues

Authentication Error

  • Ensure your REPLICATE_API_TOKEN is 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 pollingAttempts or pollingInterval in the configuration
  • Default settings should work for most use cases

Contributing

Contributions are welcome! Please follow these steps to contribute:
  1. Fork the repository
  1. Create your feature branch (git checkout -b feature/amazing-feature)
  1. Commit your changes (git commit -m 'Add some amazing feature')
  1. Push to the branch (git push origin feature/amazing-feature)
  1. Open a Pull Request
For feature requests or bug reports, please create a GitHub issue. If you like this project, consider starring the repository!

License

This project is licensed under the MIT License - see the LICENSE file for details.

Resources

Examples

Demo
[object Object]
[object Object]
[object Object]
[object Object]
Here are some examples of how to use the tools:

Batch Image Generation with `generate_multiple_images`

Create multiple distinct images at once with different prompts:

Image Variants with `generate_image_variants`

Create different interpretations of the same concept using seeds:
Or explore style variations with prompt modifiers:

Made with by Yaroslav Boiko

Replicate Flux MCP

MCP Compatible License TypeScript Model Context Protocol ![smithery badge](https://smithery.ai/badge/@awkoy/replicate-flux-mcp) NPM Downloads Stars
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.

Table of Contents

  • Getting Started & Integration
  • Features
  • Documentation
  • Development
  • Technical Details
  • Troubleshooting
  • Contributing
  • License
  • Resources
  • Examples

Getting Started & Integration

Setup Process

  1. Obtain a Replicate API Token
  1. Choose Your Integration Method
  1. Ask Your AI Assistant to Generate an Image
  1. Explore Advanced Features

Cursor Integration

Method 1: Using mcp.json

  1. Create or edit the .cursor/mcp.json file in your project directory:
  1. Replace YOUR_TOKEN with your actual Replicate API token
  1. Restart Cursor to apply the changes

Method 2: Manual Mode

  1. Open Cursor and go to Settings
  1. Navigate to the "MCP" or "Model Context Protocol" section
  1. Click "Add Server" or equivalent
  1. Enter the following command in the appropriate field:
  1. Replace YOUR_TOKEN with your actual Replicate API token
  1. Save the settings and restart Cursor if necessary

Claude Desktop Integration

  1. Create or edit the mcp.json file in your configuration directory:
  1. Replace YOUR_TOKEN with your actual Replicate API token
  1. Restart Claude Desktop to apply the changes

Smithery Integration

This MCP server is available as a hosted service on Smithery, allowing you to use it without setting up your own server.
  1. Visit Smithery and create an account if you don't have one
  1. Navigate to the Replicate Flux MCP server page
  1. Click "Add to Workspace" to add the server to your Smithery workspace
  1. Configure your MCP client (Cursor, Claude Desktop, etc.) to use your Smithery workspace URL
For more information on using Smithery with your MCP clients, visit the Smithery documentation.

Glama.ai Integration

This MCP server is also available as a hosted service on Glama.ai, providing another option to use it without local setup.
  1. Visit Glama.ai and create an account if you don't have one
  1. Go to the Replicate Flux MCP server page
  1. Click "Install Server" to add the server to your workspace
  1. Configure your MCP client to use your Glama.ai workspace
For more information, visit the Glama.ai MCP servers documentation.

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`

Generates an image based on a text prompt using the Flux Schnell model.

`generate_multiple_images`

Generates multiple images based on an array of prompts using the Flux Schnell model.

`generate_image_variants`

Generates multiple variants of the same image from a single prompt.

`generate_svg`

Generates an SVG vector image based on a text prompt using the Recraft V3 SVG model.

`prediction_list`

Retrieves a list of your recent predictions from Replicate.

`get_prediction`

Gets detailed information about a specific prediction.

Available Resources

`imagelist`

Browse your history of generated images created with the Flux Schnell model.

`svglist`

Browse your history of generated SVG images created with the Recraft V3 SVG model.

`predictionlist`

Browse all your Replicate predictions history.

Development

  1. Clone the repository:
  1. Install dependencies:
  1. Start development mode:
  1. Build the project:
  1. 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

The server can be configured by modifying the CONFIG object in src/config/index.ts:

Troubleshooting

Common Issues

Authentication Error

  • Ensure your REPLICATE_API_TOKEN is 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 pollingAttempts or pollingInterval in the configuration
  • Default settings should work for most use cases

Contributing

Contributions are welcome! Please follow these steps to contribute:
  1. Fork the repository
  1. Create your feature branch (git checkout -b feature/amazing-feature)
  1. Commit your changes (git commit -m 'Add some amazing feature')
  1. Push to the branch (git push origin feature/amazing-feature)
  1. Open a Pull Request
For feature requests or bug reports, please create a GitHub issue. If you like this project, consider starring the repository!

License

This project is licensed under the MIT License - see the LICENSE file for details.

Resources

Examples

Demo
[object Object]
[object Object]
[object Object]
[object Object]
Here are some examples of how to use the tools:

Batch Image Generation with `generate_multiple_images`

Create multiple distinct images at once with different prompts:

Image Variants with `generate_image_variants`

Create different interpretations of the same concept using seeds:
Or explore style variations with prompt modifiers:

Made with by Yaroslav Boiko