Generates images using the Flux model based on text prompts
This MCP server provides seamless integration with Replicate's Flux image generation model, allowing you to create high-quality images directly from text prompts within your AI assistant. The server connects to Replicate's API and handles all the complexity of image generation requests and responses. With this tool, you can enhance your creative workflows by generating visual content on demand. Whether you need concept art, illustrations, or visual references, this MCP server delivers images based on your textual descriptions without requiring you to switch between different applications.
The Image Generation MCP Server allows you to generate images using Replicate's Flux model directly from your AI assistant. This server acts as a bridge between your assistant and Replicate's powerful image generation capabilities.
Before using this MCP server, you'll need:
The easiest way to install this MCP server is through Smithery:
npx -y @smithery/cli install @GongRzhe/Image-Generation-MCP-Server --client claude
You can run the server directly without installing it locally:
# Configure your client to use npx to run the server
# No local installation needed
If you prefer a local installation:
# Global installation
npm install -g @gongrzhe/image-gen-server
# Or local installation
npm install @gongrzhe/image-gen-server
Edit your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
Add the following configuration:
{
"mcpServers": {
"image-gen": {
"command": "npx",
"args": ["@gongrzhe/image-gen-server"],
"env": {
"REPLICATE_API_TOKEN": "your-replicate-api-token"
},
"disabled": false,
"autoApprove": []
}
}
}
Replace your-replicate-api-token
with your actual Replicate API token.
REPLICATE_API_TOKEN
(required): Your Replicate API tokenMODEL
(optional): Alternative Replicate model to use. Defaults to "black-forest-labs/flux-schnell"disabled
: Set to false
to enable the server, true
to disable itautoApprove
: Array of tool names that can be executed without user confirmation. Empty array means all tool calls require confirmation.Once configured, you can ask your AI assistant to generate images based on text prompts. The assistant will use the generate_image
tool to create images according to your specifications.
Example prompts:
The generated images will be displayed directly in your conversation with the assistant.