Skip to main content

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_MODEL
  • SEEDREAM_API_KEY / SEEDREAM_APIKEY
  • ARK_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>

文档:

Metadata

Release files for seedream-server-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for seedream-server-mcp 0.1.0
File Size Uploaded Provenance
seedream_server_mcp-0.1.0.tar.gz 48.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for seedream-server-mcp 0.1.0
File Interpreter ABI Platform
seedream_server_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 53.8 kB

Release files / seedream_server_mcp-0.1.0.tar.gz

Download URL seedream_server_mcp-0.1.0.tar.gz
Size 48.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d382ce136d75349dccf81c719f10db4c31d430d737035292566b13e068d0f222
BLAKE2b-256 checksum
How to use checksums
b7ffc4891071845fd3b8c781d3683ebf9a7144213223fb97fafca13ab3793409
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.11

Release files / seedream_server_mcp-0.1.0-py3-none-any.whl

Download URL seedream_server_mcp-0.1.0-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a0b6bcb7e382a1dc53000e8861ebde6379c1892630c88f5d3755fcd520a931c
BLAKE2b-256 checksum
How to use checksums
e3bfd3fc8949a2fdc45876307f195dd97b5c3a5c52b5bd84be8f9ee821e330f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.11

Security for seedream-server-mcp 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page