Niravi Docs
npm ↗ Get a key ↗

MCP for Claude

Connect Claude to your Niravi video corpus. Once added, Claude can search, recall, chat, and read every analysis on your videos, as native tools. Built on the Model Context Protocol; the tools are generated from the same OpenAPI spec as the SDKs, so they always track the API. Read-only: nothing in Niravi changes.

Two ways to add it

Remote connectorLocal (stdio)
Works inClaude web · desktop · mobile · Claude CodeClaude Desktop · Claude Code
Setuppaste a URL (Claude Code: one command)edit a config file (Claude Code: one command)
RequiresnothingNode.js installed
Best formost peoplesaving videos to your computer, advanced

Both are read-only in Niravi and scoped to the workspaces your API key can reach. Both serve the same 36 tools; the local server (@niravi/mcp 0.7.0) adds a 37th, download_video, which saves a video, or part of one, to your computer (Getting the video).

Step 1 · Get an API key

Go to web.niravi.io → Settings → API access → Create key → set scope to Read → copy the nv_… secret (it’s shown once).

Use a dedicated read-only key for Claude: you can revoke it any time from the same page.

In Claude: Settings → Connectors → Add custom connector, then fill in:

FieldWhat to enter
NameNiravi
Remote MCP server URLthe URL below (with your key)
OAuth Client ID (advanced, optional)leave blank
OAuth Client Secret (advanced, optional)leave blank

Copy this into the Remote MCP server URL field, replacing nv_YOUR_KEY_HERE:

https://mcp.niravi.io/?key=nv_YOUR_KEY_HERE

Click Add: the Niravi tools appear.

Why the key is in the URL: the connector dialog has no separate key field, so the key rides on the URL. Leave the OAuth fields empty (Niravi doesn’t use OAuth yet). Always use a read-only key here.

Set a default workspace (optional): append &workspace=<id>. Tools then use it when Claude names no workspace, search included: search covers only that workspace. Without it, search covers every workspace your key can read and the other tools use your key’s home workspace. Claude can name another workspace on any call (see Workspaces):

https://mcp.niravi.io/?key=nv_YOUR_KEY&workspace=YOUR_WORKSPACE_ID

Step 2 · Option B: Local (Claude Desktop)

Claude Desktop → Settings → Developer → Edit Config, and add:

{
  "mcpServers": {
    "niravi": {
      "command": "npx",
      "args": ["-y", "@niravi/mcp"],
      "env": { "NIRAVI_API_KEY": "nv_YOUR_KEY_HERE" }
    }
  }
}

Save and restart Claude Desktop. (Requires Node.js; the @niravi/mcp package is fetched automatically by npx. To pin this release, use "@niravi/mcp@0.7.0". To set a default workspace, search included, add "NIRAVI_WORKSPACE": "<id>" to env.)

Step 2 · Option C: Claude Code

One command adds Niravi to Claude Code for all your projects (-s user; leave it out to add it to the current project only). Replace nv_YOUR_KEY_HERE with your key.

Remote (nothing to install; the key travels in a header, not in the URL):

claude mcp add -s user --transport http niravi https://mcp.niravi.io -H "X-API-Key: nv_YOUR_KEY_HERE"

Local (requires Node.js):

claude mcp add -s user niravi -e NIRAVI_API_KEY=nv_YOUR_KEY_HERE -- npx -y @niravi/mcp

Check it with claude mcp list, or /mcp inside a Claude Code session.

Workspaces

A key can read more than one workspace: its home workspace, plus the demos and the workspaces it was granted under Settings → API access. The list_workspaces tool lists them.

  • Search covers all of them. search runs across every workspace your key can read and merges the hits into one ranked list. Each hit names its workspace_id. If you set a default workspace (&workspace= on the remote URL, NIRAVI_WORKSPACE locally), search covers only that one.
  • Every other tool reads one workspace, and takes workspace. Opening a hit (its details, transcript, scenes, faces, or a question about it) needs the hit’s workspace, so Claude passes the hit’s workspace_id as workspace. The tool descriptions and search results tell it to. Without workspace, a tool reads the default workspace: the one you set, else your key’s home.
  • Name a workspace on any call: on search, workspace searches only that one, over any default.

