DS

doriandarko/sora-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

208 stars 25 forks Качество 73 Тренд 17MIT

doriandarko/sora-mcp — это кандидат на сервер MCP, импортированный из https://github.com/doriandarko/sora-mcp.

Обзор

doriandarko/sora-mcp — это кандидат на сервер MCP, импортированный из https://github.com/doriandarko/sora-mcp.

Обзор (машинный перевод)

Сервер Model Context Protocol (MCP), интегрируемый с Sora 2 API OpenAI для генерации и ремикса видео.

Особенности

  • Создавать видео: генерировать видео из текстовых подсказок с помощью Sora 2
  • Ремикс-видео: Создавать вариации существующих видео с новыми подсказками
  • Статус видео: Проверка статуса и прогресса заданий по генерации видео

Предварительные требования

  • Node.js 18+
  • Ключ OpenAI API с доступом Sora
  • Совместимый с MCP клиент (Claude, Cursor, VS Code и др.)

Установка

  1. Клонировать репозиторий:

  2. Установка зависимостей:

  3. Постройте проект:

  4. Настройка для Claude Desktop:

  • Скопировать 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 Desktop

  • Транспорт: stdio (Стандартный вход/вывод)
  • Случай использования: Локальная коммуникация процессов

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

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

  1. Clone the repository:
git clone https://github.com/Doriandarko/sora-mcp
cd sora-mcp
  1. Install dependencies:
npm install
  1. Build the project:
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:

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.

Открыть полный README на GitHub

Установка

npx @modelcontextprotocol/inspector
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "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" } } } }