mcpField
M
mcp-sora

mcp-sora

远程服务
sora.mcp.acedata.cloud媒体与设计01 周前更新

关于 mcp-sora

mcp-sora 是通过 AceDataCloud API 使用 Sora 生成视频的 MCP 服务,面向 MCP 客户端中的视频创作场景。该集成已退役,不再积极提供。

主要功能

  1. 01根据文本生成视频
  2. 02根据参考图生成视频
  3. 03在不同场景复用角色
  4. 04通过回调异步生成视频
  5. 05查询单个或批量任务
  6. 06查看模型与 API 操作

适用场景

  1. 01把文本描述转为视频
  2. 02为参考图添加动态效果
  3. 03在新场景中使用参考视频角色
  4. 04检查视频生成任务结果

MCP 相关

该 MCP 服务曾向兼容客户端提供 Sora 视频生成、任务查询、模型列表及操作列表工具,支持托管远程连接或本地运行。集成目前已退役,不再积极提供。

配置

远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。

服务地址https://sora.mcp.acedata.cloud/mcp
一键复制安装命令
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。

安装包
pypimcp-sora2026.10.8.0

工具

详细介绍

SoraMCP

PyPI version PyPI downloads Python 3.10+ License: MIT MCP

状态: 此 MCP 集成已停用,不再提供主动支持。

一个通过 AceDataCloud API 使用 Sora 生成 AI 视频的 Model Context Protocol (MCP) 服务。

可直接在 Claude、VS Code 或任何兼容 MCP 的客户端中生成 AI 视频。

功能

  • 文本生成视频 - 根据文本描述生成视频
  • 图像生成视频 - 将图像制作成动画,并根据参考图像创建视频
  • 角色视频 - 在不同场景中重复使用角色
  • 异步生成 - 通过 Webhook 回调支持生产工作流
  • 多种方向 - 横向和纵向视频
  • 任务跟踪 - 监控生成进度并获取结果

工具参考

工具描述
sora_generate_video使用 Sora 根据文本提示词生成 AI 视频。
sora_generate_video_from_image使用 Sora 根据参考图像生成 AI 视频(图像生成视频)。
sora_generate_video_with_character生成包含参考视频中角色的 AI 视频。
sora_generate_video_async异步生成 AI 视频,并通过回调通知。
sora_generate_video_v2使用 Sora Version 2(合作伙伴渠道)生成 AI 视频。
sora_generate_video_v2_async使用 Sora Version 2 异步生成 AI 视频,并通过回调通知。
sora_get_task查询视频生成任务的状态和结果。
sora_get_tasks_batch一次查询多个视频生成任务。
sora_list_models列出所有可用的 Sora 模型及其功能。
sora_list_actions列出所有可用的 Sora API 操作及对应工具。

快速开始

1. 获取 API 令牌
  1. 登录 AceDataCloud Platform
  2. 打开 Applications 并复制现有的 API 令牌
2. 使用托管服务(推荐)

AceDataCloud 托管了一个受管 MCP 服务——无需本地安装。

端点: https://sora.mcp.acedata.cloud/mcp

所有请求都需要 Bearer 令牌。请使用第 1 步获取的 API 令牌。

Claude.ai

通过 OAuth 直接在 Claude.ai 上连接——无需 API 令牌:

  1. 前往 Claude.ai 设置 → 集成 → 添加更多
  2. 输入服务 URL:https://sora.mcp.acedata.cloud/mcp
  3. 完成 OAuth 登录流程
  4. 开始在对话中使用这些工具
Claude Desktop