Getting the video

  • video_media (both servers) returns a signed link to the source file, valid for 24 hours.
  • download_video (local server only: the remote connector has no disk to save to) saves the video to your computer: the whole file, or the part between start and end seconds. It takes workspace like every other tool.
    • Where: out if Claude gives a path, else NIRAVI_DOWNLOAD_DIR, else ~/Downloads/niravi/, named <video_id>.<ext> or <video_id>_<start>-<end>.<ext>.
    • A part needs ffmpeg on your PATH; only that stretch downloads. The whole file needs no ffmpeg.
    • Fast cut by default: the part starts on the keyframe at or before start, so it can begin a few seconds early. The result’s seconds says how long the file really is. accurate: true re-encodes (H.264/AAC) for a cut on the exact frame; it takes longer.
    • Claude may ask before running it, since it writes a file. It changes nothing in Niravi.

Try it

Ask Claude things like:

  • “Search all my Niravi workspaces for a crowd cheering, and tell me which workspace each hit is in.”
  • “Open the top hit, read its transcript, and summarize what is said around that moment.”
  • “Which of my workspaces has a press conference? Ask the best match who is speaking.”
  • “Save the 30 seconds around that moment to my computer.” (local server)

The tools (@niravi/mcp 0.7.0: 36 read-only, plus download_video on the local server)

GroupTools
Searchsearch (every workspace your key can read, or only the default workspace when you set one; hits merged into one ranked list and each tagged with its workspace_id; workspace narrows it to one, workspace_ids to several; engine and moments_per_video as on /search), magic_search (character / location / music / emotion, one workspace at a time), list_engines
Chat & recallchat, recall_ask (answers carry citations)
Videoslist_videos, get_video (a summary with counts; full: true for everything), frame, video_media (a 24 h link to the file), download_video (local server: save it, whole or a part)
Analysistranscript, scenes, shots, faces, characters, speakers, sounds, sound_events, audio_segments, music_tracks, get_regions, get_page
Peoplelist_people, get_person
Exportsscreenplay, storyboard, subtitles_srt, subtitles_vtt
Flags & interrogationvideo_flags, video_interrogation, flags_feed
Generation (read)niravo_stock_search, niravo_video_job
Accountlist_workspaces (what the key can reach), me, health, get_index_options

Every tool takes an optional workspace (Workspaces). The remote connector serves all of them except download_video. The .nmap download is a file, so it has no tool: use the SDKs or HTTP.

Every call is limited to the workspaces your key can reach. Writes (upload/delete) are intentionally excluded.

Troubleshooting

  • No tools show up → check the URL has ?key=nv_… (Claude Code: the X-API-Key header) and the key is active (Settings → API access).
  • “No API key” in a tool result → the ?key= is missing or empty.
  • “Video not found” for a search hit → the hit is in another workspace and the call did not name it. The error tells Claude to pass the hit’s workspace_id and try again. A local server older than 0.6.0 has no workspace argument: pin @niravi/mcp@0.7.0 in its config and restart Claude.
  • “ffmpeg is not on PATH” from download_video → a part needs ffmpeg (macOS: brew install ffmpeg), then restart Claude. The whole file needs none.
  • A saved part is longer than asked → the fast cut starts on a keyframe. Ask for accurate: true for an exact cut.
  • No download_video → it is on the local server only, from 0.7.0. On the remote connector, video_media gives a link to the file.
  • A result says it was cut (truncated) → every result is capped at about 60,000 characters so one call cannot fill the conversation. The note says how many items were left out and which tool or arguments reach them: offset on paged lists, start_time / end_time on sounds, or search with the video_id and recall_ask for a moment late in a long video. get_video without full gives the counts.
  • A workspace is missing from search → list_workspaces shows what the key can read; grant more under Settings → API access.
  • A search times out → rare; searches can be slow on a cold corpus. Retry.