siliconflow-flux
基于硅基流动端口的AI生图MCP
claude mcp add --transport stdio lioensky-siliconflow-flux-mcp-server node path/to/siliconflow-flux-mcp-server/build/index.js \ --env SILICONFLOW_API_KEY="your-api-key"
How to use
This MCP server exposes the SiliconFlow Flux image generation through the MCP protocol. It allows AI assistants to request image synthesis using SiliconFlow's Flux model with configurable resolutions and parameters. The server supports multiple standard image sizes such as 1024x1024, 960x1280, 768x1024, 720x1440, and 720x1280, and it can cache recent results to speed up repeat requests. To use it, configure an MCP client to call the generate_image tool exposed by the server, providing at minimum a prompt and a resolution, and optionally a seed for reproducibility. The agent must supply the SiliconFlow API key via the environment variable SILICONFLOW_API_KEY when launching the MCP server, so the server can authenticate with SiliconFlow’s API. Once configured, the agent can request image generation by passing a prompt, a chosen resolution, and an optional seed. The server will return the generated image data or a reference to the generated image, depending on the MCP tooling and response format used by your integration.
How to install
Prerequisites:
- Node.js v18.0.0 or higher
- npm (comes with Node.js)
- Access to SiliconFlow API key
Installation steps:
- Clone the repository
git clone https://github.com/lioensky/siliconflow-flux-mcp-server.git
- Install dependencies
cd siliconflow-flux-mcp-server
npm install
- Build the project (if applicable)
npm run build
- Prepare configuration
- Create a .env file at the project root (or ensure your environment provides SILICONFLOW_API_KEY).
- Obtain your API key from SiliconFlow and store it as SILICONFLOW_API_KEY.
Example .env:
SILICONFLOW_API_KEY=your-api-key
- Run the MCP server
# Example (adjust paths as needed)
npm start
- Verify the server is running
node -v
npm -v
# Check logs for server startup confirmation
Additional notes
Environment variables:
- SILICONFLOW_API_KEY: Your SiliconFlow API key. Required for image generation.
- Consider adding additional environment controls (e.g., rate limits or per-user quotas) at the MCP level if your deployment requires it.
Common issues:
- Missing or invalid API key: Ensure SILICONFLOW_API_KEY is set and valid.
- Node version incompatibility: Use Node.js v18.x or newer as stated.
- Build step missing: If npm run build is not applicable, ensure index.js exists at the specified path in the MCP config.
Configuration tips:
- Keep the API key outside of your codebase when possible; use environment management for security.
- If you need to switch resolutions, ensure the client passes a supported resolution list and that the server handles it gracefully.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.