Connect the MCP server in the portal →
The guided connect page mints a scoped MCP access token and walks you through your client’s config.
Credentials
MCP access tokens are minted on the portal Keys page, under Management keys: explicitly scoped, expiring (7, 30, 90, or 365 days), revocable, and shown once. Revocation applies on the token’s next request. Inference keys (aireserve_api_…) are deliberately refused at this
endpoint — a leaked inference credential must never gain management powers.
Scopes only ever narrow. A token can never grant its owner anything their account role does
not already have:
Export the token once and let every config below read it from the environment, so no secret
lands in a file that might get committed:
Or sign in with OAuth
Clients that speak MCP OAuth don’t need a pre-minted token. The server implements the standard discovery chain — a401 carries a WWW-Authenticate header pointing at
/.well-known/oauth-protected-resource/mcp, and from there your client finds:
PKCE (S256) is required and clients are public (
token_endpoint_auth_methods_supported: ["none"]). Approving the consent page mints the same kind of scoped, expiring token — it
just never passes through your hands. In Claude Code, /mcp → Authenticate runs this
flow; claude.ai and Claude Desktop custom connectors work the same way.
Claude Code
-s user for all your projects. For a committable
project config use .mcp.json — ${AIRESERVE_MCP_TOKEN} expands from the environment:
claude mcp list (or /mcp in a session). Tools surface as
mcp__aireserve__… — try mcp__aireserve__whoami.
Codex
codex mcp add only handles stdio servers; remote HTTP servers go in
~/.codex/config.toml, with the bearer token referenced by environment variable. The same
config is honored by the Codex CLI, the IDE extension, and the ChatGPT desktop app:
codex mcp list.
Cursor
~/.cursor/mcp.json (global) or .cursor/mcp.json (per project). Note Cursor’s env
interpolation is ${env:VAR} — not Claude Code’s ${VAR}:
Calling the API directly
No MCP client required — the endpoint is plain JSON-RPC 2.0 over HTTPS, and single tool calls work statelessly (noinitialize handshake needed). Two rules:
- Send
Accept: application/json, text/event-stream— the server refuses requests that don’t accept both. - The response arrives as a single SSE
messageevent whosedata:line is the JSON-RPC response. The tool’s payload is JSON, serialized intoresult.content[0].text, withresult.isErrorflagging failures.
whoami:
The tool surface is computed per request
There is no fixed tool list. On every request the server verifies your token, derives your live role, intersects it with the token’s scopes, and builds the tool set fresh — an analyst and an admin literally see different tools, and a role change or token revocation applies on the very next call.
Super admins are deliberately de-escalated on this surface: over MCP a platform operator
acts as an enterprise admin of their own organization only — never across tenants.
Beyond the five fixed tools (
whoami, list-models, get-model, get-connection-guide,
send-message), tools come in per-domain pairs — <domain>-query for reads,
<domain>-action for writes. Each takes one operation per call, wrapped as
{"query": {"action": …, "input": {…}}} or {"proposal": {"action": …, "input": {…}}}.
The tool reference lists every operation with a runnable request.
Consent and secrets
Every action resolves to one of three response shapes. Reads and plain writes execute immediately (your MCP client’s own human-in-the-loop approves tool invocations; the server’s authorization guards enforce regardless). High-stakes and secret-revealing actions add a server-side step that no client setting can skip: 1. Executed — reads and plain writes:confirmToken binding the operation, input, and caller. Show the
summary to a human; only after they approve, repeat the same call with the token attached.
Tokens expire in 10 minutes, and execution re-checks the target — if the row changed since
the human read the line, the call is refused instead of doing something they didn’t approve:
Why you can’t get an API key’s secret over the API. This is a design guarantee, not a
gap: management credentials for LLM-driven channels must never let a prompt injection
exfiltrate a fresh key. The redemption link is the proof the action is authorized; the
signed-in human click is the only place the secret exists.
Rate limits and errors
Onlytools/call messages are metered — initialize, ping, and tools/list are free
protocol chatter. Limits are enforced per organization (the same request-per-minute and
per-day limits as the machine API); over the limit you get 429 with a Retry-After
header. Ask get-connection-guide for your organization’s effective values.
Authorization failures relay a human-readable reason (invalid_token on the HTTP layer for
bad credentials; in-band {"error": …} tool results for operations your role can’t
perform). send-message can legitimately take a while on slow models — the endpoint allows
up to 120 seconds per call.
What agents can do — and what they can’t
Everything, catalogued
The complete reference: every tool, every operation, who can call it, a copy-paste
request for each, and the natural-language ask that does the same thing.
Hard limits
No secrets in responses — ever. No platform (cross-tenant) operations. No inference
keys accepted. No impersonation, no file-byte uploads. Every write runs the same
server-side authorization guards as the portal UI.