Skip to main content

MCP server for NarrateAI - get timed transcript from silent video

Project description

NarrateAI MCP Server

MCP server that exposes NarrateAI's video-to-transcript flow as a tool. Upload a silent video (via URL), run frame analysis + workflow understanding + transcription, and get back a timed transcript with segments.

No changes to the main app. This is a standalone MCP server that calls your existing NarrateAI API.

Prerequisites

  1. NarrateAI app running — Backend (FastAPI) must be running, e.g. uv run python main.py or your production URL.
  2. API key — Create one in the NarrateAI web app (Settings → API Keys).
  3. Video URL — A public URL to an MP4 (e.g. S3 signed URL, GitHub raw, etc.).

Install

From the project root:

cd mcp-server
uv sync

Run locally (stdio)

cd mcp-server
NARRATEAI_API_KEY=your_key_here NARRATEAI_API_BASE_URL=http://localhost:8000 uv run python -m narrateai_mcp

Stdin/stdout are used for MCP protocol, so you won't see interactive output. Use this via Cursor or another MCP client.

Cursor setup

  1. Add your API key to .cursor/mcp.json (replace the empty NARRATEAI_API_KEY; avoid committing real keys):

    {
      "mcpServers": {
        "narrateai": {
          "command": "uv",
          "args": ["run", "-C", "mcp-server", "python", "-m", "narrateai_mcp"],
          "env": {
            "NARRATEAI_API_BASE_URL": "http://localhost:8000",
            "NARRATEAI_API_KEY": "demo_sk_live_xxxx"
          }
        }
      }
    }
    
  2. If your app runs elsewhere, set NARRATEAI_API_BASE_URL to that URL (e.g. https://api.narrateai.app).

  3. Restart Cursor completely (quit and reopen).

  4. In Cursor, the tools will appear. You can ask, e.g.:

Tool: transcribe_video

Transcription only: video with existing voice → speech-to-text → timed transcript. No translation.

Argument Type Description
video_source string Public URL or local file path of the video.
source_language string REQUIRED. Language of the speech (en, es, fr, zh, etc.). Ask user if not specified.
api_key string (Optional) API key. Defaults to NARRATEAI_API_KEY env var.

Returns: JSON with job_id. Poll get_job_result(job_id) until status is transcript_ready.

Tool: translate_video

Translation (new upload): video with voice → transcribe → translate → translated transcript.

Argument Type Description
video_source string Public URL or local file path.
source_language string REQUIRED. Language of the speech.
target_language string REQUIRED. Language to translate to.
api_key string (Optional) API key.

Returns: JSON with job_id. Poll get_job_result(job_id) until transcript_ready.

Tool: translate_existing_video

Translation (existing video): Translate transcript of a video already in the user's library. Sync – returns immediately.

Argument Type Description
job_id string Job ID of the completed video (from user's library).
source_language string REQUIRED. Language of the current transcript.
target_language string REQUIRED. Language to translate to.
api_key string (Optional) API key.

Returns: JSON with transcript, total_duration, total_words.

Tool: dub_video_full

Full auto-dubbing: transcribe → translate → extract speaker voice → TTS with cloned voice → dubbed video. No refinement screen.

Argument Type Description
video_source string Public URL or local file path.
source_language string REQUIRED. Language of the speech.
target_language string REQUIRED. Language to dub into.
preserve_background_music boolean REQUIRED. Ask user: keep background music (true) or not (false).
api_key string (Optional) API key.

Returns: JSON with job_id. Poll get_job_result(job_id) until status is completed, then video_url has the dubbed video.

Tool: narrate_video_transcript

Argument Type Description
video_url string Public URL of the video (MP4).
api_key string (Optional) API key. Defaults to NARRATEAI_API_KEY env var.
language string Language code (en, es, fr, de, etc.). Default: en.
max_wait_seconds float Max time to wait for transcript. Default: 600.

Returns: JSON with transcript (timed segments), workflow_understanding, visual_timeline, total_duration, total_words.

Output format (transcript segments)

Each segment has:

  • start_time, end_time (seconds)
  • text — narration for that segment
  • duration, pause_duration, chunk_type, segment_id

Troubleshooting

  • "API key required" — Set NARRATEAI_API_KEY in env or pass api_key to the tool.
  • "Temporary redirect service not available" — Backend must have USE_TEMP_REDIRECTS and GCS configured.
  • "Transcript not ready" / timeout — Video may be long or processing slow. Try a shorter clip or raise max_wait_seconds.
  • 429 / rate limit — Check your subscription tier and daily API limits in NarrateAI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

narrateai_mcp-0.4.3.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

narrateai_mcp-0.4.3-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file narrateai_mcp-0.4.3.tar.gz.

File metadata

  • Download URL: narrateai_mcp-0.4.3.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for narrateai_mcp-0.4.3.tar.gz
Algorithm Hash digest
SHA256 bf10ff0bce5986aff3c62e674ec28df2fdc6f40ea9bdb2aad29c0630268d3a56
MD5 a6a1e8cac7fd89d941d804b5078ea15c
BLAKE2b-256 ae2256eae137c67ba287336b59fbf7f33168d7496e6029338c199d4b3ce03f4e

See more details on using hashes here.

File details

Details for the file narrateai_mcp-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: narrateai_mcp-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for narrateai_mcp-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c7943279f1c41f7abe8095de7e87566f793c887e7b448b370a751b8b739b1320
MD5 df2448d5499138d7509e59fae10d1f05
BLAKE2b-256 5f5b2a5bfe9292e2a92c77b62b1bb50997aa6c9bc985c0a9c33d736c8bfaae0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page