Skip to main content
Glama

Exa Ultra MCP

A 100% local, offline-built stdio MCP server and universal AI agent skill for the full Exa API.

  • Covers every Exa surface on the free plan: search (all types), contents, find-similar, answer, Agent runs, Monitors.

  • Runs locally over stdio (node dist/index.js). No remote MCP relay or third-party host sees your queries or API keys—requests go directly from your machine to https://api.exa.ai.

  • Quality modes: fast, auto (Exa standard), and max (highest the free plan allows). Set one server-wide, or pass one per call.

  • Pool of API keys with failover. On 401/402/429/5xx, timeouts, or malformed responses, the call automatically fails over to the next healthy key. Bad requests (400) are rejected without retrying.

  • Budget guard & shared cross-process state. Every session on your machine shares monthly spend ($10/key default), cooldowns, reservations, and active mode.

  • Private key hygiene. Auto-discovers ~/.config/exa-ultra/keys (chmod 600), supports plain text or JSON key files, filters placeholder tokens, warns on loose file permissions, redacts keys from all errors, and includes an offline $0-credit --doctor check.

AI Agents (Antigravity, Claude Code, Codex, Cursor, Windsurf, OpenCode, Cline, Roo, Copilot, OpenBot): Read AGENTS.md and skills/exa-ultra/SKILL.md for local offline installation, private key rules, and tool usage.


Quick Start (Offline Build + Private Keys)

Requires Node.js >= 20.6:

git clone https://github.com/chocowarsky/exa-ultra-mcp.git
cd exa-ultra-mcp
npm install            # installs dependencies and compiles dist/

Create your private key file outside the repo (chmod 600). Paste one or more keys from https://dashboard.exa.ai/api-keys (one per line, comma-separated, or JSON ["k1", "k2"]):

mkdir -p ~/.config/exa-ultra
install -m 600 /dev/null ~/.config/exa-ultra/keys
$EDITOR ~/.config/exa-ultra/keys

Verify readiness 100% offline ($0 credits spent):

node dist/index.js --doctor --json

Related MCP server: mcp-exa

Install Across Every AI Agent Harness

Agent Skill Discovery (skills.sh / Claude Code / Antigravity)

# Universal Agent Skills CLI (30+ harnesses)
npx skills add chocowarsky/exa-ultra-mcp

MCP Client Registration

Because ~/.config/exa-ultra/keys is auto-discovered, standard stdio MCP registration is simply:

{
  "mcpServers": {
    "exa-ultra": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/exa-ultra-mcp/dist/index.js"]
    }
  }
}

(Pass "--keys-file=/ABSOLUTE/PATH/keys" as a second argument if you store your key file at a custom location. Leading ~/ is automatically expanded.)

Ready-to-use templates for every client live in examples/:


Key Discovery & Security Rules

Keys are merged and deduplicated from these sources (never committed to git, never printed in logs or chat):

  1. --keys-file=PATH or --keys-file PATH (supports ~/)

  2. EXA_API_KEYS_FILE env var (supports ~/)

  3. EXA_API_KEYS (comma/newline-separated) or EXA_API_KEY env var

  4. Auto-discovered default private files when no explicit key source is given:

    • $XDG_CONFIG_HOME/exa-ultra/keys (default ~/.config/exa-ultra/keys)

    • $XDG_CONFIG_HOME/exa-ultra/keys.txt

    • $XDG_CONFIG_HOME/exa-ultra/keys.json


Modes

Mode

exa_search / exa_find_similar

exa_agent_run

Typical use

fast

lite: under 1 s, $0.004

minimal: $0.012

Autocomplete, tight agent loops

auto

auto: about 2 s, $0.007

low: $0.025

Exa's standard defaults

max (default)

deep-reasoning: 7–20 s, $0.015

ultra: usage-based, capped at EXA_AGENT_MAX_COST ($1)

Best quality on the free plan

