Sora MCP 服务器 logo

Sora MCP 服务器

Community
Doriandarko

An MCP server to use Sora video generation APIs

PublisherDoriandarko
Repositorysora-mcp
LanguageTypeScript
Forks
26
Stars
211
Available tools
0
Transport typestdio, streamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Sora MCP 服务器 exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    211 stars and 26 forks from the linked repository.

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

  1. Clone the repository:
bash
git clone https://github.com/Doriandarko/sora-mcp
cd sora-mcp
  1. Install dependencies:
bash
npm install
  1. Build the project:
bash
npm run build
  1. Configure for Claude Desktop:
    • Copy claude_desktop_config.example.json to ~/Library/Application Support/Claude/claude_desktop_config.json
    • Update the args path to match your installation directory
    • Add your OpenAI API key to the OPENAI_API_KEY field
    • Optionally set DOWNLOAD_DIR to your preferred download folder

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:

  1. Your .env file has your OPENAI_API_KEY
  2. 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:

bash
npm run dev

Or in production mode:

bash
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:

json
{
  "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.

Environment Variables:

  • OPENAI_API_KEY (required) - Your OpenAI API key
  • DOWNLOAD_DIR (optional) - Custom download folder (defaults to ~/Downloads)

To use:

  1. Restart Claude Desktop (Cmd+Q then relaunch)
  2. The Sora tools will appear automatically!

MCP Inspector (for testing)

Test your server with the MCP Inspector:

bash
npx @modelcontextprotocol/inspector

Then connect to: http://localhost:3000/mcp

Claude Code

bash
claude mcp add --transport http sora-server http://localhost:3000/mcp

VS Code

bash
code --add-mcp '{"name":"sora-server","type":"http","url":"http://localhost:3000/mcp"}'

Cursor

Add to your Cursor MCP settings with stdio transport (similar to Claude Desktop configuration above).

Available Tools

create-video

Generate a video from a text prompt.

Parameters:

  • prompt (required): Text description of the video to generate
  • model (optional): Model to use (default: "sora-2")
  • seconds (optional): Video duration in seconds (default: "4")
  • size (optional): Resolution as "widthxheight" (default: "720x1280")
  • input_reference (optional): Path to reference image/video

Example:

javascript
{
  "prompt": "A calico cat playing a piano on stage",
  "model": "sora-2",
  "seconds": "8",
  "size": "1024x1808"
}

get-video-status

Check the status and progress of a video generation job.

Parameters:

  • video_id (required): ID of the video to check

Example:

javascript
{
  "video_id": "video_123"
}

Returns: Video status including progress (0-100), status (queued/processing/completed), and completion timestamps.

list-videos

List all your video generation jobs with pagination.

Parameters:

  • limit (optional): Number of videos to retrieve (default: 20)
  • after (optional): Pagination cursor - get videos after this ID
  • order (optional): Sort order "asc" or "desc" (default: "desc")

Example:

javascript
{
  "limit": 10,
  "order": "desc"
}

download-video

Get a curl command to manually download a completed video.

Parameters:

  • video_id (required): ID of the video to download
  • variant (optional): Which format to download (defaults to MP4)

Example:

javascript
{
  "video_id": "video_123"
}

Returns: Ready-to-use curl command with authentication for downloading the video.

save-video ⭐ (Auto-Download)

Automatically download and save a completed video to your computer.

Parameters:

  • video_id (required): ID of the video to save
  • output_path (optional): Directory to save to (defaults to ~/Downloads)
  • filename (optional): Custom filename (defaults to video_id.mp4)

Example:

javascript
{
  "video_id": "video_123",
  "filename": "my-cat-video.mp4"
}

Returns: File path where video was saved. No manual commands needed!

remix-video

Create a remix of an existing video with a new prompt.

Parameters:

  • video_id (required): ID of the completed video to remix
  • prompt (required): New text prompt for the remix

Example:

javascript
{
  "video_id": "video_123",
  "prompt": "Extend the scene with the cat taking a bow to the cheering audience"
}

delete-video

Delete a video job and its assets.

Parameters:

  • video_id (required): ID of the video to delete

Example:

javascript
{
  "video_id": "video_123"
}

Typical Workflow

  1. Create a video → Get back a video_id

    "Create a video of a sunset over mountains"
  2. Check status → Monitor progress

    "Check the status of video video_123"
  3. Save when ready → Auto-download the video file

    "Save video video_123"

    Claude will automatically download it to your Downloads folder!

  4. Clean up → Delete old videos

    "Delete video video_123"

API Response Format

Video Job Response

json
{
  "id": "video_123",
  "object": "video",
  "model": "sora-2",
  "status": "queued",
  "progress": 0,
  "created_at": 1712697600,
  "size": "1024x1808",
  "seconds": "8",
  "quality": "standard"
}

Remix Response

json
{
  "id": "video_456",
  "object": "video",
  "model": "sora-2",
  "status": "queued",
  "progress": 0,
  "created_at": 1712698600,
  "size": "720x1280",
  "seconds": "8",
  "remixed_from_video_id": "video_123"
}

Error Handling

The server includes comprehensive error handling:

  • Missing API key validation on startup
  • API error responses with detailed messages
  • Graceful error returns in tool responses

Development

Project Structure

sora-mcp/
├── src/
│   └── server.ts       # Main server implementation
├── dist/               # Compiled JavaScript (generated)
├── package.json        # Dependencies and scripts
├── tsconfig.json       # TypeScript configuration
├── .env               # Environment variables (not in git)
└── README.md          # This file

Scripts

  • npm run dev - Run in development mode with tsx
  • npm run build - Compile TypeScript to JavaScript
  • npm start - Run compiled JavaScript

Environment Variables

  • OPENAI_API_KEY (required) - Your OpenAI API key
  • PORT (optional) - Server port (default: 3000)

License

MIT

Resources

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "doriandarko-sora-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sora-mcp-server"
      ]
    }
  }
}

Use Sora MCP 服务器 MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Sora MCP 服务器 is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Sora MCP 服务器 as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Sora MCP 服务器 MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "doriandarko-sora-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "sora-mcp-server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Sora MCP 服务器 MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Sora MCP 服务器 MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Sora MCP 服务器 to help me with this task?
Sora MCP 服务器
Sure. I read it.
Here is what I found using Sora MCP 服务器.

Option 2: Add an MCP server URL

Use this when Sora MCP 服务器 is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter your server URL in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste your server URL into the Server URL field.
  2. Enter a connection name for Sora MCP 服务器.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the Sora MCP 服务器 connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the Sora MCP 服务器 tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the Sora MCP 服务器 tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Sora MCP 服务器 to help me with this task?
Sora MCP 服务器
Sure. I read it.
Here is what I found using Sora MCP 服务器.

Frequently asked questions

What is the Sora MCP 服务器 MCP server used for?

Sora MCP 服务器 is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Sora MCP 服务器 MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Sora MCP 服务器 with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Sora MCP 服务器 MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Sora MCP 服务器 connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Sora MCP 服务器 MCP to TypingMind?

Sora MCP 服务器 can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does Sora MCP 服务器 MCP provide in TypingMind?

Sora MCP 服务器 exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Sora MCP 服务器 MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Sora MCP 服务器 requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