yuppie-mcp-siliconflow
硅基流动(SiliconFlow)MCP Server — 让 AI 助手通过 MCP 协议生成图像。
特性
- 文生图
generate_image:支持宽高比 / 显式尺寸 / 种子 / 负面提示词 / 张数;返回原生 MCP 图片块(服务端下载字节内联),客户端直接渲染,不依赖外链 HTML - 图生图 / 编辑
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.2.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 | Provenance | Actions |
|---|---|---|---|---|
| yuppie_mcp_siliconflow-0.2.0.tar.gz | 6.0 kB | Without provenance | Details for yuppie_mcp_siliconflow-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yuppie_mcp_siliconflow-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for yuppie_mcp_siliconflow-0.2.0-py3-none-any.whl |
Total release size: 14.4 kB
Release files / yuppie_mcp_siliconflow-0.2.0.tar.gz
| Download URL | yuppie_mcp_siliconflow-0.2.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c06b4dafe1af19104c01407ca71cc518d39c90fd08124bf738d2b3dfbbf5c0df
|
|
BLAKE2b-256 checksum How to use checksums |
e4ef393d214eb50847fc3fead863a5df93eb241f64fd98713c99480a968b69d0
|
| 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.2.0-py3-none-any.whl
| Download URL | yuppie_mcp_siliconflow-0.2.0-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5808afc45325247f8ad1a48373f714372d7f0426c216a0dc7035d5689fea08ae
|
|
BLAKE2b-256 checksum How to use checksums |
700e2ed28ab4780562ac1a8fa94760672604a0a7be3c7ec2970541a52047d781
|
| 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}
|
Security for yuppie-mcp-siliconflow 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.