This MCP server provides image generation capabilities using the Flux Schnell model on Replicate.
npm install -g @modelcontextprotocol/sdk@latest
cd ~/Documents/Cline/MCP
git clone https://github.com/yourusername/flux-img-mcp.git
cd flux-img-mcp
npm install
npm run build
{
"mcpServers": {
"flux-img": {
"command": "node",
"args": ["/path/to/flux-img-mcp/build/index.js"],
"env": {
"REPLICATE_API_TOKEN": "your-replicate-api-token"
},
"disabled": false,
"alwaysAllow": []
}
}
}
The server requires the following environment variable:
REPLICATE_API_TOKEN
: Your Replicate API token. You can get this from your Replicate account settings.Once installed and configured, the server provides the following tool:
Generates an image using the Flux Schnell model based on a text prompt.
Parameters:
prompt
(string, required): Text description of the desired imageExample usage:
<use_mcp_tool>
<server_name>flux-img</server_name>
<tool_name>generate_image</tool_name>
<arguments>
{
"prompt": "A beautiful sunset over mountains"
}
</arguments>
</use_mcp_tool>
The tool will return a JSON response containing:
status
: The status of the generation requestoutput
: The URL of the generated image (if successful)error
: Any error message (if failed)To make changes to the server:
src/index.ts
npm run build
The server includes comprehensive error handling for:
TypeScript implementation of a Model Context Protocol (MCP) server for Trello integration
An MCP server for analyzing open source projects and assisting with codebase integration
A Python-based MCP (Model Context Protocol) server that predicts the origin