home / mcp / mcp-flux-schnell mcp server
mcp server for cloudflare flux schnell worker api.
Configuration
View docs{
"mcpServers": {
"bytefer-mcp-flux-schnell": {
"command": "node",
"args": [
"/path/to/mcp-flux-schnell/build/index.js"
],
"env": {
"WORKING_DIR": "./generated_images",
"FLUX_API_URL": "https://api.flux Schnell/v1",
"FLUX_API_TOKEN": "YOUR_TOKEN"
}
}
}
}You can run a Flux Schnell MCP Server to generate images from text prompts by connecting to the Flux Schnell API. This server is written in TypeScript and exposes a generate_image tool that returns the path to the generated image, enabling seamless image creation from MCP clients.
To use this MCP server, you connect it to an MCP client and call the available tool generate_image with a text prompt. The server forwards the prompt to Flux Schnell, receives the generated image, and returns the path to the resulting file. You can integrate it into your MCP workflows to automate image generation from descriptions, artwork ideas, or creative prompts.
Prerequisites you need before installing and running the MCP server are Node.js (version compatible with the project) and a package manager such as npm or pnpm.
Install dependencies and build the server locally, then start it.
# Install dependencies
npm install
# or
pnpm install
# Build the server
npm run build
# or
pnpm build
# Start the server (example runtime command)
npx -y @smithery/cli install @bytefer/mcp-flux-schnell --client claudeConfigure the Flux Schnell MCP server so it can reach the Flux Schnell API and store generated images locally. You provide the API URL and authentication token, and you may choose a working directory for image storage.
The following local configuration demonstrates how to run the MCP server as a stdio process with the required environment variables.
{
"mcpServers": {
"mcp-flux-schnell": {
"command": "node",
"args": ["/path/to/mcp-flux-schnell/build/index.js"],
"env": {
"FLUX_API_URL": "your flux api url",
"FLUX_API_TOKEN": "your flux api token",
"WORKING_DIR": "your working directory"
}
}
}
}- Ensure FLUX_API_URL and FLUX_API_TOKEN are correct and have the necessary permissions in Flux Schnell.
- If images fail to generate, verify that the WORKING_DIR exists and is writable by the server process.
- Use the client to confirm the generate_image tool is reachable and returns a valid image path.
Generate images from text descriptions by providing a prompt; returns the path to the generated image file.