Token VaultDocs
Credentials

Add a credential

Store a credential on your webhook from one page, attach MCP servers, label it and give apps access, then rotate, delete and watch its health.

A credential is a secret that lives on your webhook: an API key, a token, an SSH key, a TOTP seed or a JSON blob. Token Vault keeps only a directory row (name, type, labels, MCP servers). The value goes from your browser or CLI straight to the webhook with a ticket Token Vault signed.

Open Credentials, then Add credential (https://tokenvault.uk/credentials/new). One page, one Save. Nothing leaves the form until you press it.

The Add flow, row by row

RowWhat you setDefault and rules
WhatA preset chip: GitHub, Linear, Sentry (MCP presets), Google (OAuth), GitHub (OAuth), Spotify (OAuth), Plain text, or OtherDefault Plain text. A preset suggests a name until you type your own. Other shows a type radio (see Credential types).
NameThe service name, for example github or my-api^[A-Za-z0-9][A-Za-z0-9._~-]{0,199}$. This name cannot be changed after creation. The Add page reserves new, oauth-return and oauth-result. The API also refuses grants, sessions, mcp, connect, tools, servers, reveal-key, rotate-key, credentials, whoami, bulk, dashboard, dashboard-sim, audit-log and sign-in (any letter case), and any name that starts with __tv_.
LabelsComma or space separated, for example work, aiLowercase letters, digits and hyphens (1 to 32 each), max 10. Shows "Policies from these labels apply at once". A label never grants access.
ValueThe secret itself, fields depend on the typeText under the field: "Sent from this browser to your webhook at <host>. Token Vault never sees it." Plain text and JWT also offer Paste a value or Connect your OAuth app.
MCP serversMCP servers to attach (Plain text and JWT only)The preset's MCP server is ticked. Custom URL adds name, URL and headers (default Authorization: Bearer ${TOKEN}). Max 5. See MCP servers.
Who uses itApps that get accessFirst run: tick apps (Claude Code is ticked). Later: Access with your agents and keys.

Who uses it on your first run lists eight apps. Each ticked app becomes its own agent, so Activity shows which app did what.

AppAgent name created
Claude Codeclaude-code
Claude.aiclaude-ai
ChatGPTchatgpt
Cursorcursor
VS Codevscode
Codexcodex
Gemini CLIgemini-cli
Script or CIscript

Once you have agents, the row becomes Access: checkboxes for active agents and keys (first five, then More (n)), a per-holder use chip, and a New agent name field. Each chip reads MCP or Value 24 h. Agents can switch between them when the credential has MCP servers. API keys are fixed to Value. The default is MCP when the credential gets servers, otherwise Value.

Nobody gets access unless you tick them. This matches tvault add without --for. Keys get Value only.

The page shows a live CLI line that mirrors your choices, so you can copy the same action into a script.

Save and the receipt

Press Save. The page runs four steps in order. Each step gets its own row in the receipt, and a failed row gets a Retry button. A later failure never undoes an earlier success.

StepWhat runsWhere the value goes
Value on your webhookThe browser asks Token Vault for a store ticket, then posts the value to your webhookBrowser to webhook only
MCP serverToken Vault saves the MCP server list, then fetches each MCP server's tools through your webhook. The row shows <server>: N tools or the errorHeader templates only, never a value
LabelsToken Vault saves the label setMetadata
AccessNew agents are created, then grants are made. Value grants last 24 h. MCP-only grants never expireMetadata

If an MCP grant needs an MCP server that failed, Access waits and shows "skipped: Waiting for the MCP server." Fix the MCP server, press Retry on its row, then retry Access.

What just happened

Loading diagram...
HopSees the value?Carries
Browser or CLI to Token Vault (store-ticket)NoService name in, signed ticket out
Browser or CLI to webhook (/v1/store)Yes, only hereTicket, service name, tokenData
Browser to Token Vault (labels, MCP servers, grants)NoNames, header templates, use choices

Token Vault never holds the value, before, during or after the store. (The one exception on the whole platform is the legacy tv-refresh path, used only for tokens from Token Vault's old built-in OAuth apps and off by default in the reference webhook: Token refresh.) Whether the webhook encrypts at rest is your webhook's choice (the reference webhook does).

The receipt then shows Connect your apps: for each agent it created, the command to run in that app. Press Open <service> to land on the credential page.

AppCommand shownThen
Claude Codeclaude mcp add --transport http --scope user tokenvault https://api.tokenvault.uk/api/agents/mcpRun /mcp, press Authenticate, pick the agent.
Claude.aiSettings, Connectors, Add custom connector, paste the URLPick the agent and press Authorize.
ChatGPTSettings, Connectors, Create, paste the URLPick the agent and press Authorize.
Cursor~/.cursor/mcp.json with the URLCursor opens Token Vault on first use. Pick the agent.
VS Codecode --add-mcp '{"name":"tokenvault","type":"http","url":"..."}'Start the MCP server. It opens Token Vault. Pick the agent.
Codex~/.codex/config.toml with [mcp_servers.tokenvault]Run codex mcp login tokenvault, then pick the agent.
Gemini CLIgemini mcp add --transport http tokenvault ...Run /mcp auth tokenvault, then pick the agent.
Script or CIprintf %s "$AGENT_KEY" | tvault login --key-stdin --as ci (or header Authorization: Bearer <agent key>)No browser. The agent key lives in that machine's config until you rotate it.

The receipt URL gives an app Token Vault's own tools. Tools from a credential's MCP servers use one URL per MCP server, which the agent's Connect tab lists. See Connect your apps and MCP servers.

Credential types

Plain text and Other map to the API tokenType. Pick the type that matches the shape of the secret.

Preset or radiotokenTypeFields on the pageNotes
Plain textPlainTextSecret valueAPI keys, PATs. Can carry MCP servers.
Other, OAuth (access + refresh)JWTAccess value, Refresh value, Scopes (placeholder read:user, repo)The page requires refresh value and scopes. Can carry MCP servers.
Other, SSH keySSHKeySSH private key, optional Public Key
Other, CertificateCertificatePEM, optional Private Key, optional Certificate Chain
Other, 2FA (TOTP)TOTPotpauth:// URI or Secret Key (Base32)See TOTP codes.
Other, Raw (JSON, config, connection string)RawCredentialOne text area; a badge shows what it detectedSee Raw credentials.
Other, Multi-fieldCompositeKey and value rows, Add fieldRead one field with tvault get name.field. No MCP servers.
Google (OAuth), Spotify (OAuth)JWTConnect your OAuth app panelSee OAuth apps.
GitHub (OAuth)PlainTextConnect your OAuth app panel

Each account holds up to 50 credentials.

Connect with your own OAuth app

For Google, GitHub and Spotify, the Value row has a Connect your OAuth app toggle. You register an OAuth app at the provider, keep its secret on your webhook, and the webhook finishes the sign-in. Token Vault sees only the status. Steps and the exact trace are on OAuth apps.

The credential page

Open a credential from Credentials. The address is /credentials/<name>, and ?tab= selects a tab.

TabWhat it shows
OverviewStatus, Description, a Reveal credential control (fetched from the webhook, see below), Type, Expiry, Last used, scopes, a live code for TOTP, and the buttons Rotate credential, View activity and Delete credential.
MCP serversThe credential's MCP servers: Refetch tools, Edit, Add policy, Remove, the Agent URL to copy, and Add blank MCP server or Add from template. See MCP servers.
AccessWho holds access to this credential, with edit and revoke per holder.
LimitsPolicies on the credential and on each of its MCP servers. See Policies.

Labels appear above the tabs. Editing them there is the same action as the Labels row.

Reveal credential does not read the value from Token Vault. The browser calls POST /api/vault/credential-ticket with {"serviceName":"github","purpose":"user_reveal"} and gets back a ticket and your webhook URL. It then calls POST <webhook>/v1/credential with {"ticket":"...","service":"github"}. The webhook answers {"token":{...}} straight to the browser.

Rotate a credential

Press Rotate credential on the Overview tab, or open /credentials/new?rotate=<name>.

Re-enter the full credential. It is sent directly to your webhook and replaces everything stored for this service. Fields you leave blank are removed.

The button reads Rotate value. It uses the same store ticket path as the first save. MCP servers, labels and access stay as they are. For an OAuth credential the page offers a sign-in again with your OAuth app instead.

Press Rotate credential, paste the new value, press Rotate value.

Rotating changes the value your webhook holds. It does not change the secret at the provider. Revoke the old secret there too.

Delete a credential

Press Delete credential on the Overview tab.

This permanently removes the credential reference from Token Vault. Your webhook may still hold the credential. Manage it there to fully delete it.

The confirmation says what it does: Token Vault drops the directory row, grants and MCP servers. Remove the stored value on your webhook if you want it gone there. From the CLI: tvault rm github (add --force in scripts).

Refresh and health

Token Vault does not refresh credentials you add here. Your webhook refreshes OAuth credentials on its own timer, using the OAuth app credentials you gave it. Token Vault asks it to refresh (/v1/refresh-notify, reason manual_request) only when you press a manual refresh. The one exception is the legacy tv-refresh path for tokens from Token Vault's old built-in OAuth apps (Token refresh).

WhereWhat you see
Credentials listA health chip per credential: Healthy, Expiring (under 24 h left) or Expired. A credential with no expiry is Healthy.
Credential page headerHealthy, Expires in 1 h or Expired 2 h ago.
Credential page bannerReconnect needed: this credential's sign-in no longer refreshes. with a Reconnect link to the Add flow. Raised by Token Vault's refresh health, which tracks the legacy path only.

If the provider revokes the grant, reconnect the credential. Static keys never expire, so they stay Healthy until you rotate them. See Token refresh for the contract.

Next steps

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