> ## Documentation Index
> Fetch the complete documentation index at: https://docs.proofable.me/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP auth

> Sign in from an interactive MCP client, or use an npk_ access key on servers, CI and headless agents. Both reach one endpoint and one profile.

Both send `Authorization: Bearer <token>` to `https://mcp.proofable.me/mcp`.

| Mode | Best for |
| - | - |
| **Host sign-in (OAuth)** | Interactive clients. The host opens browser sign-in, uses no manual keys, and refreshes the session silently for up to 30 days through the `offline_access` refresh token. |
| **Access key (`npk_*`)** | Servers, CI and automation with stable environment variables. Durable and never expires. |

## Sign in

1. Register `https://mcp.proofable.me/mcp` once (plugin, registry listing, or URL-only MCP config).
2. Start the sign-in in the client's MCP panel.

The terminal installer writes the same URL:

```bash theme={"system"}
npx -y @proofable/sdk setup
```

A signed-out connection can complete the handshake, list tools, and run `proofable_context`, `proofable_verifiers_catalog`, `proofable_proofs_check` and `proofable_verify_or_guide`. Any other tool call returns `401` with a `WWW-Authenticate` challenge, which starts the host's OAuth flow (DCR, PKCE and token exchange):

```http theme={"system"}
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer resource_metadata="https://mcp.proofable.me/mcp/.well-known/oauth-protected-resource", scope="proofable:core proofable:profile proofable:secrets"
```

An expired or invalid Bearer gets the same challenge on every request, including `initialize`, so OAuth-capable hosts refresh silently. The endpoint is stateless streamable HTTP: GET and DELETE on `/mcp` return `405` without a challenge.

[MCP OAuth](https://docs.proofable.me/mcp/oauth.md) covers discovery, token exchange and scopes.

## Access key (servers and automation)

Create an access key in [Access Keys](https://proofable.me/profile?tab=account), set it as an environment variable, and let the CLI write the config:

```bash theme={"system"}
export PROOFABLE_ACCESS_KEY=npk_...
proofable setup --access-key $PROOFABLE_ACCESS_KEY
```

Or paste the block into any client's MCP settings:

```json theme={"system"}
{
  "mcpServers": {
    "proofable": {
      "type": "http",
      "url": "https://mcp.proofable.me/mcp",
      "headers": {
        "Authorization": "Bearer ${PROOFABLE_ACCESS_KEY}"
      }
    }
  }
}
```

Marketplace gateways that reserve `Authorization` for their own OAuth forward the same key as `x-proofable-access-key`. It is the same `npk_*` key, profile and revocation path. Leave the gateway's key field empty to use the host's own sign-in instead.

## Disconnect

```bash theme={"system"}
proofable disconnect --access-key <token>
```

An OAuth token is revoked through the OAuth revocation endpoint. An `npk_*` key is revoked through the Proofable API, and the CLI then removes the local MCP header from configured clients.

## Interactive verification

Passkey, wallet, OAuth and social verification steps run on [Hosted Verify](https://docs.proofable.me/verification/hosted.md). When a tool returns **`hostedVerifyUrl`**, open it once, then continue in MCP.

## Security

| Topic | Rule |
| - | - |
| OAuth tokens | Stored by the MCP host, never in query strings |
| Access keys | Server or automation configuration only. Interactive hosts use sign-in |
| Browser exposure | Keep tokens and access keys out of browser code |
| Rotation | Re-issue access keys from [Access Keys](https://proofable.me/profile?tab=account) if exposed |
| Refresh tokens | Rotated on each use; the old token stops working |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.