- Home
- MCP servers
- Flux Image
Flux Image
- javascript
2
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"ckz-flux-img-mcp": {
"command": "node",
"args": [
"/path/to/flux-img-mcp/build/index.js"
],
"env": {
"REPLICATE_API_TOKEN": "YOUR_TOKEN"
}
}
}
}You can generate images with the Flux Schnell model through an MCP server that runs locally and authenticates to Replicate. This setup lets you request image generations from your own MCP client and integrate results into your workflows.
How to use
You use the Flux image MCP server from your MCP client by invoking the generate_image tool. Provide a text prompt describing the image you want, and the server will return the result as a URL or report an error if something goes wrong.
How to install
Prerequisites you need before installing: Node.js and npm must be installed on your machine.
Install the MCP SDK globally so you can manage MCP servers from anywhere on your system.
npm install -g @modelcontextprotocol/sdk@latest
Clone the Flux image MCP server into your MCP directory, install dependencies, and prepare the build.
cd ~/Documents/Cline/MCP
git clone https://github.com/yourusername/flux-img-mcp.git
cd flux-img-mcp
npm install
Build the server so you have a runnable build/index.js that the MCP can execute.
npm run build
Configure the MCP settings to run the server locally. Use the command path to the built entry point and supply your Replicate API token via environment variables.
{
"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": []
}
}
}
Additional configuration and notes
Environment variable you must provide for the server to access Replicate is the Replicate API token.
Security best practices: never commit your Replicate API token to version control. Always supply the token through environment variables and ensure only authorized clients can invoke the MCP tool.
Usage example
To generate an image, you call the flux_img generate_image tool with a text prompt through your MCP client. The server responds with the status, the image URL if successful, and any error message if it fails.
Development
To modify the server, edit the source code, rebuild, and restart the MCP server for changes to take effect.
Available tools
generate_image
Generates an image using the Flux Schnell model based on a text prompt. Returns a status, an image URL on success, or an error message on failure.