npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

openai-sora2-mcp-server

v1.1.1

Published

MCP Server for OpenAI Sora 2 Video Generation API

Readme

OpenAI Sora 2 MCP Server

Model Context Protocol (MCP) server for video generation using OpenAI Sora 2 API.

Features

  • Text-to-Video: Generate videos from text prompts
  • Image-to-Video: Animate images into videos
  • Remix: Modify existing videos with new prompts
  • Batch Processing: Execute multiple video generation jobs with concurrency control
  • Cost Estimation: Estimate costs before executing batch jobs

Requirements

  • Node.js 18.0.0 or higher
  • OpenAI API key with Tier 2+ access ($10+ credit purchase required for Sora)

Installation

npm install openai-sora2-mcp-server

Or clone and build locally:

git clone https://github.com/your-repo/openai-sora2-mcp-server.git
cd openai-sora2-mcp-server
npm install
npm run build

Configuration

Create a .env file in the project root:

OPENAI_API_KEY=sk-...
DEBUG=false
OUTPUT_DIR=./output
VIDEO_POLL_INTERVAL=15000
VIDEO_MAX_POLL_ATTEMPTS=120

Usage

MCP Server

Add to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "sora2": {
      "command": "npx",
      "args": ["sora2-mcp-server"],
      "env": {
        "OPENAI_API_KEY": "sk-..."
      }
    }
  }
}

Available Tools

generate_video

Generate a video from text prompt or image.

Parameters:
- prompt (required): Description of the video to generate
- model: "sora-2" (default) or "sora-2-pro"
- size: "1280x720" (default), "1920x1080", "1080x1920", etc.
- seconds: 4/8/12 for sora-2, 10/15/25 for sora-2-pro
- input_reference: Image URL or base64 for image-to-video
- output_path: Path to save the video file

remix_video

Remix an existing video with a new prompt.

Parameters:
- prompt (required): New description for the remixed video
- remix_video_id (required): ID of the video to remix
- output_path: Path to save the remixed video

get_video_status

Check the status of a video generation job.

Parameters:
- video_id (required): ID of the video to check

list_videos

List previously generated videos.

Parameters:
- limit: Maximum number of videos to return (default: 20)

Batch CLI

Execute multiple video generation jobs from a configuration file:

sora2-batch config.json [options]

Options

| Option | Description | |--------|-------------| | --output-dir <path> | Output directory for generated videos | | --format text\|json | Output format (default: text) | | --timeout <ms> | Total batch timeout in milliseconds | | --max-concurrent <n> | Maximum concurrent jobs (1-5, default: 2) | | --poll-interval <ms> | Polling interval (default: 15000) | | --estimate-only | Only estimate cost without executing | | --help | Show help |

Example

# Estimate cost
sora2-batch examples/batch-simple.json --estimate-only

# Execute batch
sora2-batch examples/batch-simple.json --output-dir ./output --max-concurrent 3

Batch Configuration

{
  "jobs": [
    {
      "prompt": "A cat playing piano in a jazz bar",
      "seconds": 8,
      "size": "1280x720"
    },
    {
      "prompt": "Ocean waves at sunset",
      "seconds": 4,
      "size": "1920x1080"
    }
  ],
  "output_dir": "./output",
  "max_concurrent": 2,
  "default_model": "sora-2",
  "default_size": "1280x720",
  "default_seconds": 4,
  "retry_policy": {
    "max_retries": 2,
    "retry_delay_ms": 1000,
    "retry_on_errors": ["rate_limit", "timeout", "429", "503"]
  }
}

Models and Pricing

sora-2 (Standard)

| Duration | Resolution | Price | |----------|------------|-------| | 4 sec | 720p | $0.40 | | 8 sec | 720p | $0.80 | | 12 sec | 720p | $1.20 |

sora-2-pro (High Quality)

| Duration | Resolution | Price | |----------|------------|-------| | 10 sec | 720p | $3.00 | | 15 sec | 720p | $4.50 | | 25 sec | 720p | $7.50 | | 10 sec | 1024p | $5.00 | | 25 sec | 1024p | $12.50 |

Supported Resolutions

| Aspect Ratio | Resolutions | |--------------|-------------| | 16:9 (Landscape) | 1920x1080, 1280x720 | | 9:16 (Portrait) | 1080x1920, 720x1280 | | 1:1 (Square) | 1080x1080, 480x480 |

API Reference

Endpoints

| Operation | Endpoint | |-----------|----------| | Generate Video | POST https://api.openai.com/v1/videos | | Remix Video | POST https://api.openai.com/v1/videos/{id}/remix | | Get Status | GET https://api.openai.com/v1/videos/{id} | | List Videos | GET https://api.openai.com/v1/videos | | Download | GET https://api.openai.com/v1/videos/{id}/content |

Video Status

| Status | Description | |--------|-------------| | queued | Waiting in queue | | in_progress | Currently processing | | completed | Generation finished | | failed | Generation failed | | cancelled | Job was cancelled |

License

MIT