
doriandarko/sora-mcp 是从 https://github.com/doriandarko/sora-mcp. 导入的 MCP 服务器候选服务器。
概览
doriandarko/sora-mcp 是从 https://github.com/doriandarko/sora-mcp. 导入的 MCP 服务器候选服务器。
概述(AI 翻译)
一款模型上下文协议(MCP)服务器,集成了OpenAI的Sora 2 API用于视频生成和重混。
特色
- 创建视频:使用Sora 2根据文本提示生成视频
- 混音视频:用新提示创建现有视频的变体
- 视频状态:检查视频生成作业的状态和进度
先修条件
- Node.js 18+
- OpenAI API密钥,带Sora访问
- 兼容MCP的客户端(Claude、光标、VS Code等)
安装
-
克隆仓库:
-
安装依赖:
-
建设项目:
-
配置 Claude 桌面:
- 将
claude_desktop_config.example.json复制到~/Library/Application Support/Claude/claude_desktop_config.json - 更新
args路径以匹配你的安装目录 - 将你的 OpenAI API 密钥添加到
OPENAI_API_KEY字段 - 可选地将
DOWNLOAD_DIR设置为您偏好的下载文件夹
服务器架构
该项目包含两种服务器实现,适用于不同的用例:
📱 stdio-server.ts - 为Claude桌面版
- 传输: 标准输入/输出(stdio)
- 用例: 本地进程通信
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Sora MCP Server
A Model Context Protocol (MCP) server that integrates with OpenAI’s Sora 2 API for video generation and remixing.
Features
- Create Videos: Generate videos from text prompts using Sora 2
- Remix Videos: Create variations of existing videos with new prompts
- Video Status: Check the status and progress of video generation jobs
Prerequisites
- Node.js 18+
- OpenAI API key with Sora access
- An MCP-compatible client (Claude, Cursor, VS Code, etc.)
Installation
- Clone the repository:
git clone https://github.com/Doriandarko/sora-mcp
cd sora-mcp
- Install dependencies:
npm install
- Build the project:
npm run build
- Configure for Claude Desktop:
- Copy
claude_desktop_config.example.jsonto~/Library/Application Support/Claude/claude_desktop_config.json - Update the
argspath to match your installation directory - Add your OpenAI API key to the
OPENAI_API_KEYfield - Optionally set
DOWNLOAD_DIRto your preferred download folder
- Copy
Server Architecture
This project includes two server implementations for different use cases:
📱 stdio-server.ts - For Claude Desktop
- Transport: stdio (Standard Input/Output)
- Use case: Local process communication
- How it works: Claude Desktop spawns this as a child process
- Benefits: Fast, secure, no network needed
- Used by: Claude Desktop
🌐 server.ts - For Remote Access
- Transport: HTTP/Streamable HTTP
- Use case: Remote clients, web-based tools
- How it works: Runs as HTTP server on port 3000
- Benefits: Network accessible, multiple clients
- Used by: MCP Inspector, VS Code, Cursor, browsers
Why two servers? Different MCP clients use different transports. This separation keeps the code clean and optimized for each transport type.
Usage
For Claude Desktop (stdio mode)
Claude Desktop will automatically start the server when configured. Just make sure:
- Your
.envfile has yourOPENAI_API_KEY - Restart Claude Desktop after updating the config
The config uses src/stdio-server.ts which communicates via stdio.
For HTTP Mode (MCP Inspector, web clients)
Run the server in development mode with auto-reload:
npm run dev
Or in production mode:
npm run build
npm start
Connecting to MCP Clients
Claude Desktop
The server is already configured!
Setup:
The configuration is at: ~/Library/Application Support/Claude/claude_desktop_config.json
It uses the compiled server and passes your API key via environment variables:
{
"mcpServers": {
"sora-server": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/sora-mcp/dist/stdio-server.js"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key-here",
"DOWNLOAD_DIR": "/Users/yourname/Downloads/sora"
}
}
}
}
See claude_desktop_config.example.json for a complete example.
安装
npx @modelcontextprotocol/inspector配置
{
"mcpServers": {
"sora-server": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/sora-mcp/dist/stdio-server.js"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key-here",
"DOWNLOAD_DIR": "/Users/yourname/Downloads/sora"
}
}
}
}