brime

MCP Server

`mcp-server-brime` — drop Brime into Claude Desktop, Cursor, Claude Code, or any MCP client.

Brime ships an MCP server two ways:

  • Hosted (recommended) — https://mcp.brime.dev/mcp over Streamable HTTP. Zero install. First tool call opens an auth page; the user pastes the key once and a short-lived session is established. The key never enters the LLM transcript.
  • Local stdio — npx -y mcp-server-brime for advanced setups, air-gapped environments, or if your MCP client doesn't yet speak Streamable HTTP. Configurable via env or the legacy brime_set_key tool.

Both expose the same four core tools: brime_search, brime_extract, brime_research, brime_research_status. Local stdio also exposes brime_set_key (marked legacy in v0.2 — prefer the hosted URL elicitation).

GitHub → · npm → · Get your key →

Hosted endpoint

https://mcp.brime.dev/mcp

Drop this URL into any MCP-compatible client. Snippets per host below. First tool call from a fresh session returns a one-time /auth/connect?session=… URL — open it, paste your sk-brime-… key, return to the chat. The hosted endpoint resolves auth in this order on every request:

  1. Authorization: Bearer sk-brime-… header (canonical)
  2. ?apiKey=sk-brime-… query string (vendor parity)
  3. MCP-Session-Id header → KV-backed session (URL elicitation handoff, 10 min TTL)

Install in Claude Code

claude mcp add brime https://mcp.brime.dev/mcp --transport http

That's the whole setup. Restart Claude Code, ask the agent something search-y, paste your key in the auth tab that opens. The session is reused for the next ~10 minutes; after that, the agent prompts again.

Install in Cursor / Codex / VS Code / Claude Desktop

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "brime": {
      "url": "https://mcp.brime.dev/mcp"
    }
  }
}

Restart Cursor; the four brime_* tools appear in the agent panel.

Codex CLI's MCP add command currently expects a stdio command, so use the local mode:

codex mcp add brime -- npx -y mcp-server-brime

Restart Codex. On the first tool call, the agent prompts you for an sk-brime-... key and saves it to ~/.brime/credentials for future runs.

Add to .vscode/mcp.json (or User settings):

{
  "servers": {
    "brime": {
      "url": "https://mcp.brime.dev/mcp"
    }
  }
}

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "brime": {
      "url": "https://mcp.brime.dev/mcp"
    }
  }
}

Pre-set the key (optional)

If you'd rather skip the first-use auth prompt, attach the key to the URL:

https://mcp.brime.dev/mcp?apiKey=sk-brime-...

Or, for hosts that support custom request headers, send Authorization: Bearer sk-brime-... on every call. The header path is canonical and recommended for any server-to-server deployment.

Local stdio mode

For offline development, air-gapped environments, or hosts that don't yet speak Streamable HTTP, the npx -y mcp-server-brime binary is still here. See the stdio config block on the GitHub README — it covers BRIME_API_KEY, BRIME_BASE_URL, BRIME_TOOLSETS, and BRIME_READ_ONLY env knobs.

Tools

ToolWrapsWhen the model picks it
brime_searchPOST /v1/searchQuick factual lookups, current events, finding URLs
brime_extractPOST /v1/extractReading the full body of specific pages
brime_researchPOST /v1/researchMulti-step synthesis with citations
brime_research_statusGET /v1/research/{id}Polling a deep-research job started by brime_research

The agent decides which to call based on the question — you don't wire them by hand.

Research pattern

brime_research runs the single tuned multi-round flow synchronously (~30–90 s wall-clock) and returns the answer + ranked sources directly. There is no depth selector and no async polling for new calls — the MCP server simply waits.

user: "Compare frontier coding models with concrete benchmarks."
↓
agent: brime_research { query: "..." }
       → { answer: "...", sources: [...], credits_used: 5 }
↓
agent: <synthesises final answer with citations>

Error handling

Tool-level errors return MCP isError: true with a friendly message. The agent reads it, asks the user, and recovers — no crash.

Two notable envelopes:

Brime API key not configured on this machine. Please ask the user for their Brime API key
(it starts with `sk-brime-`), then call the `brime_set_key` tool with that key as the
`key` argument. Get a free key at https://brime.dev/api-keys (1,000 credits/month, no card).
Invalid Brime API key. Ask the user for a fresh key (starts with `sk-brime-`) and save it
with the `brime_set_key` tool. (HTTP 401, code=unauthorized)

Logging

The MCP server writes structured JSON logs to stderr only (stdout is reserved for MCP protocol frames). Set MCP_LOG_LEVEL=debug for verbose output during integration.

Compatibility

  • Node ≥ 18.0
  • MCP SDK 1.0.x
  • Stdio transport (hosted HTTP transport is on the roadmap)