Overview
Flux Image Generation Server is a simple HTTP server that utilizes the Replicate Flux Schnell model to generate images based on user-defined prompts.
To use the server, first install the necessary dependencies, set your Replicate API token as an environment variable, and then run the server. You can generate images by sending a POST request to the server with a JSON payload containing your image description.
- Simple HTTP API for image generation - Utilizes the Replicate Flux Schnell model - Easy setup and configuration
- Generating custom images for creative projects
- Creating visual content for marketing and social media
- Rapid prototyping of image ideas based on textual descriptions
Add to your AI client
Use these steps to connect Flux Image Generation Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"replicate-image-generate-caok": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-replicate-image-generate-caok"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"replicate-image-generate-caok": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-replicate-image-generate-caok"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"replicate-image-generate-caok": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-replicate-image-generate-caok"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"replicate-image-generate-caok": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-replicate-image-generate-caok"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"replicate-image-generate-caok": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-replicate-image-generate-caok"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"replicate-image-generate-caok": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-replicate-image-generate-caok"
]
}
}
}FAQ
What is required to run the server?
You need Node.js installed and a valid Replicate API token.
How do I generate an image?
Send a POST request to the /generate endpoint with your image description in the request body.
Can I run the server on a different port?
Yes, you can modify the server configuration to run on a different port.