添加到配置文件(macOS 上的 ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "sora": {
      "type": "streamable-http",
      "url": "https://sora.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}
Cursor / Windsurf

添加到 MCP 配置(.cursor/mcp.json 或 .windsurf/mcp.json):

{
  "mcpServers": {
    "sora": {
      "type": "streamable-http",
      "url": "https://sora.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}
VS Code(Copilot)

添加到 VS Code MCP 配置(.vscode/mcp.json):

{
  "servers": {
    "sora": {
      "type": "streamable-http",
      "url": "https://sora.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

或者安装适用于 VS Code 的 Ace Data Cloud MCP 扩展,一键配置托管的 MCP 服务。

JetBrains IDE
  1. 前往 设置 → 工具 → AI 助手 → Model Context Protocol (MCP)
  2. 点击 添加 → HTTP
  3. 粘贴:
{
  "mcpServers": {
    "sora": {
      "url": "https://sora.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}
Claude Code

Claude Code 原生支持 MCP 服务:

claude mcp add sora --transport http https://sora.mcp.acedata.cloud/mcp \
  -h "Authorization: Bearer YOUR_API_TOKEN"

或者添加到项目的 .mcp.json:

{
  "mcpServers": {
    "sora": {
      "type": "streamable-http",
      "url": "https://sora.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}
Cline

添加到 Cline 的 MCP 设置(.cline/mcp_settings.json):

{
  "mcpServers": {
    "sora": {
      "type": "streamable-http",
      "url": "https://sora.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}
Amazon Q Developer

添加到 MCP 配置:

{
  "mcpServers": {
    "sora": {
      "type": "streamable-http",
      "url": "https://sora.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}
Roo Code

添加到 Roo Code MCP 设置中:

{
  "mcpServers": {
    "sora": {
      "type": "streamable-http",
      "url": "https://sora.mcp.acedata.cloud/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}
Continue.dev

添加到 .continue/config.yaml:

mcpServers:
  - name: sora
    type: streamable-http
    url: https://sora.mcp.acedata.cloud/mcp
    headers:
      Authorization: "Bearer YOUR_API_TOKEN"
Zed

添加到 Zed 的设置中(~/.config/zed/settings.json):

{
  "language_models": {
    "mcp_servers": {
      "sora": {
        "url": "https://sora.mcp.acedata.cloud/mcp",
        "headers": {
          "Authorization": "Bearer YOUR_API_TOKEN"
        }
      }
    }
  }
}
cURL 测试
# Health check (no auth required)
curl https://sora.mcp.acedata.cloud/health

# MCP initialize
curl -X POST https://sora.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-sora
# or
uvx mcp-sora

# Set your API token
export ACEDATACLOUD_API_TOKEN="your_token_here"

# Run (stdio mode for Claude Desktop / local clients)
mcp-sora

# Run (HTTP mode for remote access)
mcp-sora --transport http --port 8000
Claude Desktop(本地)
{
  "mcpServers": {
    "sora": {
      "command": "uvx",
      "args": ["mcp-sora"],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "your_token_here"
      }
    }
  }
}
Docker(自托管)
docker pull ghcr.io/acedatacloud/mcp-sora:latest
docker run -p 8000:8000 ghcr.io/acedatacloud/mcp-sora:latest

客户端使用自己的 Bearer 令牌连接——服务会从每个请求的 Authorization 标头中提取令牌。

可用工具

视频生成
工具描述
sora_generate_video根据文本提示词生成视频
sora_generate_video_from_image根据参考图像生成视频
sora_generate_video_with_character根据参考视频中的角色生成视频
sora_generate_video_async生成视频并通过回调通知
任务
工具描述
sora_get_task查询单个任务状态
sora_get_tasks_batch一次查询多个任务
信息
工具描述
sora_list_models列出可用的 Sora 模型
sora_list_actions列出可用的 API 操作

使用示例

根据提示词生成视频
User: Create a video of a sunset over mountains

Claude: I'll generate a sunset video for you.
[Calls sora_generate_video with prompt="A beautiful sunset over mountains..."]
根据图像生成
User: Animate this image of a city skyline

Claude: I'll bring this image to life.
[Calls sora_generate_video_from_image with image_urls and prompt]
基于角色的视频
User: Use the robot character in a new scene

Claude: I'll create a new scene with the robot character.
[Calls sora_generate_video_with_character with character_url and prompt]

可用模型

模型最长时长质量功能
sora-215 秒良好标准生成
sora-2-pro25 秒最佳更高质量、更长视频
视频选项

尺寸:

  • small - 分辨率较低,生成速度较快
  • large - 分辨率较高(推荐)

方向:

  • landscape - 16:9(YouTube、演示文稿)
  • portrait - 9:16(TikTok、Instagram 快拍)

时长:

  • 10 秒 - 所有模型
  • 15 秒 - 所有模型
  • 25 秒 - 仅 sora-2-pro

配置

环境变量
变量描述默认值
ACEDATACLOUD_API_TOKENAceDataCloud 提供的 API 令牌必填
ACEDATACLOUD_API_BASE_URLAPI 基础 URLhttps://api.acedata.cloud
ACEDATACLOUD_OAUTH_CLIENT_IDOAuth 客户端 ID(托管模式)—
ACEDATACLOUD_PLATFORM_BASE_URL平台基础 URLhttps://platform.acedata.cloud
SORA_DEFAULT_MODEL默认模型sora-2
SORA_DEFAULT_SIZE默认视频尺寸large
SORA_DEFAULT_DURATION默认时长(秒)15
SORA_DEFAULT_ORIENTATION默认方向landscape
SORA_REQUEST_TIMEOUT请求超时时间(秒)3600
LOG_LEVEL日志级别INFO
命令行选项
mcp-sora --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/SoraMCP.git
cd SoraMCP

# 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 tests/test_integration.py -m integration
代码质量
# Format code
ruff format .

# Lint code
ruff check .

# Type check
mypy core tools
构建与发布
# Install build dependencies
pip install -e ".[release]"

# Build package
python -m build

# Upload to PyPI
twine upload dist/*

项目结构

SoraMCP/
├── core/                   # Core modules
│   ├── __init__.py
│   ├── client.py          # HTTP client for Sora 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
│   ├── video_tools.py     # Video generation tools
│   ├── task_tools.py      # Task query tools
│   └── info_tools.py      # Information tools
├── prompts/                # MCP prompt templates
│   └── __init__.py
├── tests/                  # Test suite
│   ├── conftest.py
│   ├── test_client.py
│   ├── test_config.py
│   ├── test_integration.py
│   └── test_utils.py
├── deploy/                 # Deployment configs
│   └── production/
│       ├── deployment.yaml
│       ├── ingress.yaml
│       └── service.yaml
├── .env.example           # Environment template
├── .gitignore
├── CHANGELOG.md
├── Dockerfile             # Docker image for HTTP mode
├── docker-compose.yaml    # Docker Compose config
├── LICENSE
├── main.py                # Entry point
├── pyproject.toml         # Project configuration
└── README.md

贡献

欢迎贡献!请:

  1. Fork 此仓库
  2. 创建功能分支(git checkout -b feature/amazing)
  3. 提交更改(git commit -m 'Add amazing feature')
  4. 推送到该分支(git push origin feature/amazing)
  5. 发起 Pull Request

许可证

MIT License - 详情请参阅 LICENSE。

链接


由 AceDataCloud 倾情打造

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。