Skip to main content
Glama
Primate Intelligence

Primate Intelligence

Official

@primate-intelligence/mcp

npm license

MCP (Model Context Protocol) server for the Primate Vision video analysis API — a video understanding API by Primate Intelligence (docs · llms.txt).

Gives AI agents video scene understanding as tools: register a video, ask a question in plain English, get a deterministic answer with a confidence score and clip timestamps. No hallucinated descriptions — the answer is yes / no / indeterminate with evidence.

Try it for free

A free test key requires no email, no card, no signup:

curl -X POST https://api.primateintelligence.ai/v1/sandbox

Your AI agent can do this for you — right from Claude. Point it at primateintelligence.ai/llms.txt and it can discover, provision, integrate, and self-verify with zero human steps.

Related MCP server: mcp-video-analyzer

Two ways to connect

Streamable HTTP endpoint with full OAuth 2.1 + Dynamic Client Registration + PKCE:

https://api.primateintelligence.ai/mcp

In Claude.ai / Claude Desktop: Settings → Connectors → Add custom connector, paste the URL, sign in. No API key handling — the OAuth flow issues and rotates tokens for you.

2. Local stdio server

// claude_desktop_config.json · .mcp.json · mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "primate-intelligence": {
      "command": "npx",
      "args": ["-y", "@primate-intelligence/mcp"],
      "env": { "PRIMATE_API_KEY": "pv_live_…" }
    }
  }
}

Tools

Tool

Does

Read-only

create_video_from_url

Register a video from a public https URL (POST /v1/videos)

—

create_analysis

Ask a question about a video (POST /v1/analyses)

—

validate_analysis

Dry-run a prompt: assessability + cost estimate, zero credits (validate_only: true)

✓

create_analysis_batch

2–10 prompts on one video; each after the first billed at 50% (POST /v1/analyses/batch)

—

get_analysis

Fetch analysis status/result (GET /v1/analyses/{id})

✓

wait_for_analysis

Poll until terminal state; returns { analysis, retry }

✓

list_models

List available models (GET /v1/models)

✓

get_usage

Credit balance + period meters (GET /v1/usage)

✓

get_credits

Balance + per-analysis transaction ledger (GET /v1/credits)

✓

get_test_fixture

Stable fixture for integration self-verification (GET /v1/test-fixture)

✓

Every tool carries MCP annotations (title, readOnlyHint, destructiveHint, idempotentHint, openWorldHint), declares an outputSchema, and returns structuredContent conforming to it. No tool deletes data. Tool descriptions and schemas mirror the OpenAPI document at GET /v1/openapi.json — the spec is the source of truth.

Typical agent flow

  1. get_test_fixture → verify the integration works (test keys return deterministic results, no quota burn)

  2. create_video_from_url with the video URL

  3. validate_analysis → confirm the prompt is assessable + preview estimated_cost_usd (free)

  4. create_analysis with the question — "Is there a person in this video?" — or create_analysis_batch for several

  5. wait_for_analysis → result.answer (yes | no | indeterminate) + result.confidence + result.clips + result.detected_count (count queries) + result.indeterminate_reason

  6. On insufficient_credits: call get_credits, report the balance + recent debits, point the human at billing

Security contract

The API key is read from the PRIMATE_API_KEY environment variable only. No tool accepts a key, token, or secret as an argument — so credentials never land in agent transcripts, tool-call logs, or model context. This is enforced by a unit test that fails the build if any tool schema grows a credential-shaped parameter.

Errors surface the machine-readable error code, a docs_url, and the request_id so an agent can self-correct without a human in the loop.

Configuration

Var

Required

Default

PRIMATE_API_KEY

yes

—

PRIMATE_BASE_URL

no

https://api.primateintelligence.ai

Development

npm install
npm test        # vitest — tool surface, security contract, polling, error shape
npm run build   # tsc → dist/

License

MIT © Primate AI, Inc.

Available Tools

10 tools
create_analysisAInspect

Ask a question about a video (POST /v1/analyses). Provide video_id (video_…) and a free-text prompt like "Is there a person in this video?". Analysis runs asynchronously — use wait_for_analysis to block until done. The result contains answer (yes|no|indeterminate), confidence (0-1), clip timestamps, detected_count (count queries), and indeterminate_reason. Recommended: call validate_analysis first to confirm the prompt is assessable and preview the cost before spending credits. For 2–10 prompts on the same video, use create_analysis_batch (each prompt after the first is billed at 50%).

Inputs: prompt (required), video_id (required), model, metadata. Returns: id, error, model, query, +18 more

create_analysis_batchAInspect

Run 2–10 prompts against the SAME video in one call (POST /v1/analyses/batch). Pricing: the first prompt is billed at full price, each additional prompt at 50% — always cheaper than separate create_analysis calls for multi-question workloads. Returns an analysis_batch with every analysis resource plus a pricing summary; poll each analysis id individually with get_analysis or wait_for_analysis. To check assessability of individual prompts first, use validate_analysis (free).

