Seedream MCP server for text-to-image and image-to-image
Project description
seedream-mcp
基于火山方舟图片生成 API 的 MCP 服务,提供:
- 文生图:
seedream_text_to_image - 图生图:
seedream_image_to_image
项目已改为 uv 可运行 + 可发布包 结构(pyproject.toml + src/ 布局)。
1) 环境变量
复制 .env.example 为 .env 后填写:
model=doubao-seedream-4.0
apikey=YOUR_ARK_API_KEY
兼容别名:
SEEDREAM_MODELSEEDREAM_API_KEY/SEEDREAM_APIKEYARK_API_KEY
2) uv 运行(推荐)
在 seedream-mcp/ 目录执行:
uv sync
uv run seedream-mcp --transport stdio
如果要跑 HTTP(给网关或手工调试):
uv run seedream-mcp --transport http --host 127.0.0.1 --port 8004
也支持模块方式:
uv run python -m seedream_mcp --transport stdio
3) 发布包
uv build
uv publish
发布到 TestPyPI(如已配置 index):
uv publish --index testpypi
4) OpenCode MCP 配置示例(参考你的 opencode.json 风格)
本地项目直接运行
{
"mcp": {
"seedream-mcp": {
"type": "local",
"command": [
"uv",
"run",
"--directory",
"D:/OneDrive/WORK/Python/mcps/seedream-mcp",
"seedream-mcp"
],
"environment": {
"model": "doubao-seedream-4.0",
"apikey": "YOUR_ARK_API_KEY",
"SEEDREAM_MCP_TRANSPORT": "stdio"
}
}
}
}
已发布后通过 uvx 使用
{
"mcp": {
"seedream-mcp": {
"type": "local",
"command": ["uvx", "seedream-server-mcp"],
"environment": {
"model": "doubao-seedream-4.0",
"apikey": "YOUR_ARK_API_KEY",
"SEEDREAM_MCP_TRANSPORT": "stdio"
}
}
}
}
5) 接口说明(官方文档)
- Base URL:
https://ark.cn-beijing.volces.com/api/v3 - 路径:
POST /images/generations - 鉴权:
Authorization: Bearer <apikey>
文档:
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
seedream_server_mcp-0.1.0.tar.gz
(48.4 kB
view details)
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 seedream_server_mcp-0.1.0.tar.gz.
File metadata
- Download URL: seedream_server_mcp-0.1.0.tar.gz
- Upload date:
- Size: 48.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d382ce136d75349dccf81c719f10db4c31d430d737035292566b13e068d0f222
|
|
| MD5 |
1ee87a23b629a2ec23ffe3668cbd8220
|
|
| BLAKE2b-256 |
b7ffc4891071845fd3b8c781d3683ebf9a7144213223fb97fafca13ab3793409
|
File details
Details for the file seedream_server_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: seedream_server_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a0b6bcb7e382a1dc53000e8861ebde6379c1892630c88f5d3755fcd520a931c
|
|
| MD5 |
faa269476c3b914969f1c196998034b2
|
|
| BLAKE2b-256 |
e3bfd3fc8949a2fdc45876307f195dd97b5c3a5c52b5bd84be8f9ee821e330f6
|