Token VaultDocs
Reference

Old MCP connection URLs

What happens to old MCP connections (proxies) and their mcp_ keys. Convert moves each one to an MCP server on a credential. The old URLs keep answering, with deprecation headers, until the mcp_ keys end.

An old MCP connection is what Token Vault used to call an MCP proxy. It had its own URL and an mcp_... app key. Token Vault is retiring them. Each one becomes an MCP server on a credential, or a Token Vault sign-in credential. The old URLs and keys keep working while you move.

There is no proxy screen in the web app and no proxy command in the CLI. You cannot make a new old MCP connection: POST /api/proxy answers 410 PROXY_CREATE_REMOVED.

Timeline

StepWhat happens
DeployOld URLs answer with Deprecation and Link headers. The first call to an old MCP connection starts its 90 days (deprecatedAt) and posts a Convert notice in your Inbox
You run ConvertEach old MCP connection becomes an MCP server and is frozen. Its old URLs now forward to the new MCP server
90 days after deprecatedAtEvery mcp_ key answers 410 MCP_KEY_RETIRED
No end dateThe per-connection OAuth URL, /api/proxy/{id}/mcp, keeps answering

Convert

Convert reads no credential value. It moves URLs, header templates, policies and counters, and writes MCP grants. It never prints a header value.

Preview

Open the Convert notice in your Inbox. The dialog shows, for each old MCP connection:

  • its name and the MCP server it becomes,
  • the policies that move with it,
  • who gets MCP access, and why,
  • agents you can add, unticked by default,
  • why it is skipped, if it is.

The same data is GET /api/proxy/convert (person only). It writes nothing. POST /api/proxy/convert runs it (person only, recent sign-in).

Run

Press Convert. You need a recent sign-in. The run sends back the preview's planId. If your account changed since the preview, the answer is 409 PLAN_CHANGED: preview again. Opt-ins the preview did not offer are 422 INVALID_OPT_IN.

For each old MCP connection, in order:

  1. Create the sign-in credential, if it needs one.
  2. Add the MCP server.
  3. Copy the policies and usage counters. Counters add up if the target already has some. A policy is never loosened. A folder policy is not copied: the folder keeps gating the MCP server as the folder, with its own shared counter.
  4. Write the MCP grants.
  5. Freeze the old connection. Its header templates are wiped.
  6. Detach its old policy attachments.

A run that stops partway finishes on the next run. One failure does not stop the others.

What moves

Old MCP connectionBecomes
Webhook (a credential with ${TOKEN} headers)An MCP server on the same credential. Its name is a short form of the connection name. The same URL and headers already on that credential are reused
tv_sessionA new Token Vault sign-in credential with one MCP server that sends Authorization: Bearer ${AGENT_SESSION}
SuspendedConverts. Nobody is granted. The frozen connection stays suspended

Who gets MCP access. Only agents with proof they used the old connection:

  • Activity rows that name the connection and the agent.
  • An OAuth session whose resource is the old URL.
  • The bound agent, for a tv_session connection.

On a credential, the agent's live grant gains MCP (and the new MCP server, if the grant lists MCP servers). Convert never creates a grant on a credential. An agent with no live grant, or an expired one, is listed and left alone. On a sign-in credential, each such agent gets a new MCP grant that never expires.

Other agents appear as opt-in. Tick them to include them. They start unticked.

Apps switch. The old per-agent MCP switch is gone, but an agent that still has it off stays off. Convert does not turn it on by itself: the dialog lists those agents, and you tick the ones to clear (the API takes them as clearAppsOff). Clear one by hand with PATCH mcpEnabled: true.

Skip codes

An old MCP connection that Convert will not touch shows one of these in the preview. Header names are shown. Header values never are.

CodeMeaning
CREDENTIAL_MISSINGThe credential is gone, or is a sign-in credential
CREDENTIAL_UNCHECKEDYour webhook could not be asked. Try again
COMPOSITEThe credential holds more than one plain value
SERVICE_NOT_HOSTABLEThe credential name cannot appear in a URL
SERVER_CAPThe credential already has 5 MCP servers
LITERAL_SECRET_HEADERA header that carries a secret holds a literal value
NO_TOKEN_HEADERNo header holds ${TOKEN}
HEADER_INVALIDA header is not valid for an MCP server
FOLDER_POLICIES_CANNOT_MOVEAn old hub connection limited by a folder's policies; a sign-in MCP server can't carry them
MADE_BY_KEYA person did not make it: a key or agent made it, or it expires or follows an auto-grant
URL_REFUSEDThe upstream URL fails the address rules
BOUND_AGENT_GONEThe agent behind a tv_session connection was deleted
URL_ON_TOKEN_VAULTA tv_session upstream that is Token Vault itself
TOKEN_CAPA new sign-in credential would pass your credential cap

Fix the cause, or delete the old connection, and preview again. Each preview entry also shows the host the connection points at. The plan id covers its address and headers: change either after the preview and the run answers PLAN_CHANGED. The preview and the run share a limit of 6 requests a minute.

Undo

Operators can reverse a conversion with the script. It dry-runs unless you add --apply:

