SoraMCP
SoraMCP
一个用于 AI 视频生成的 Model Context Protocol (MCP) 服务器,通过 AceDataCloud API 使用 Sora。
直接从 Claude、VS Code 或任何兼容 MCP 的客户端生成 AI 视频。
功能特性
文生视频 (Text-to-Video) - 根据文本描述生成视频
图生视频 (Image-to-Video) - 动画化图像并根据参考图创建视频
角色视频 (Character Videos) - 在不同场景中复用角色
异步生成 (Async Generation) - 用于生产工作流的 Webhook 回调
多种方向 (Multiple Orientations) - 横屏和竖屏视频
任务追踪 (Task Tracking) - 监控生成进度并获取结果
Related MCP server: Sora2 MCP
工具参考
工具 | 描述 |
| 使用 Sora 根据文本提示生成 AI 视频。 |
| 使用 Sora 根据参考图像生成 AI 视频(图生视频)。 |
| 生成包含参考视频中角色的 AI 视频。 |
| 异步生成 AI 视频并接收回调通知。 |
| 使用 Sora 第二版(合作伙伴通道)生成 AI 视频。 |
| 使用 Sora 第二版异步生成 AI 视频并接收回调。 |
| 查询视频生成任务的状态和结果。 |
| 同时查询多个视频生成任务。 |
| 列出所有可用的 Sora 模型及其功能。 |
| 列出所有可用的 Sora API 操作及对应工具。 |
快速入门
1. 获取您的 API Token
在 AceDataCloud 平台 注册
前往 API 文档页面
点击 “Acquire” 获取您的 API token
复制该 token 以供下方使用
2. 使用托管服务器(推荐)
AceDataCloud 托管了一个受管理的 MCP 服务器 —— 无需本地安装。
端点: https://sora.mcp.acedata.cloud/mcp
所有请求都需要 Bearer token。请使用第 1 步中的 API token。
Claude.ai
通过 OAuth 直接在 Claude.ai 上连接 —— 无需 API token:
前往 Claude.ai 设置 → 集成 → 添加更多
输入服务器 URL:
https://sora.mcp.acedata.cloud/mcp完成 OAuth 登录流程
开始在对话中使用这些工具
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 扩展,该扩展集成了所有 15 个 MCP 服务器,支持一键设置。
JetBrains IDEs
前往 设置 → 工具 → AI Assistant → Model Context Protocol (MCP)
点击 添加 → HTTP
粘贴:
{
"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 8000Claude 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 token 进行连接 —— 服务器会从每个请求的 Authorization 标头中提取 token。
可用工具
视频生成
工具 | 描述 |
| 根据文本提示生成视频 |
| 根据参考图像生成视频 |
| 生成包含参考视频中角色的视频 |
| 生成带有回调通知的视频 |
任务
工具 | 描述 |
| 查询单个任务状态 |
| 同时查询多个任务 |
信息
工具 | 描述 |
| 列出可用的 Sora 模型 |
| 列出可用的 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]可用模型
模型 | 最大时长 | 质量 | 功能 |
| 15 秒 | 良好 | 标准生成 |
| 25 秒 | 最佳 | 更高质量,更长视频 |
视频选项
尺寸:
small- 低分辨率,生成速度更快large- 高分辨率(推荐)
方向:
landscape- 16:9(YouTube,演示文稿)portrait- 9:16(TikTok,Instagram Stories)
时长:
10秒 - 所有模型15秒 - 所有模型25秒 - 仅限 sora-2-pro
配置
环境变量
变量 | 描述 | 默认值 |
| AceDataCloud 的 API token | 必需 |
| API 基础 URL |
|
| OAuth 客户端 ID(托管模式) | — |
| 平台基础 URL |
|
| 默认模型 |
|
| 默认视频尺寸 |
|
| 默认时长(秒) |
|
| 默认方向 |
|
| 请求超时(秒) |
|
| 日志级别 |
|
命令行选项
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.mdAPI 参考
此服务器封装了 AceDataCloud Sora API:
Sora Videos API - 视频生成
Sora Tasks API - 任务查询
贡献
欢迎贡献!请:
Fork 本仓库
创建功能分支 (
git checkout -b feature/amazing)提交更改 (
git commit -m 'Add amazing feature')推送到分支 (
git push origin feature/amazing)开启 Pull Request
许可证
MIT 许可证 - 详情请参阅 LICENSE。
链接
由 AceDataCloud 用心制作
Available Tools
10 toolssora_generate_videoAInspect
Generate an AI video from a text prompt using Sora.
This is the primary way to create videos - describe what you want and Sora
will generate a video matching your description.
Use this when:
- You want to generate a video from a text description
- You don't have reference images
- You want creative AI-generated video content
For image-to-video generation, use sora_generate_video_from_image instead.
For character-based video generation, use sora_generate_video_with_character.
Returns:
Task ID and generated video information including URLs and state.
Inputs: prompt (required), size, model, duration, +1 more. Returns: result
sora_generate_video_asyncAInspect
Generate an AI video asynchronously with callback notification.
This is useful for long-running video generation tasks. Instead of waiting
for the video to complete, you'll receive a callback at your specified URL
when the generation is finished.
Use this when:
- You don't want to wait for the generation to complete
- You have a webhook endpoint to receive results
- You're integrating with an async workflow
The callback will receive a POST request with the same response format
as the synchronous generation tools.
Returns:
Task ID that you can use to correlate with the callback.
Inputs: prompt (required), callback_url (required), size, model, +3 more. Returns: result
sora_generate_video_from_imageAInspect
Generate an AI video from reference images using Sora (Image-to-Video).
This allows you to animate or create videos based on provided images.
The AI will use the images as visual references for the generated video.
Use this when:
- You have reference images you want to animate
- You want the video to match a specific visual style
- You want to bring static images to life
Returns:
Task ID and generated video information including URLs and state.
Inputs: prompt (required), image_urls (required), size, model, +2 more. Returns: result
sora_generate_video_v2AInspect
Generate an AI video using Sora Version 2 (partner channel).
Version 2 offers shorter video durations (4/8/12 seconds) with
precise pixel-based resolution control. This is ideal for quick
video generation with specific resolution requirements.
Use this when:
- You need precise pixel resolution control (e.g., 1280x720)
- You want shorter videos (4, 8, or 12 seconds)
- You want to use the partner channel for generation
For longer videos (10-25 seconds) or character-based generation,
use the version 1 tools (sora_generate_video, etc.) instead.
Returns:
Task ID and generated video information including URLs and state.
Inputs: prompt (required), size, model, duration, +1 more. Returns: result
sora_generate_video_v2_asyncAInspect
Generate an AI video asynchronously using Sora Version 2 with callback.
Similar to sora_generate_video_v2 but returns immediately with a task ID.
The result will be POSTed to your callback URL when generation completes.
Use this when:
- You don't want to wait for the generation to complete
- You have a webhook endpoint to receive results
- You're integrating with an async workflow
Returns:
Task ID that you can use to correlate with the callback.
Inputs: prompt (required), callback_url (required), size, model, +2 more. Returns: result
sora_generate_video_with_characterAInspect
Generate an AI video featuring a character from a reference video.
This allows you to create new videos featuring a specific character
extracted from another video. The character will be placed in the
new scene described by the prompt.
IMPORTANT: The reference video must NOT contain real people.
Only animated or digital characters are supported.
Use this when:
- You want to reuse a character in different scenes
- You're creating a series with the same character
- You want consistent character appearance across videos
Returns:
Task ID and generated video information including URLs and state.
Inputs: prompt (required), character_url (required), size, model, +4 more. Returns: result
sora_get_taskAInspect
Query the status and result of a video generation task.
Use this to check if a generation is complete and retrieve the resulting
video URLs and metadata.
Use this when:
- You want to check if a generation has completed
- You need to retrieve video URLs from a previous generation
- You want to get the full details of a generated video
Task states:
- 'pending': Generation is still in progress
- 'succeeded': Generation finished successfully
- 'failed': Generation failed (check error message)
Returns:
Task status and generated video information including URLs and state.
Inputs: task_id (required). Returns: result
sora_get_tasks_batchAInspect
Query multiple video generation tasks at once.
Efficiently check the status of multiple tasks in a single request.
More efficient than calling sora_get_task multiple times.
Use this when:
- You have multiple pending generations to check
- You want to get status of several videos at once
- You're tracking a batch of generations
Returns:
Status and video information for all queried tasks.
Inputs: task_ids (required). Returns: result
sora_list_actionsAInspect
List all available Sora API actions and corresponding tools.
Reference guide for what each action does and which tool to use.
Helpful for understanding the full capabilities of the Sora MCP.
Returns:
Categorized list of all actions and their corresponding tools.
Inputs: no named parameters. Returns: result
sora_list_modelsAInspect
List all available Sora models and their capabilities.
Shows all available model versions with their limits, features, and
recommended use cases. Use this to understand which model to choose
for your video generation.
Returns:
Table of all models with their version, limits, and features.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each generation tool targets a distinct input method (text, image, character, v2) and synchronous/asynchronous modes are clearly separated. Descriptions explicitly note differences, so an agent can easily select the appropriate tool.
All tools follow a consistent sora_verb_noun pattern in snake_case (e.g., sora_generate_video, sora_get_task). The version suffixes (_v2) are appended uniformly, maintaining predictability.
With 10 tools, the set is well-scoped for a video generation service. It covers generation variants, status checks, and listing actions/models without being bloated or too sparse.
The tool surface covers generation, status retrieval (single and batch), and informational queries. A minor gap is the lack of a cancellation tool for pending tasks, but it's not critical for core workflows.
Maintenance
Related MCP Connectors
OpenAI Sora: Sora & Sora 2 (new social media like TikTok) API by ChatGPT creator OpenAI. Access.
AI image, video, music and speech generation: text-to-video, image-to-video, effects and upscaling.
Generate images, video, music, voice and 3D through one API. 30 tools, 200+ models.
Create talking-head videos, AI avatars, product photos, headshots, ad creatives, and face swaps.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceIntegrates with OpenAI's Sora 2 API to generate, remix, and manage AI-generated videos from text prompts. Supports video creation, status monitoring, downloading, and remixing through natural language commands.207MIT
- AlicenseAqualityDmaintenanceEnables programmatic creation, management, and remixing of AI-generated videos using OpenAI's Sora API. Supports video generation with customizable parameters, status monitoring, downloading, and video remixing capabilities.63MIT
- AlicenseAqualityDmaintenanceEnables video generation through OpenAI's Sora 2 API, allowing users to create, monitor, and manage AI-generated videos. It also provides tools for merging video clips and creating fade animations from static images using FFmpeg.610 npm2MIT
- AlicenseAqualityBmaintenanceGoogle Veo AI video generation with text-to-video, image-to-video, multi-image fusion, 1080p upscaling, and multiple quality/speed models.83MIT