种子流MCP
](https://pypi.org/project/mcp-seedream-pro/) ](https://pypi.org/project/mcp-seedream-pro/)   
A. 模型上下文协议(MCP) 用于AI图像生成和编辑的服务器 字节跳动的种子流 模型通过 AceDataCloud API.
直接从Claude、VS Code或任何兼容MCP的客户端生成和编辑AI图像。
特性
- 文本到图像生成 --根据文本提示(中文和英文)创建高质量图像
- 图像编辑 --使用AI修改现有图像(样式转换、背景更改、虚拟试穿)
- 多种型号 --Seedream v5.0(旗舰版),v4.5,v4.0,v3.0 T2I,SeedEdit v3.0 I2I
- 多分辨率 --1K、2K、3K、4K、自适应和自定义尺寸
- 种子控制 --具有种子参数的可重复结果(v3模型)
- 顺序生成 --按顺序生成相关图像(v4.5/v4.0)
- 流媒体 --渐进式图像传输(v4.5/v4.0)
- 任务跟踪 --监控生成进度并检索结果
工具参考
| 工具 | 说明 |
|---|---|
seedream_generate_image | 使用ByteDance的Seedream模型从文本提示生成AI图像。 |
seedream_edit_image | 使用ByteDance的Seedream/SedeEdit模型编辑或修改现有图像。 |
seedream_get_task | 查询Seedream图像生成或编辑任务的状态和结果。 |
seedream_get_tasks_batch | 一次查询多个Seedream图像任务。 |
seedream_list_models | 列出所有可用的Seedream型号及其功能和价格。 |
seedream_list_sizes | 列出Seedream的所有可用图像大小和分辨率选项。 |
快速开始
1.获取您的API代币
- 注册地址: AceDataCloud平台
- 去 API文档页
- 点击 “收购” 获取您的API令牌
- 复制令牌以在下面使用
2.使用托管服务器(推荐)
AceDataCloud托管托管MCP服务器-- 无需本地安装.
端点: https://seedream.mcp.acedata.cloud/mcp
所有请求都需要一个Bearer令牌。使用步骤1中的API令牌。
Claude.ai
直接连接 Claude.ai 使用OAuth-- 不需要API令牌:
- 转到Claude.ai 设置→ 集成→ 添加更多
- 输入服务器URL:
https://seedream.mcp.acedata.cloud/mcp - 完成OAuth登录流程
- 开始在对话中使用工具
克劳德桌面版
添加到您的配置(~/Library/Application Support/Claude/claude_desktop_config.json 在macOS上):
{
"mcpServers": {
"seedream": {
"type": "streamable-http",
"url": "https://seedream.mcp.acedata.cloud/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}光标/风帆
添加到MCP配置(.cursor/mcp.json 或 .windsurf/mcp.json):
{
"mcpServers": {
"seedream": {
"type": "streamable-http",
"url": "https://seedream.mcp.acedata.cloud/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}VS代码(副本)
添加到您的VS代码MCP配置中(.vscode/mcp.json):
{
"servers": {
"seedream": {
"type": "streamable-http",
"url": "https://seedream.mcp.acedata.cloud/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}或安装 Ace数据云MCP扩展 对于VS Code,它通过一键设置捆绑了所有15个MCP服务器。
JetBrains集成开发环境
- 首选 设置→ 工具→ AI助手→ 模型上下文协议(MCP)
- 点击 添加 → 超文本传输协议
- 粘贴:
{
"mcpServers": {
"seedream": {
"url": "https://seedream.mcp.acedata.cloud/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}克劳德代码
Claude Code原生支持MCP服务器:
claude mcp add seedream --transport http https://seedream.mcp.acedata.cloud/mcp \
-h "Authorization: Bearer YOUR_API_TOKEN"或添加到您的项目 .mcp.json:
{
"mcpServers": {
"seedream": {
"type": "streamable-http",
"url": "https://seedream.mcp.acedata.cloud/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}克莱恩
添加到Cline的MCP设置(.cline/mcp_settings.json):
{
"mcpServers": {
"seedream": {
"type": "streamable-http",
"url": "https://seedream.mcp.acedata.cloud/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}亚马逊Q开发者
添加到MCP配置中:
{
"mcpServers": {
"seedream": {
"type": "streamable-http",
"url": "https://seedream.mcp.acedata.cloud/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}Roo代码
添加到Roo Code MCP设置:
{
"mcpServers": {
"seedream": {
"type": "streamable-http",
"url": "https://seedream.mcp.acedata.cloud/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}Continue.dev
添加 .continue/config.yaml:
mcpServers:
- name: seedream
type: streamable-http
url: https://seedream.mcp.acedata.cloud/mcp
headers:
Authorization: "Bearer YOUR_API_TOKEN"泽德
添加到Zed的设置中(~/.config/zed/settings.json):
{
"language_models": {
"mcp_servers": {
"seedream": {
"url": "https://seedream.mcp.acedata.cloud/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_TOKEN"
}
}
}
}
}cURL测试
# Health check (no auth required)
curl https://seedream.mcp.acedata.cloud/health
# MCP initialize
curl -X POST https://seedream.mcp.acedata.cloud/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'3.或在本地运行(替代方案)
如果您更喜欢在自己的计算机上运行服务器:
# Install from PyPI
pip install mcp-seedream-pro
# or
uvx mcp-seedream-pro
# Set your API token
export ACEDATACLOUD_API_TOKEN="your_token_here"
# Run (stdio mode for Claude Desktop / local clients)
mcp-seedream-pro
# Run (HTTP mode for remote access)
mcp-seedream-pro --transport http --port 8000克劳德桌面(本地)
{
"mcpServers": {
"seedream": {
"command": "uvx",
"args": ["mcp-seedream-pro"],
"env": {
"ACEDATACLOUD_API_TOKEN": "your_token_here"
}
}
}
}Docker(自托管)
docker pull ghcr.io/acedatacloud/mcp-seedream-pro:latest
docker run -p 8000:8000 ghcr.io/acedatacloud/mcp-seedream-pro:latest客户端使用自己的Bearer令牌进行连接——服务器从每个请求中提取令牌 Authorization 头球
可用工具
图像生成和编辑
| 工具 | 说明 |
|---|---|
seedream_generate_image | 从文本提示生成图像 |
seedream_edit_image | 使用AI编辑或修改现有图像 |
任务管理
| 工具 | 说明 |
|---|---|
seedream_get_task | 查询单个任务状态和结果 |
seedream_get_tasks_batch | 一次查询多个任务 |
信息
| 工具 | 说明 |
|---|---|
seedream_list_models | 列出具有功能的可用型号 |
seedream_list_sizes | 列出可用的图像大小选项 |
可用模型
| 型号 | 版本 | 类型 | 最适合 | 价格 |
|---|---|---|---|---|
doubao-seedream-5-0-260128 | v5.0 | 文本到图像 | 最佳质量,最新旗舰,网络搜索 | 约0.040美元/张 |
doubao-seedream-4-5-251128 | v4.5 | 文本到图像 | 以前的旗舰产品,质量很好 | ~0.037美元/图像 |
doubao-seedream-4-0-250828 | v4.0 | 文本到图像 | 大多数任务的最佳值 | ~0.03/图像 |
doubao-seedream-3-0-t2i-250415 | v3.0 | 文本到图像 | 可再现的结果 | ~0.038/图像 |
doubao-seededit-3-0-i2i-250628 | v3.0 | 图像到图像 | 图像编辑 | ~0.046/图像 |
用法示例
从提示符生成图像
User: Create a photorealistic image of a cat in a garden
Claude: I'll generate that image for you.
[Calls seedream_generate_image with detailed prompt]
→ Returns task_id and image URL图像编辑
User: Change the background of this photo to a beach
[Provides image URL]
Claude: I'll edit that image for you.
[Calls seedream_edit_image with image URL and edit description]中国快速支持
User: 生成一幅中国山水画,有远山、流水和古松
Claude: 好的,我来为您生成这幅山水画。
[Calls seedream_generate_image with Chinese prompt]可复制的一代
User: Generate a landscape and make sure I can recreate the exact same image later
Claude: I'll use the v3 model with a fixed seed.
[Calls seedream_generate_image with model=doubao-seedream-3-0-t2i-250415, seed=42]配置
环境变量
| 变量 | 描述 | 默认值 |
|---|---|---|
ACEDATACLOUD_API_TOKEN | 来自AceDataCloud的API令牌 | 必需 |
ACEDATACLOUD_API_BASE_URL | API基本URL | https://api.acedata.cloud |
ACEDATACLOUD_OAUTH_CLIENT_ID | OAuth客户端ID(托管模式) | -- |
ACEDATACLOUD_PLATFORM_BASE_URL | 平台基础URL | https://platform.acedata.cloud |
SEEDREAM_REQUEST_TIMEOUT | 请求超时(秒) | 1800 |
LOG_LEVEL | 日志记录级别 | INFO |
命令行选项
mcp-seedream-pro --help
Options:
--version Show version
--transport Transport mode: stdio (default) or http
--port Port for HTTP transport (default: 8000)发展
设置开发环境
# Clone repository
git clone https://github.com/AceDataCloud/SeedreamMCP.git
cd SeedreamMCP
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # or `.venv\Scripts\activate` on Windows
# Install with dev dependencies
pip install -e ".[dev,test]"运行测试
# Run unit tests
pytest
# Run with coverage
pytest --cov=core --cov=tools
# Run integration tests (requires API token)
pytest -m integration代码质量
# Format code
ruff format .
# Lint code
ruff check .
# Type check
mypy core tools main.py构建和发布
# Install build dependencies
pip install -e ".[release]"
# Build package
python -m build
# Upload to PyPI
twine upload dist/*项目结构
SeedreamMCP/
├── core/ # Core modules
│ ├── __init__.py
│ ├── client.py # HTTP client for Seedream API
│ ├── config.py # Configuration management
│ ├── exceptions.py # Custom exceptions
│ ├── server.py # MCP server initialization
│ ├── types.py # Type definitions
│ └── utils.py # Utility functions
├── tools/ # MCP tool definitions
│ ├── __init__.py
│ ├── image_tools.py # Image generation/editing tools
│ ├── task_tools.py # Task query tools
│ └── info_tools.py # Model & size info tools
├── prompts/ # MCP prompt templates
│ └── __init__.py
├── tests/ # Test suite
│ ├── conftest.py
│ ├── test_config.py
│ └── test_utils.py
├── deploy/ # Deployment configs
│ ├── run.sh
│ └── production/
│ ├── deployment.yaml
│ ├── ingress.yaml
│ └── service.yaml
├── .github/ # GitHub Actions workflows
│ ├── dependabot.yml
│ └── workflows/
│ ├── ci.yaml
│ ├── claude.yml
│ ├── deploy.yaml
│ └── publish.yml
├── .env.example # Environment template
├── .gitignore
├── .ruff.toml # Ruff linter config
├── CHANGELOG.md
├── Dockerfile # Docker image for HTTP mode
├── docker-compose.yaml # Docker Compose config
├── LICENSE
├── main.py # Entry point
├── pyproject.toml # Project configuration
└── README.mdAPI 参考
此服务器包装 AceDataCloud种子流API:
用例
- AI艺术创作 --生成令人惊叹的艺术品、插图和数字艺术
- 产品摄影 --打造专业的产品场景构图
- 内容创建 --为博客、社交媒体和营销生成图片
- 虚拟试穿 --将不同型号的服装可视化
- 风格迁移 --将照片转换为不同的艺术风格
- 游戏设计 --概念艺术、人物设计、环境设计
- 电子商务 --产品模型、生活方式照片、横幅图片