cd backend
python -m scripts.convert_proxies --project <project> --uid <uid> --undo --apply

UNDO_BLOCKED means the MCP server was removed since, so that connection stays converted. UNDO_KEPT means a usage counter or an agent's grant changed after Convert wrote it. The connection is still undone, and that counter or grant is left as it is (a sign-in credential with such a grant is not deleted). Other options: --notify posts the Convert notice, --stamp-deprecated starts the 90 days, and --clear-apps-off <agentId> ... (with --uid) clears the old apps switch on the named agents. Nothing clears it otherwise.

The old URLs

URLAuthStatus
/api/proxy/{proxyId}/mcptvsess_ or tvagent_Alias. No end date
/api/proxy/mcpmcp_... key (Authorization: Bearer or x-mcp-key; ?key= is not accepted)Alias until the key ends
/.well-known/oauth-protected-resource/api/proxy/{proxyId}/mcpnoneStill answers

Before Convert, they work as before. Your webhook adds the credential and calls the upstream. Token Vault never sees it. Upstream 3xx responses are not followed.

After Convert, a frozen connection is an alias of the new MCP server:

  • /api/proxy/{id}/mcp needs mcp:use and a live MCP grant on the target that covers the MCP server. It does not need credentials:read. Sessions issued for the old URL, or for no resource, still pass. One issued for another resource gets 401.
  • /api/proxy/mcp uses the key as the authority for a credential with a value, as the old connection did. For a sign-in target the key stands for the agent the old connection was bound to. That agent must still hold a live MCP grant on the MCP server, and must still be a live agent on every call (not suspended, MCP not switched off, not expired, mcp:use held). Token Vault then mints the pass for it. A pass already minted is not used after the agent is suspended or deleted.
  • Policies on the MCP server apply, and so do the policies of the folder the old connection was bound from. Calls show in Activity as the MCP server. A policy can no longer be attached to the frozen connection (PROXY_FROZEN, 409): attach it to the MCP server.
  • A suspended frozen connection is 403 PROXY_SUSPENDED. If the credential was deleted and created again under the same name, the old URLs answer 404: they stay with the credential they were converted to.

Headers

Every answer for a known old MCP connection carries:

Deprecation: @1793613600
Link: <https://docs.tokenvault.uk/reference/proxy-endpoint>; rel="deprecation"

/api/proxy/mcp also carries Sunset: <HTTP date>, 90 days after deprecatedAt. The per-connection OAuth URL has no Sunset.

After 90 days

From the sunset date, every mcp_ key answers, right after the key is looked up:

{"detail":{"code":"MCP_KEY_RETIRED","message":"This app key was retired. Connect through the MCP server URL Token Vault shows for it instead."}}

with status 410 and the same headers. Until then, an Inbox notice about the old app keys reopens when one is used in the last 30 days, at most once a day. Point the app at https://api.tokenvault.uk/api/mcp/{service}/{server}. See Connect your apps.

What changed for tv_session

A tv_session proxy used to send one shared Token Vault session, for its bound agent, to your MCP server. Every caller looked the same.

Token Vault sign-in replaces it. Each calling agent gets its own 15-minute pass, and the audience is your MCP server's URL. Your MCP server must check aud when it calls introspection.

Other retired items

ItemNow
POST /api/proxy410 PROXY_CREATE_REMOVED
PATCH /api/proxy/{id} on a frozen connection409 PROXY_FROZEN, except {"status":"suspended"}
Delete a connectionAllowed. It also removes the old mcp_ key
Proxy folders (/api/proxy-groups)Writes are 410 PROXY_GROUPS_REMOVED
proxies:read, proxies:writeCannot be added to a key. See Scopes

Errors

HTTPCodeWhen
401MISSING_KEY, INVALID_KEYNo key, or an unknown one. These carry no deprecation headers
403PROXY_SUSPENDEDThe old connection is suspended
403GRANT_REQUIREDThe old connection came from a tokens:create-read grant and the credential's creator no longer owns it
403NO_GRANT, GRANT_EXPIRED, GRANT_NOT_FOR_TOOLS, SERVER_NOT_GRANTEDAfter Convert, the agent has no MCP grant on the target
403IDENTITY_ONLY_SESSIONAn identity-only session
409PROXY_FROZENA change to a converted connection
409PLAN_CHANGEDConvert: your account changed since the preview
410MCP_KEY_RETIREDAn mcp_ key past its 90 days
410PROXY_CREATE_REMOVED, PROXY_GROUPS_REMOVEDRetired routes
423VAULT_LOCKEDYou stopped all access
500PROXY_CONFIG_INVALIDThe config fits neither the webhook path nor the sign-in path. Token Vault refuses instead of guessing
502WEBHOOK_UNAVAILABLEYour webhook is offline
503WEBHOOK_CIRCUIT_OPENYour webhook failed repeatedly and is paused

A rate or rate_limit policy denial on POST is a JSON-RPC -32029 error. Everything else is in Denials and Errors.

Ready to try it?

Sign in with Google or email. Your credentials stay on your own webhook, and the quickstart gets Claude Code making its first MCP tool call in about 15 minutes.

On this page