High-quality SiliconFlow Image Generation MCP Server
Project description
SiliconFlow MCP Server
An MCP (Model Context Protocol) server for SiliconFlow's image generation service. This allows AI models (like Claude) to generate high-quality images directly using various models available on SiliconFlow.
Features
generate_imagetool: Generate images from text prompts.- Supports multiple models (FLUX.1-schnell, FLUX.1-dev, FLUX.2-pro, etc.)
aspect_ratiosupport: Choose from 1:1, 16:9, 9:16, etc.- Supports
negative_promptfor supported models. - Customizable seeds for reproducible generations.
generate_videotool: Generate videos via text prompts (auto-polls until completion).- Supports Wan-AI models and customizable aspect ratios.
submit_video_generation&get_video_status: Low-level tools for manual async video management.list_modelstool: Dynamically fetch available image and video models.get_user_infotool: Check your SiliconFlow account details, including balance (Total, Paid, Free) and profile info.- Local Saving: Automatically save
.png,.jpg, or.mp4files to your specified directory.
Setup
1. Prerequisites
- uv installed (recommended) or Python 3.10+.
- A SiliconFlow API Key. Get one at SiliconFlow Dashboard.
2. Configuration
The server requires an API key to function. You can provide it via environment variables or a .env file.
SILICONFLOW_API_KEY=your_api_key_here
# Optional: Path to save generated images/videos locally
SILICONFLOW_IMAGE_DIR=C:/path/to/save/assets
Usage
Using with uvx (Recommended)
You don't need to install anything locally. Just run it directly using uvx:
uvx siliconflow-mcp
Installation via PyPI
You can also install it as a global tool:
uv tool install siliconflow-mcp
# or using pip
pip install siliconflow-mcp
Configuration for MCP Clients
Claude Desktop
Add the following to your Claude Desktop configuration file (%APPDATA%\Claude\claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"siliconflow": {
"command": "uvx",
"args": ["siliconflow-mcp"],
"env": {
"SILICONFLOW_API_KEY": "your_api_key_here",
"SILICONFLOW_IMAGE_DIR": "C:/path/to/save/assets"
}
}
}
}
Claude Code
Run the following command:
claude mcp add siliconflow -- uvx siliconflow-mcp
Gemini CLI
Add the configuration to your settings.json (usually located in .gemini/settings.json):
{
"mcpServers": {
"siliconflow": {
"command": "uvx",
"args": ["siliconflow-mcp"],
"env": {
"SILICONFLOW_API_KEY": "your_api_key_here",
"SILICONFLOW_IMAGE_DIR": "C:/path/to/save/assets"
}
}
}
}
Installation for Developers
If you want to contribute or run from source:
# Install dependencies
uv sync
# Run the server locally
uv run siliconflow_mcp
Supported Models
black-forest-labs/FLUX.1-schnell(Fast and efficient)black-forest-labs/FLUX.1-dev(Higher quality)black-forest-labs/FLUX.2-pro(Professional grade)- ...and other image models hosted on SiliconFlow.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file siliconflow_mcp-0.1.1.tar.gz.
File metadata
- Download URL: siliconflow_mcp-0.1.1.tar.gz
- Upload date:
- Size: 51.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
672692abf0383de94574f8420e1c01fbd0df44f7720abd0ec24d36f41f9f76bc
|
|
| MD5 |
ead12711a4ba44d3d64fc64b2f5faff6
|
|
| BLAKE2b-256 |
d64cb8e9977869cc0c5bbc3d43c133ed7ac9ad6e323435502511e5e1617297a3
|
File details
Details for the file siliconflow_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: siliconflow_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
444f68da28a72f30b6fb5377ac2422f7fac1aac3941d8781aa51f892549cb36f
|
|
| MD5 |
3834f14d23102272502f5408650e1c41
|
|
| BLAKE2b-256 |
579fd8ab6441624b87e0c06a4bfb621853f8ff8a7b067db290c3f155dd85f9fc
|