Token VaultDocs
Get Started

Concepts: the Token Vault model

The whole Token Vault model on one page (credentials, MCP servers, agents, access, labels, policies, API keys, Activity and the kill switch) plus what Token Vault holds versus your webhook.

Token Vault decides who may use which credential, and how. Your webhook holds the credentials. Token Vault checks identity, access and policies, then signs a short-lived ticket. The value moves between the caller and your webhook, or between your webhook and the upstream API, and never through Token Vault.

The model

Loading diagram...

Credential

A secret you store: an API key or PAT, an OAuth access + refresh token, an SSH key, a certificate, a TOTP seed, a raw JSON/config/connection string, or several fields. The value lives only on your webhook. Token Vault keeps a directory row: name, type, labels, MCP servers and other metadata.

  • Name: the web app takes up to 200 letters, digits and ._~-, starting with a letter or digit. It cannot be changed after creation.
  • Up to 50 credentials per account.
  • Add one on Credentials > Add credential, or with tvault add. See Add a credential.

MCP server

A credential can carry up to 5 MCP servers: a name, an upstream URL and header templates such as Authorization: Bearer ${TOKEN}. Your webhook replaces ${TOKEN} with the value on every call. Token Vault stores the template, never the value. A credential-like header (Authorization, Cookie, X-Api-Key, …) must contain ${TOKEN}, so a literal secret there is refused.

Presets: GitHub, Linear, Sentry, or a custom URL. Only single-value credentials (plain text and OAuth) can carry MCP servers. Each MCP server has its own URL:

https://api.tokenvault.uk/api/mcp/{service}/{server}

See MCP servers.

Agent

An identity for one app or script. It has a tvagent_… key, and MCP apps can sign in as it with OAuth (a one-hour tvsess_… session). Use one agent per app: Activity then shows which app did what, and you can stop one app without the others.

  • Status: active or suspended. A suspended agent is refused everywhere (AGENT_INACTIVE).
  • Agents created by the Add flow or the CLI have MCP turned on.
  • Up to 25 agents per account. See Agents.

Access

Access (a grant in the API) links one agent or key to one credential. It has three parts:

PartChoicesDefault
UsesMCP: call the credential's MCP servers; never sees the value. Value: read the value itself, for scripts and the CLI. Or both.Add flow: MCP when the credential has MCP servers, else Value
MCP serversSome or all of the credential's MCP servers (MCP only)All it has now. A server added later needs a new grant
ExpiresNever, 24 hours, 7 days, 30 days, custom date. The value and each MCP server can end at different timesWeb app: Value 24 hours, MCP-only Until revoked. API: no expiry unless you set one

Granting a credential again adds to the access. It never shortens a part the agent already has.

An MCP-only agent that asks for the value gets 403 GRANT_TOOLS_ONLY. API keys get Value only. A key or agent that grants access can never hand on more than it holds. See Access.

Labels

Short tags (a-z, 0-9, -, up to 32 characters, 10 per object) on credentials, agents and API keys. A policy attached to a label applies to everything that carries it, now and later.

A label never grants access. Access stays explicit. Labels replaced folders. See Labels.

Policies

Rules that every call must pass. Rules in one policy are AND-ed; every policy that applies must pass.

RuleWhat it checks
Who can readThe channel: web app, CLI, agents, API keys, MCP tools
Time windowDays and hours, in a time zone
Rate limitRequests per window (refusal is HTTP 429 with Retry-After)
Lifetime capTotal uses; reject or disable when reached
IP allowlistCIDR ranges
CountriesAllow or block a list of countries

Attach a policy to a credential, a label, an agent, an API key or one MCP server. A manual-approval rule always denies, because there is no channel to ask you yet. The web app does not offer it; the API still accepts it. See Policies.

API keys

Scoped keys (tvkey_…) for the CLI and automation, made on Settings > API keys. Each key has an explicit list of scopes and an optional expiry. Some scopes (for example grants:write, policies:write, keys:manage) only a human can put on a key.

Keys and agents are independent. Revoking or changing one never affects another, including ones it created. See API keys and Scopes.

Activity

Allowed calls, denials and changes (credentials, agents, keys, policies, labels, MCP servers, and access edits and revokes; creating new access is not recorded yet), as metadata: who, which credential, which MCP server, which policy, outcome, channel. Denials come in plain words, such as claude-code can use github's tools but not read the value, with a fix button. Filter, open the drawer, export CSV or JSON. Events are kept 90 days and never hold values. See Activity.

Kill switch

Stop all access (header, or Settings > Webhook > Overview) refuses every new request from agents, keys and MCP clients. Links already issued, and sessions your webhook or gateway has cached, can keep working for up to 60 seconds. Credentials an agent already fetched keep working until you rotate them with the provider. Resume access turns it off. See Stop all access.

Two planes

Control plane: Token VaultData plane: your webhook
Whereapi.tokenvault.ukCloudflare Workers, or Node in Docker (Cloud Run, Lambda, a VM)
HoldsIdentities, agents, API keys, access, policies, labels, MCP server URLs + templates, OAuth app client ids, Activity metadata, your webhook URL + HMAC secretCredential values, the encryption key, OAuth client secrets
DoesAuthenticates, checks access and policies, signs tickets, forwards MCP callsStores values, returns them on a valid ticket, injects them into upstream calls, refreshes OAuth tokens
Touches credential valuesNoYes. It is the custodian

Token Vault does see MCP tool requests and results in transit, because it forwards them. It does not log them. It never sees the credential that authorizes them. Every path, hop by hop: How it works.

What Token Vault is not

  • Not a credential store. There is no hosted-storage mode. An earlier one was removed in mid-2026.
  • Not an encryption service. It has no key for your credentials.
  • Not in the value path. Values go caller ↔ webhook on a signed ticket.
  • Not affiliated with "TokenVault"/"Token Vault Ltd" at tokenvault.online, an FCA-flagged financial services entity.

Custody and encryption

Encryption at rest is your webhook's decision. Token Vault cannot see what your webhook does with a value. The reference webhook encrypts every sensitive field with AES-256-GCM, using a key it derives from TV_WEBHOOK_SEED. Metadata stays plaintext so lists need no decrypt.

Stored document (reference webhook)
{
  "v": 1,
  "alg": "AES-256-GCM",
  "fields": {
    "accessToken": "<base64(12B iv || ciphertext || 16B tag)>"
  },
  "meta": {
    "serviceName": "github",
    "tokenType": "PlainText",
    "createdAt": "2026-11-02T10:12:03Z",
    "hasRefreshToken": false
  }
}

Your webhook, your rules

A webhook that stores values in plaintext is still a conformant webhook. Token Vault cannot tell the difference and never claims otherwise. The reference webhook encrypts at rest.

Refresh

Your webhook refreshes OAuth tokens itself, on its own timer, with OAuth clients you put on the webhook. Token Vault calls /v1/refresh-notify only when you press Refresh (reason manual_request) and sends no credential. The one exception is the legacy tv-refresh capability, used only for tokens from Token Vault's old built-in OAuth apps and off by default in the reference webhook (details).

Stopping access

Two stops, at different layers:

  • Stop all access: the kill switch above. Instant to press, no webhook change.
  • Take your webhook offline: with nothing to answer, every value fetch and tool call fails. Use it to decommission or debug the webhook.

For defence in depth, block Token Vault's static egress IP on your webhook's /v1/credential and /v1/store, which only callers should reach. The address is on Webhook security.

Next

Quickstart →: deploy, bind, add a credential and make the first tool call.

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