Precedence: explicit type/effort → per-call mode → saved server mode (exa_mode) → --mode= / EXA_MODE.


Tools

Tool

Exa endpoint

Notes

exa_search

POST /search

All types, filters, objective, systemPrompt, outputSchema, contents options, Snapshot

exa_contents

POST /contents

text, highlights or summary; live crawl, subpages, links/images, Snapshot

exa_find_similar

/contents + /search

Replaces the deprecated /findSimilar

exa_answer

POST /answer

Cited answer, optional schema

exa_agent_run / exa_agent_get / exa_agent_manage

/agent/runs

Create, wait, follow-up, list, events, cancel, delete

exa_monitor

/monitors

Off by default (EXA_ENABLE_MONITORS=1), needs a public webhook

exa_mode

local

Show or set the server mode

exa_keys_status

local

Key health, cooldowns, spend, reservations; action=reset

Resources: exa://keys/status, exa://modes. Prompt: exa_research.


Configuration

Every setting is optional except the keys.

Variable / Flag

Default

Meaning

EXA_API_KEYS_FILE / --keys-file

~/.config/exa-ultra/keys (auto)

Private file with keys (plain text with # comments, or JSON); supports ~/

EXA_API_KEYS / EXA_API_KEY

—

Keys in the environment (comma or newline separated)

EXA_MODE / --mode

max

fast, auto or max

EXA_AGENT_MAX_COST

1

Cap per auto/ultra agent run, in USD (1–100)

EXA_AGENT_WAIT_SECONDS

120

How long exa_agent_run waits before returning the run id

EXA_MONTHLY_BUDGET_PER_KEY

10

USD per key per month

EXA_BUDGET_MARGIN

0.05

Stop using a key this many USD before its budget

EXA_KEY_STRATEGY

round-robin

round-robin, priority or least-used

EXA_QPS_PER_KEY

10

Requests per second per key (free plan: 10); 0 = no limit

EXA_TIMEOUT_MS

60000

Timeout of one HTTP attempt

EXA_MAX_ATTEMPTS

5

Keys tried per call

EXA_MAX_CHARS

8000

Default cap on the text returned to the model

EXA_CACHE_TTL_SECONDS / EXA_CACHE_MAX

600 / 200

In-memory cache of identical calls

EXA_ENABLE_AGENT / EXA_ENABLE_MONITORS

1 / 0

Turn tool groups on or off

EXA_STATE_DIR

~/.local/state/exa-ultra-mcp

Shared state: sha256 fingerprints, spend, mode. Never raw keys

EXA_BASE_URL

https://api.exa.ai

For proxies or tests


Failover Rules

Exa answer

What happens to the key

Retried on another key

401 / 403

Disabled for 6 h

✓

403 "plan doesn't include …"

Nothing; the key is fine

— (every key on the plan would answer the same)

402, or 429 about credits

Disabled until next month

✓

429 rate limit

Cooldown (Retry-After or backoff, max 2 min)

✓

5xx, 408, timeout, network error, 200 with a non-JSON body

Cooldown with backoff

✓

400 / 404 / 422

Nothing

— (the request itself is wrong)


Development, Testing & Security

npm run build           # compile TypeScript to dist/
npm test                # run offline unit + CLI --doctor tests
npm run check:secrets   # scan tracked files (and --history) for leaked keys/UUIDs
  • Never commit keys. .gitignore blocks common key files, and npm run check:secrets (enforced in GitHub Actions CI) fails on anything resembling a key—including UUIDs, the format Exa uses.

  • The shared state file (~/.local/state/exa-ultra-mcp/keys.json) stores sha256 fingerprints and the last 4 characters only (0600), never raw keys.

License

MIT

Available Tools

9 tools
exa_agent_getExa Agent run status/resultA

Get an Exa Agent run by id; with wait=true, keep polling until it finishes or waitSeconds pass.

Inputs: id (required), raw, wait, noCache, +2 more.

exa_agent_manageExa Agent runs: list, events, cancel, deleteC

list = recent runs on every key · events = lifecycle events of a run · cancel = stop a running run · delete = remove a run.

Inputs: action (required), id, limit, cursor.

exa_agent_runExa Agent research runA

Async multi-step Exa Agent run (deep research): list-building, enrichment of rows, multi-hop research, structured JSON with citations. Not for simple lookups (use exa_search or exa_answer). Effort comes from the mode unless you set it: fast = minimal ($0.012) · auto = low ($0.025) · max = ultra (usage-based, capped at $1/run). Waits up to waitSeconds (default 120); if still running, returns the run id for exa_agent_get.

Inputs: query (required), raw, mode, wait, +10 more.

exa_answerExa grounded answerA

Ask a question; Exa searches and writes a short cited answer itself ($0.005). Good for quick facts. For research where you read the sources yourself, use exa_search.

Inputs: query (required), raw, text, noCache, +4 more.

exa_contentsExa get page contentsA

Get clean content of known URLs (no search). Default returns page text. Supports live crawl (maxAgeHours 0), subpage crawling, link/image extraction, and Exa Snapshot (paid plans). Failed URLs are listed; the call fails only when every URL failed.

Inputs: urls (required), raw, links, content, +12 more.

exa_find_similarExa find similar pagesA

Find pages similar to a seed URL (competitors, alternatives, related papers). Reads the seed page, then runs a semantic search built from it. Replaces Exa's deprecated /findSimilar. Search type follows the mode like exa_search.

Inputs: url (required), raw, mode, type, +6 more.

exa_keys_statusExa key pool statusA

Show health, cooldowns, requests and tracked spend of each Exa key (keys shown as last 4 chars only). action=reset clears cooldowns and disables.

Inputs: alias, action.

exa_modeExa Ultra modeA

Show or set the server-wide quality mode used when a call sets no type/effort: fast = Lowest latency and cost: lite search (<1 s, $0.004), agent effort minimal ($0.012). auto = Exa's standard defaults: auto search (~2 s, $0.007), agent effort low ($0.025). max = Highest quality the free plan allows: deep-reasoning search (7-20 s, $0.015), agent effort ultra (capped by EXA_AGENT_MAX_COST, default $1/run). Setting it applies to every agent and session on this machine. Only set it when the user asks.

Inputs: set, reset.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 9 tools

    Disambiguation4/5

    Search, find_similar, contents, and answer are clearly differentiated in the descriptions (e.g., answer = cited quick facts, search = read sources yourself). The only soft overlap is between exa_agent_get (with wait=true polling) and exa_agent_manage's list/events, plus agent_get vs agent_run returning terminal state, but these boundaries are still workable.

    Naming Consistency4/5

    All tools share the exa_ prefix and snake_case, with a sensible agent_* sub-family (run/get/manage). Minor deviation: several tools are noun-based (exa_contents, exa_mode, exa_keys_status) rather than consistent verb_noun, so the pattern isn't fully uniform.

    Tool Count5/5

    Nine tools is well within the sweet spot and each maps to a distinct capability (search, similar, contents, answer, agent lifecycle, keys, mode). Nothing feels redundant or padded.

    Completeness5/5

    Covers the full Exa workflow: discovery (search, find_similar), retrieval (contents), synthesis (answer), long-running research with a complete run lifecycle (run/get/manage including cancel/delete), plus operational controls (keys_status, mode). No obvious dead ends for the stated purpose.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to perform real-time web searches, company research, content crawling, LinkedIn searches, and deep research using the Exa AI Search API. Provides comprehensive web information retrieval capabilities in a safe and controlled manner.
      2
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables MCP clients to connect to Exa for web search, retrieving URL contents, deep cited-answer search, and research-agent runs. It provides Exa search, content, and research tools with filtering, structured output, and cost reporting.
      5
      MIT