Flux Image MCP Server
Generate images using Replicate's Flux Schnell model.
Flux Image MCP Server
This MCP server provides image generation capabilities using the Flux Schnell model on Replicate.
Installation
- Install the MCP SDK globally:
npm install -g @modelcontextprotocol/sdk@latest
- Clone this repository to your MCP servers directory:
cd ~/Documents/Cline/MCP
git clone https://github.com/yourusername/flux-img-mcp.git
cd flux-img-mcp
npm install
- Build the server:
npm run build
- Add the server configuration to your MCP settings file (either global or workspace):
{
"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": []
}
}
}
Configuration
The server requires the following environment variable:
REPLICATE_API_TOKEN: Your Replicate API token. You can get this from your Replicate account settings.
Usage
Once installed and configured, the server provides the following tool:
generate_image
Generates an image using the Flux Schnell model based on a text prompt.
Parameters:
prompt(string, required): Text description of the desired image
Example 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)
Development
To make changes to the server:
- Modify the source code in
src/index.ts - Rebuild the server:
npm run build - Restart the MCP server for changes to take effect
Error Handling
The server includes comprehensive error handling for:
- Missing API token
- Invalid parameters
- API request failures
- Network issues
Security
- Never commit your Replicate API token to version control
- Always provide the token through environment variables
- The server validates all input parameters before making API requests
संबंधित सर्वर
IcoGenie MCP
MCP server for AI-powered SVG icon generation. Generate production-ready icons from text descriptions. Supports single icons, bundles, style customization, and regeneration.
Cybersecurity Vulnerability Intel MCP
Real-time CVE lookup via NIST NVD 2.0, CISA KEV alerts, EPSS exploitation probability, and MITRE ATT&CK mappings. 7 tools for AI-powered vulnerability assessment.
SignalK MCP Server
Provides AI agents with read-only access to SignalK marine data systems, enabling queries of vessel navigation data, AIS targets, and system alarms.
OpenHue MCP Server
Control Philips Hue lights using LLM interfaces via the OpenHue CLI.
anneal-memory
Two-layer memory for AI agents with an immune system — episodes compress into identity through citation-validated graduation. Zero dependencies, 5 MCP tools.
OpenRegistry
Unmodified government company registry data — 27 national registries, live. Cross-border UBO / beneficial owner chain walker for KYC, AML, due diligence. 27 tools + 10 MCP prompt workflows.
Kite Trading
A server for performing trading operations using the Kite Connect API.
AAI Gateway
Unified MCP & skill management gateway with progressive disclosure. Manages multiple MCP servers as Agent Apps, loading tool schemas on demand for 99% context token savings. Shared across Claude Code, Codex, OpenCode and more.
Bitscale AI
B2B GTM Orchestration and Data Enrichment
AiPayGen
65+ AI tools as an MCP server. Research, write, code, scrape, translate, analyze, agent memory, workflows. Pay per call from $0.006.