Sora 2 MCP Server
Enables 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.
README
Sora 2 MCP Server
Model Context Protocol (MCP) server for OpenAI's Sora 2 video generation API. Generate professional AI videos, merge clips, and create fade animations directly from Claude Code or any MCP-compatible client.
Features
- Video Generation: Create videos from text prompts using Sora 2 or Sora 2 Pro
- Video Merging: Concatenate multiple video files using FFmpeg
- Fade Animations: Create fade in/out/in-out effects from static images
- Status Monitoring: Monitor video generation progress in real-time
- Job Management: List and delete video generation jobs
- Flexible Parameters: Control resolution (720p to 4K), duration (4-12s), and model selection
Prerequisites
- Node.js 18+
- OpenAI API key with Sora 2 access
- Verified organization on OpenAI platform (required for Sora access)
- FFmpeg (optional, for video merging and fade animation features)
Installation
npm install -g sora-2-mcp-server
Or use with npx (no installation required):
npx sora-2-mcp-server
Configuration
Add to Claude Code
Add this server to your Claude Code MCP settings (~/.config/claude-code/mcp_settings.json):
{
"mcpServers": {
"sora-2": {
"command": "npx",
"args": ["-y", "sora-2-mcp-server"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key-here"
}
}
}
}
Or if installed globally:
{
"mcpServers": {
"sora-2": {
"command": "sora-2-mcp-server",
"env": {
"OPENAI_API_KEY": "your-openai-api-key-here"
}
}
}
}
Available Tools
1. create_video
Generate a video using Sora 2 or Sora 2 Pro.
Parameters:
prompt(required): Text description of the videomodel(optional): "sora-2" or "sora-2-pro" (default: "sora-2")size(optional): Resolution - "1280x720", "720x1280", "1792x1024", or "1024x1792" (default: "1280x720")seconds(optional): Duration - "4", "8", or "12" (default: "8")
Example:
{
"prompt": "A serene sunset over a mountain lake with gentle waves",
"model": "sora-2-pro",
"size": "1792x1024",
"seconds": "12"
}
2. get_video_status
Check the status of a video generation job.
Parameters:
video_id(required): ID of the video generation job
Example:
{
"video_id": "vid_abc123"
}
3. list_videos
List all video generation jobs.
Parameters:
limit(optional): Maximum number of videos to return (default: 20)after(optional): Cursor for pagination
Example:
{
"limit": 10
}
4. delete_video
Delete a video generation job.
Parameters:
video_id(required): ID of the video to delete
Example:
{
"video_id": "vid_abc123"
}
5. merge_videos
Concatenate multiple video files into a single seamless video using FFmpeg.
Parameters:
video_urls(required): Array of video file paths or URLs to merge (in order)output_path(optional): Path where the merged video will be saved (default: "merged_video.mp4")
Example:
{
"video_urls": [
"/path/to/intro.mp4",
"/path/to/main_content.mp4",
"/path/to/outro.mp4"
],
"output_path": "final_video.mp4"
}
Note: Requires FFmpeg to be installed on your system.
6. create_fade_animation
Transform static images into dynamic video clips with professional fade effects.
Parameters:
image_path(required): Path or URL to the input imageduration(optional): Duration of the fade animation in seconds (default: 3)output_path(optional): Path where the video will be saved (default: "fade_animation.mp4")fade_type(optional): Type of fade effect - "in", "out", or "in-out" (default: "in")
Example:
{
"image_path": "/path/to/logo.png",
"duration": 3,
"fade_type": "in-out",
"output_path": "logo_animation.mp4"
}
Fade types:
- "in": Fade from black to full visibility
- "out": Fade from full visibility to black
- "in-out": Fade in, hold, then fade out
Note: Requires FFmpeg to be installed on your system.
Usage with Claude Code
Once configured, you can use the Sora 2 tools directly in Claude Code:
Generate a video of a cat playing piano in a jazz club
Claude Code will automatically use the create_video tool to generate the video.
API Access Notes
- Sora 2 API requires organization verification at platform.openai.com/settings/organization/general
- After verification, it can take up to 15 minutes for access to propagate
- Pricing (as of 2025-10-09):
- Sora 2: $0.10-0.20/second
- Sora 2 Pro: $0.30-0.50/second
Development
# Watch mode for development
npm run watch
# Build for production
npm run build
Troubleshooting
"Organization not verified" error
- Go to platform.openai.com/settings/organization/general
- Click "Verify Organization"
- Wait up to 15 minutes for access to propagate
API endpoint errors
The Sora 2 API may still be in beta. Ensure your OpenAI account has access to the Sora 2 models through the web interface at sora.com before using the API.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。