yuppie-mcp-siliconflow
硅基流动(SiliconFlow)MCP Server — 让 AI 助手通过 MCP 协议生成图像。
特性
- 文生图
generate_image:支持宽高比 / 显式尺寸 / 种子 / 负面提示词 / 张数;返回<img>标签,AI 加width后可直接在对话里显示 - 图生图 / 编辑
edit_image:基于 URL 或 base64 图像按指令编辑 - 本地保存:配置目录后自动把生成的图像落盘
架构说明
本包是 MCP 壳:核心客户端代码在库包 yuppie-siliconflow(PyPI 分发,pip install yuppie-siliconflow),本包依赖它。
如只需在 Python 项目里调用硅基流动 API(不要 MCP),直接装库包即可。
快速开始
准备 API Key
在 硅基流动控制台(国际站)申请 API Key。
Claude Code
claude mcp add siliconflow \
-e SILICONFLOW_API_KEY="sk-你的Key" \
-e SILICONFLOW_IMAGE_DIR="/path/to/save/images" \
-- uvx yuppie-mcp-siliconflow
Claude Desktop
在 claude_desktop_config.json 中添加:
{
"mcpServers": {
"siliconflow": {
"command": "uvx",
"args": ["yuppie-mcp-siliconflow"],
"env": {
"SILICONFLOW_API_KEY": "sk-你的Key",
"SILICONFLOW_IMAGE_DIR": "/path/to/save/images"
}
}
}
}
opencode
{
"mcp": {
"siliconflow": {
"type": "local",
"command": ["uvx", "yuppie-mcp-siliconflow"],
"environment": { "SILICONFLOW_API_KEY": "sk-你的Key" }
}
}
}
环境变量
| 变量 | 必填 | 说明 |
|---|---|---|
SILICONFLOW_API_KEY |
✅ | API Key |
SILICONFLOW_BASE_URL |
默认 https://api.siliconflow.com(国内站 https://api.siliconflow.cn) |
|
SILICONFLOW_MODEL |
默认文生图模型,默认 Tongyi-MAI/Z-Image-Turbo |
|
SILICONFLOW_IMAGE_DIR |
图像保存目录 |
工具列表
| 工具 | 说明 |
|---|---|
generate_image |
文生图 |
edit_image |
图生图 / 编辑 |
注意事项
FLUX.1-schnell / FLUX.1-dev 在硅基流动返回的 S3 预签名 URL 签名无效,立即下载会
403 SignatureDoesNotMatch。默认模型因此改用 Tongyi-MAI/Z-Image-Turbo。
Metadata
Release files for yuppie-mcp-siliconflow 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yuppie_mcp_siliconflow-0.1.0.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yuppie_mcp_siliconflow-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.9 kB
Release files / yuppie_mcp_siliconflow-0.1.0.tar.gz
| Download URL | yuppie_mcp_siliconflow-0.1.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b242415da57beb97237b2587aa189e0a444191ffd789f212c161fcacfde53b9
|
|
BLAKE2b-256 checksum How to use checksums |
733a629141c5bf898fa49f3cd75c506b26ce2a049eaea12b935241a2c3785461
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / yuppie_mcp_siliconflow-0.1.0-py3-none-any.whl
| Download URL | yuppie_mcp_siliconflow-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1b654ff6c5e810c22e5f37dd4b8d9b8b7f52042a05c9ef4f9369f9465affad14
|
|
BLAKE2b-256 checksum How to use checksums |
6682037396879b76f67e526d159e764b678e6438516c645971732d1b63abd72f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|