跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.xhuoapi.ai/llms.txt

Use this file to discover all available pages before exploring further.

MCP(Model Context Protocol) 是由 Anthropic 推出的模型上下文协议,允许 AI 模型(如 Claude、GPT 等)通过标准化接口调用外部工具。通过 XHuoAPI 提供的 Seedream MCP Server,你可以在 Claude Desktop、VS Code、Cursor 等 AI 客户端中直接使用字节跳动 Seedream 生成和编辑 AI 图像。

功能概览

Seedream MCP Server 提供以下核心功能:
  • 文本生成图像 — 通过文本提示词生成高质量图像(支持中英文提示词)
  • 图像编辑 — 修改已有图像的风格、背景、属性等
  • 虚拟试衣 — 将服装穿戴到人物照片上
  • 多模型支持 — 支持 Seedream v4.5、v4.0、v3.0 T2I、SeedEdit v3.0 I2I 等模型
  • 多种分辨率 — 支持 1K、2K、4K 及自适应分辨率
  • 种子控制 — 通过 seed 参数实现可复现的生成结果
  • 任务查询 — 监控生成进度并获取结果

前置准备

使用前,你需要获取 XHuoAPI API Token:
  1. 注册或登录 XHuoAPI 平台
  2. 前往 Seedream Images API 页面
  3. 点击「Acquire」获取 API Token(首次申请赠送免费额度)

方式一:使用托管 MCP Server(推荐,零安装)

XHuoAPI 已经把 Seedream MCP Server 托管在云端,无需本地安装任何依赖,直接在 AI 客户端里填写下面这个 URL 就能用:
https://seedream.mcp.xhuoapi.ai/mcp
认证方式:在请求头中加上 Authorization: Bearer 你的API Token 即可(Claude.ai 通过 OAuth 自动完成,无需手动填 Token)。

Claude.ai(网页版,OAuth 登录,最简单)

  1. 打开 Claude.ai → 左下角 CustomizeConnectorsAdd More
  2. 在 URL 处填入:https://seedream.mcp.xhuoapi.ai/mcp
  3. 完成 OAuth 授权登录(自动跳转 XHuoAPI 登录页)
  4. 回到对话界面,工具即可使用

Claude Desktop

编辑配置文件:
  • macOS:~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows:%APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "seedream": {
      "type": "http",
      "url": "https://seedream.mcp.xhuoapi.ai/mcp",
      "headers": {
        "Authorization": "Bearer 你的API Token"
      }
    }
  }
}
保存后重启 Claude Desktop 即可生效。

Claude Code(终端命令行)

claude mcp add seedream --transport http https://seedream.mcp.xhuoapi.ai/mcp \
  -H "Authorization: Bearer 你的API Token"

VS Code(GitHub Copilot)

在项目根目录创建 .vscode/mcp.json
{
  "servers": {
    "seedream": {
      "type": "http",
      "url": "https://seedream.mcp.xhuoapi.ai/mcp",
      "headers": {
        "Authorization": "Bearer 你的API Token"
      }
    }
  }
}

Cursor

在项目根目录创建 .cursor/mcp.json
{
  "mcpServers": {
    "seedream": {
      "url": "https://seedream.mcp.xhuoapi.ai/mcp",
      "headers": {
        "Authorization": "Bearer 你的API Token"
      }
    }
  }
}

其他支持 MCP 的客户端

任何支持 MCP Streamable HTTP 协议的客户端(Windsurf、Cline、ChatGPT Connectors、Gemini CLI、JetBrains AI Assistant 等)都可以通过填写以下两项接入:
  • URLhttps://seedream.mcp.xhuoapi.ai/mcp
  • HeaderAuthorization: Bearer 你的API Token

方式二:本地运行(pip / uvx 安装)

如果你需要离线运行、自定义代码或部署到内网,可以把 MCP Server 安装在本地通过 stdio 启动。

安装

pip 安装(推荐):
pip install mcp-seedream-pro
或源码安装:
git clone https://github.com/XHuoAPI/SeedreamMCP.git
cd SeedreamMCP
pip install -e .
安装完成后,即可使用 mcp-seedream-pro 命令启动服务。

在 Claude Desktop 中使用(本地)

编辑 Claude Desktop 配置文件:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
添加以下配置:
{
  "mcpServers": {
    "seedream": {
      "command": "mcp-seedream-pro",
      "env": {
        "XHuoAPI_API_TOKEN": "你的API Token"
      }
    }
  }
}
如果使用 uvx(无需提前安装包):
{
  "mcpServers": {
    "seedream": {
      "command": "uvx",
      "args": ["mcp-seedream-pro"],
      "env": {
        "XHuoAPI_API_TOKEN": "你的API Token"
      }
    }
  }
}
保存配置后重启 Claude Desktop 即可生效。

在 VS Code / Cursor 中使用(本地)

在项目根目录创建 .vscode/mcp.json
{
  "servers": {
    "seedream": {
      "command": "mcp-seedream-pro",
      "env": {
        "XHuoAPI_API_TOKEN": "你的API Token"
      }
    }
  }
}
或者使用 uvx
{
  "servers": {
    "seedream": {
      "command": "uvx",
      "args": ["mcp-seedream-pro"],
      "env": {
        "XHuoAPI_API_TOKEN": "你的API Token"
      }
    }
  }
}

可用工具列表

工具名说明
seedream_generate_image通过文本提示词生成图像
seedream_edit_image编辑或修改已有图像
seedream_get_task查询单个任务状态
seedream_get_tasks_batch批量查询任务状态
seedream_list_models列出所有可用模型及其能力
seedream_list_sizes列出可用的图像尺寸和分辨率选项

使用示例

配置完成后,你可以在 AI 客户端中直接用自然语言调用这些功能,例如:
  • 「帮我用 Seedream 生成一张水墨画风格的山水图」
  • 「把这张照片的背景改成星空」
  • 「用 Seedream v4.5 生成一张 4K 高清人像」
  • 「把这件衣服虚拟试穿到这张照片上」

更多信息