Token Vault
MCP OAuth

OAuth 2.1 for MCP Clients

Connect Claude, IDEs, and agent runtimes to Token Vault with a standard in-client OAuth 2.1 flow — no pasted keys.

Token Vault is an OAuth 2.1 authorization server and protected resource for MCP — the MCP authorization spec's two server roles, co-located. Any client that speaks the spec (Claude Code, Claude.ai, ChatGPT, IDEs, agent runtimes) can connect to Token Vault's MCP endpoint and obtain an agent-scoped session token in-client — the human approves once in a browser, no static key is ever pasted.

Claude Code — one command, OAuth handles the rest
claude mcp add --transport http token-vault https://api.tokenvault.uk/api/agents/mcp
# then inside Claude Code: /mcp → Authenticate → browser opens → pick agent → done

New in July 2026

This gateway just shipped — read the announcement for the design rationale and what "beyond the MCP baseline" means in practice.

The client discovers everything else itself: it hits the MCP endpoint, gets a 401 pointing at the discovery documents, registers itself, and runs a PKCE authorization code flow. You approve in the browser and pick which agent identity the client binds to.

Standards

StandardRoleIn the MCP auth spec
RFC 9728Protected resource metadata (/.well-known/oauth-protected-resource)Required
RFC 8414Authorization server metadata (/.well-known/oauth-authorization-server)Required
OAuth 2.1 + RFC 7636PKCE, S256 only — no client secrets, public clients onlyRequired (S256-only matches the 2025-11-25 hardening)
RFC 7591Dynamic client registration — no pre-shared client_idRecommended — and ChatGPT's MCP connectors require it
RFC 7009Token revocationBeyond the MCP baseline
RFC 7662Token introspection (bearer-as-subject)Beyond the MCP baseline

The flow

Loading diagram...

One identity, two token types

Access is always bound to a (user, agent) pair. There are two interchangeable ways for a client to present that identity:

TokenIssued byLifetimeUse when
tvagent_…Console (static API key)Until revokedServer-side agents you configure by hand
tvsess_…OAuth 2.1 flow1 hour, auto-refreshed via tvrefresh_…MCP clients with a human in the loop

Both resolve through the same code path to the same agent, with the same grants and ABAC policies. The auth method is orthogonal to what the agent can do.

The authorization endpoint is a page on the dashboard (tokenvault.uk/oauth/authorize). You sign in with your normal account, then:

  1. Pick the agent the client should act as. Its grants and policies apply.
  2. If the agent doesn't have MCP access enabled yet, the page offers to enable it — a deliberate opt-in, recorded in your activity feed.
  3. Approve. The client gets its code on a loopback redirect and exchanges it for tokens.

Suspended agents can't be authorized, and every refresh re-checks the agent's status — suspending an agent kills its sessions at the next refresh, within the hour.

Kill switches

ActionEffect
Suspend the agentNew sessions + refreshes refused immediately; live tvsess_ expires ≤ 1 h
Delete the agentSame, permanently
POST /api/mcp-oauth/revokeKills a specific tvsess_ or tvrefresh_ now
ABAC time_window policyGate sessions by schedule — enforced on every call and surfaced via introspection

Next steps

Ready to try it?

Sign up free with Google — your credentials stay on your own webhook, and the quickstart gets an agent fetching its first credential in about ten minutes.

On this page