> ## 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.

# Seedance MCP 對接指南

> seedance MCP 服务器集成

[MCP（Model Context Protocol）](https://modelcontextprotocol.io) 是由 Anthropic 推出的模型上下文協議，允許 AI 模型（如 Claude、GPT 等）透過標準化介面調用外部工具。透過 XHuoAPI 提供的 Seedance MCP Server，你可以在 Claude Desktop、VS Code、Cursor 等 AI 用戶端中直接使用字節跳動 Seedance 生成 AI 視頻。

## 功能概覽

Seedance MCP Server 提供以下核心功能：

* **文本生成視頻** — 透過文本提示詞生成高品質視頻
* **圖片生成視頻** — 以圖片為參考生成視頻（首幀、末幀、參考圖等模式）
* **多模型支援** — 支援 Seedance 1.5 Pro、1.0 Pro、1.0 Lite 等多種模型
* **多種解析度** — 支援 480p、720p、1080p 多種解析度
* **多種畫面比例** — 支援 16:9、9:16、1:1、4:3、3:4、21:9 等比例
* **靈活時長** — 支援 2-12 秒的視頻時長
* **音訊生成** — 部分模型支援同時生成音訊
* **任務查詢** — 監控生成進度並獲取結果

## 前置準備

使用前，你需要取得 XHuoAPI API Token：

1. 註冊或登入 [XHuoAPI 平台](https://api.xhuoapi.ai)
2. 前往 [Seedance Videos API](https://api.xhuoapi.ai/documents/seedance-videos) 頁面
3. 點擊「Acquire」取得 API Token（首次申請贈送免費額度）

## 安裝配置

### 方式一：pip 安裝（推薦）

```bash theme={null}
pip install mcp-seedance
```

### 方式二：原始碼安裝

```bash theme={null}
git clone https://github.com/XHuoAPI/SeedanceMCP.git
cd SeedanceMCP
pip install -e .
```

安裝完成後，即可使用 `mcp-seedance` 命令啟動服務。

## 在 Claude Desktop 中使用

編輯 Claude Desktop 配置檔：

* **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
* **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

新增以下配置：

```json theme={null}
{
  "mcpServers": {
    "seedance": {
      "command": "mcp-seedance",
      "env": {
        "XHuoAPI_API_TOKEN": "你的API Token"
      }
    }
  }
}
```

如果使用 `uvx`（無需提前安裝套件）：

```json theme={null}
{
  "mcpServers": {
    "seedance": {
      "command": "uvx",
      "args": ["mcp-seedance"],
      "env": {
        "XHuoAPI_API_TOKEN": "你的API Token"
      }
    }
  }
}
```

儲存配置後重啟 Claude Desktop，即可在對話中使用 Seedance 相關工具。

## 在 VS Code / Cursor 中使用

在專案根目錄建立 `.vscode/mcp.json`：

```json theme={null}
{
  "servers": {
    "seedance": {
      "command": "mcp-seedance",
      "env": {
        "XHuoAPI_API_TOKEN": "你的API Token"
      }
    }
  }
}
```

或者使用 `uvx`：

```json theme={null}
{
  "servers": {
    "seedance": {
      "command": "uvx",
      "args": ["mcp-seedance"],
      "env": {
        "XHuoAPI_API_TOKEN": "你的API Token"
      }
    }
  }
}
```

## 可用工具列表

| 工具名                                  | 說明              |
| ------------------------------------ | --------------- |
| `seedance_generate_video`            | 透過文本提示詞生成視頻     |
| `seedance_generate_video_from_image` | 以圖片為參考生成視頻      |
| `seedance_get_task`                  | 查詢單個任務狀態        |
| `seedance_get_tasks_batch`           | 批量查詢任務狀態        |
| `seedance_list_models`               | 列出所有可用模型及其能力    |
| `seedance_list_resolutions`          | 列出可用解析度和畫面比例    |
| `seedance_list_actions`              | 列出所有可用工具和工作流程範例 |

## 使用示例

配置完成後，你可以在 AI 用戶端中直接用自然語言呼叫這些功能，例如：

* 「幫我用 Seedance 生成一段城市街頭延時攝影視頻」
* 「用這張照片作為第一幀，生成一段 8 秒的視頻」
* 「生成一段 1080p 直立螢幕 9:16 的短視頻」
* 「用 Seedance 1.5 Pro 模型生成帶音訊的視頻」

## 更多資訊

* GitHub 倉庫：[XHuoAPI/SeedanceMCP](https://github.com/XHuoAPI/SeedanceMCP)
* PyPI 套件：[mcp-seedance](https://pypi.org/project/mcp-seedance/)
* API 文件：[Seedance 視頻生成 API](https://api.xhuoapi.ai/documents/seedance)