Inputs: prompts (required), video_id (required), model, metadata. Returns: id, object, pricing, analyses, +1 more

create_video_from_urlAInspect

Register a video from a public https URL for analysis (POST /v1/videos, URL-ingest mode). The API fetches the video asynchronously — the returned video starts in status "processing" and becomes "ready". Supports video/mp4 and video/quicktime, max 2 GiB. Returns the video resource with its id (video_…).

Inputs: url (required), metadata. Returns: id, fps, error, width, +13 more

get_analysisA
Read-only
Inspect

Fetch an analysis by id (GET /v1/analyses/{id}). While running, shows live progress and queue_position. When status is "completed": result.answer (yes|no|indeterminate), result.confidence (for count queries this is confidence in the count itself), result.clips, result.detected_count (count-intent queries only; 0 = assessable but nothing found), result.indeterminate_reason (low_confidence — retry with a more specific prompt; nothing_detected — genuinely empty; unsupported_query_form — rephrase as yes/no or count; duration_mismatch — result untrusted), and result.video_duration_s (null when duration could not be determined). usage is {billed_seconds, credit_balance_after} — an immutable post-settlement snapshot.

Inputs: analysis_id (required). Returns: id, error, model, query, +18 more

get_creditsA
Read-only
Inspect

Get the credit balance and transaction ledger for this API key (GET /v1/credits). Returns balance_seconds (the authoritative balance, in billable seconds), grant_seconds, used_seconds, and a paginated transaction list where each debit carries the analysis/stream id it came from (source_id, source_type). Use this to audit what each analysis cost, check the balance before a batch job, or diagnose an insufficient_credits error.

Inputs: limit, before. Returns: object, has_more, transactions, used_seconds, +2 more

get_test_fixtureA
Read-only
Inspect

Get the stable test fixture (GET /v1/test-fixture): a video URL + prompt + expected answer for verifying an integration end-to-end without burning quota. Test-mode (pv_test_) keys return deterministic canned results.

Inputs: no named parameters. Returns: fixtures, description

get_usageA
Read-only
Inspect

Get credit balance and period usage meters for the current API key (GET /v1/usage). Use this after an insufficient_credits error to report the balance. For the per-analysis transaction ledger (what each analysis cost, with source ids), use get_credits instead.

Inputs: no named parameters. Returns: meters

list_modelsA
Read-only
Inspect

List available analysis models (GET /v1/models) with status (stable | preview | deprecated) and capabilities. Use the model marked default:true unless you have a reason not to.

Inputs: no named parameters. Returns: data, object, has_more

validate_analysisA
Read-only
Inspect

Dry-run a prompt WITHOUT creating an analysis or spending credits (POST /v1/analyses with validate_only: true). Compiles the prompt and returns an analysis_preview: the compiled query, assessable (false means the model cannot score this query form — rephrase as a yes/no or count question), estimated_seconds, and estimated_cost_usd (both null when the video duration is not yet known). Recommended before create_analysis to catch unassessable prompts and preview cost.

Inputs: prompt (required), video_id (required), model. Returns: query, object, assessable, parse_mode, +3 more

wait_for_analysisA
Read-only
Inspect

Block until an analysis reaches a terminal state (completed | failed | canceled), polling GET /v1/analyses/{id}. Returns { analysis, retry }: retry is null when the analysis reached a terminal state, or carries timeout guidance when the wait expired (call again). Default timeout 120s (test-mode analyses complete in seconds). On completion, see get_analysis for the full result field semantics (detected_count, indeterminate_reason, nullable video_duration_s, usage snapshot).

Inputs: analysis_id (required), timeout_s. Returns: retry, analysis

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 10 tools

    Disambiguation4/5

    Most tools are clearly distinct: create_analysis vs create_analysis_batch, validate_analysis vs create_analysis, and get_analysis vs wait_for_analysis all have well-defined boundaries. The only potential confusion is between get_usage and get_credits, which both return credit balance, but their descriptions differentiate usage meters from transaction ledger.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern with lowercase and underscores. Verbs are limited to get, create, validate, wait_for, and list, and each noun is clear. There are no mixed conventions or stylistic deviations.

    Tool Count5/5

    With 10 tools, the server is well-scoped for a video analysis API. Each tool serves a distinct purpose in the workflow: video ingestion, analysis creation (single/batch), validation, polling, retrieval, model listing, credit management, and test fixture access. The count feels neither sparse nor bloated.

    Completeness3/5

    The core workflow (create video, validate prompt, create analysis, wait for result, fetch result) is covered, including batch and dry-run operations. However, there are notable gaps: no way to retrieve or delete a video by ID, no list of analyses, no cancellation for a running analysis, and no explicit check for video readiness before analysis creation. These gaps could cause agent failures in multi-step workflows.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    Appeared in Searches