View as Markdown

Provenance MCP · Guide

Connect an MCP client

Add Provenance to your MCP client with one address. Start with the sandbox, https://sandbox-mcp.provenanceauth.com; the live server is https://mcp.provenanceauth.com. The tools you see depend on who signs in (who signs in).

Before you begin: to sign in as yourself, set up Provenance with a passkey; to sign in for a business, have a console account; to connect an agent, export a sandbox API key.

export PROVENANCE_KEY=prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5

Claude

  1. Open Settings → Connectors → Add custom connector.
  2. Name it Provenance and paste https://sandbox-mcp.provenanceauth.com.
  3. Choose Connect. Claude opens Provenance: pick who you're connecting as, then confirm.

ChatGPT

  1. Open Settings → Apps & Connectors → Advanced and turn on Developer mode.
  2. Choose Create, name it Provenance and paste https://sandbox-mcp.provenanceauth.com.
  3. ChatGPT opens Provenance: pick who you're connecting as, then confirm.

Cursor

Add the server to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json for every project. Cursor opens the sign-in the first time it calls the server:

{
  "mcpServers": {
    "provenance": {
      "url": "https://sandbox-mcp.provenanceauth.com"
    }
  }
}

For an agent, send the key instead of signing in:

{
  "mcpServers": {
    "provenance": {
      "url": "https://sandbox-mcp.provenanceauth.com",
      "headers": { "Authorization": "Bearer ${env:PROVENANCE_KEY}" }
    }
  }
}

Other clients

Claude Code

claude mcp add --transport http provenance https://sandbox-mcp.provenanceauth.com

Run /mcp in Claude Code and choose Authenticate. For an agent, add --header "Authorization: Bearer $PROVENANCE_KEY" and skip the sign-in.

VS Code

Add the server to .vscode/mcp.json in your workspace:

{
  "servers": {
    "provenance": {
      "type": "http",
      "url": "https://sandbox-mcp.provenanceauth.com"
    }
  }
}

Any Streamable HTTP client

Any client that speaks MCP over Streamable HTTP connects with the same address. An agent sends its key as Authorization: Bearer or X-Api-Key, and each request is one JSON-RPC call:

curl https://sandbox-mcp.provenanceauth.com \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0", "id": 1, "method": "tools/call",
    "params": { "name": "authorize_action", "arguments": {
      "action_description": "Pay invoice INV-2041: $450.00 to Brindlecote Supplies",
      "agent_session_id": "sess_mcp_1",
      "device_id": "dev_00000000000000000000000000000001"
    } }
  }'

The result carries the API response in structuredContent, and the same object after a one-line outcome in the text:

{
  "result": {
    "content": [
      { "type": "text", "text": "Authorized: pass the token to whoever runs the action; they call verify_intent once.\n\n{ … }" }
    ],
    "structuredContent": {
      "object": "intent_authorization",
      "intent_token": "eyJhbGciOiJFUzI1NiIs…",
      "expires_at": "2026-10-24T17:52:36.000Z",
      "biometric_bound": false,
      "idempotency_key": "idem_5b0c2f3e-8d41-4a5e-9c1b-7f2a6d3e9b10"
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}

Check a business with no key

Add ?toolsets=verify to the address to list only the keyless tools, with no sign-in: https://sandbox-mcp.provenanceauth.com/?toolsets=verify. See cart approvals and business checks.

Run the server locally

The @provenanceauth/mcp-server package runs the agent tools over stdio, for a client that starts local servers. The key goes in the environment, never on the command line:

This package isn't on npm yet. Until then, every request in these docs runs over HTTP against the sandbox.

With access to the private Provenance repository, which your Provenance contact grants, install from it:

git clone https://github.com/michaelnbane-jpg/provenance.git provenance
cd provenance && pnpm install && pnpm build
node scripts/check-publishable.mjs --out ../provenance-packs
cd ../your-project
npm install ../provenance-packs/provenanceauth-sdk-1.0.0.tgz ../provenance-packs/provenanceauth-rails-1.0.0.tgz ../provenance-packs/provenanceauth-mcp-server-1.0.0.tgz

PROVENANCE_BASE_URL is optional; it points the server at a different Provenance API, such as the sandbox. Started without PROVENANCE_API_KEY, the server lists only the keyless tools.

Sign in

The first time the client calls the server without a credential, it opens Provenance:

  1. The account picker lists You, personally when you're signed in with your passkey, and your business account when you're signed in to the console. Pick one.
  2. Check the app's name, the website it identifies itself with, and where your browser returns.
  3. Confirm. A person confirms with their passkey.

Developer tools ask for the console's developer access on the sandbox; a developer, admin or owner can connect them (Developer tools). Add ?as=personal or ?as=account to the address to preselect a row on the picker.

MCP versions

The server speaks both MCP eras. Clients on 2025-11-25 or earlier start with initialize. Clients on 2026-07-28 send no initialize and no session id: each request carries its protocol version and client capabilities in params._meta, and the MCP-Protocol-Version, Mcp-Method and (for tools/call) Mcp-Name headers repeat what the body says:

{
  "jsonrpc": "2.0", "id": 1, "method": "tools/call",
  "params": {
    "name": "get_policy", "arguments": {},
    "_meta": {
      "io.modelcontextprotocol/protocolVersion": "2026-07-28",
      "io.modelcontextprotocol/clientCapabilities": { "elicitation": { "url": {} } }
    }
  }
}

server/discover returns the server's capabilities and supportedVersions, and every result carries resultType. A header that disagrees with the body gets 400 with code -32020. A version neither era serves gets 400 with code -32022, listing the versions served in data.supported, 2026-07-28 first.

For client builders

The server follows the MCP authorization spec:

PartWhere
Protected resource metadata/.well-known/oauth-protected-resource on the server's address, and /.well-known/oauth-protected-resource/v1/mcp on the API. It names the server's address as resource and lists no scopes.
Authorization server metadata/.well-known/oauth-authorization-server on the API
Client registrationPOST /v1/oauth/register, or a Client ID Metadata Document
AuthorizationThe code flow with PKCE (S256 only, state required, exact redirect URIs)
TokensPOST /v1/oauth/token issues 1-hour access tokens and rotating refresh tokens; reusing a rotated refresh token ends the connection

Every token carries the server's address as its audience. Every 401 from the server carries WWW-Authenticate: Bearer resource_metadata="…" with no scope parameter, so a client asks only for the scopes of the family it signs in as. A call outside the token's scopes answers 403 with error="insufficient_scope" naming scopes of the same family.

A terminal client signs a person in with the device authorization grant (RFC 8628): POST /v1/oauth/device_authorization, then POST /v1/oauth/token with grant_type=urn:ietf:params:oauth:grant-type:device_code returns an assistant key once. To say what a person's assistant will do, add authorization_details to the authorization URL: up to 5 provenance_action objects (RFC 9396), as in CIBA and RAR.

A person's connected tools

For a person, tools/list returns the server's own tools and then the services the person gave this client, each named <service>.<tool> with the service's own input schema. A call to one is checked and sent to the service, and its result comes back unchanged. A call that isn't allowed returns a tool error with one of these in structuredContent.reason:

ReasonMeaning
tool_not_grantedThe person hasn't given this client the tool.
approval_pendingThe call waits for the person (approval.approve_url); call again with the same arguments once they approve.
approval_deniedThe person rejected this exact call.
tool_denied_by_ruleThe person's rule, or an open takeover warning, rejects it.
tool_connection_needs_reconnectThe person needs to reconnect the service.
tool_upstream_unavailableThe service didn't answer; nothing was done.
tool_call_allowance_reachedThe person's free calls for the month are used.

Each initialize gets an Mcp-Session-Id; send it on every later request so the person sees one session per window, and send a DELETE with it to end the session. On 2026-07-28 the connection is the session; an assistant that wants one session per window calls record_session and sends the handle in _meta["com.provenanceauth/session"]. A call from a session the person stopped returns reason: "session_stopped", and one outside the session's limits returns reason: "session_limit".

Errors you might see

SymptomCauseFix
401 with a WWW-Authenticate headerNo credential, or an expired oneSign in, or send Authorization: Bearer with a valid key.
401 on a developer connection made before the move to one serverIts token names the old address as its audienceSign in again from your client.
A tool you expect isn't listedThe key lacks that product, or you signed in as another familyUse a key with the product, or connect again and pick the other row.
A tool result with isError: true naming insufficient_scopeThe credential lacks the scope the tool needsUse a key or sign-in that holds it.
mcp_oauth_not_configuredThis deployment doesn't offer MCP sign-inConnect with an API key, or use the address Provenance shows.
invalid_grantThe code or refresh token was used, expired, or doesn't matchConnect again.
400 with code -32020A 2026-07-28 request's headers don't match its bodySend headers that repeat the body's version, method and tool name.
400 with code -32022The request names a protocol version neither era servesUse a version from data.supported.

See also