Repository navigation
Agent Keys and Authentication
github-actions[bot] edited this page Oct 11, 2026
·
1 revision
Agents authenticate to virtual servers with an agent key, sent as Authorization: Bearer vmcp_....
curl -X POST -H "$A" -H 'Content-Type: application/json' $B/agent-keys -d '{
"slug": "billing-bot",
"description": "Nightly billing agent",
"virtualServers": ["billing"],
"ipAllowlist": ["10.20.0.0/16"],
"rateLimitPerMinute": 60,
"expiresAt": "2027-01-01T00:00:00Z"
}'- The secret (
key) is returned once, only a hash is stored. Lose it and you rotate. -
virtualServerslists where the key is valid.ipAllowlist(CIDRs) restricts source addresses; behind a reverse proxy configureVMCP_TRUSTED_PROXIESso the real client IP is used. -
POST /agent-keys/{slug}/rotateissues a new secret;/revokedisables the key in PostgreSQL. Data-plane enforcement follows notification/polling convergence, bounded byVMCP_AUTH_MAX_STALE(default 30s); expired confirmation fails closed. See Authorization consistency. - A virtual server with
authRequired: falseaccepts anonymous callers. Keep that for local use. - Every call is attributed to its key in the audit log.
When VMCP_AGENT_OIDC_ISSUER is configured on the data plane, agents can also present JWT access tokens issued by your corporate IdP (Keycloak, Okta, Auth0, etc.). Claims are mapped to virtual servers through identity bindings, supporting claim conditions, IP allowlists, and per-binding rate limits.
See OAuth for agents for full details.
| Credential | Role | Notes |
|---|---|---|
VMCP_ADMIN_TOKEN |
admin | Bootstrap token from the environment |
Admin tokens (/admin-tokens) |
read (viewer) or admin
|
Created in Settings or the API; shown once; rotate/revoke/expire like agent keys |
| SSO session | viewer / editor / admin | See SSO and roles |
Send admin tokens as Authorization: Bearer ... to /api/v1. GET /api/v1/me tells you who the server thinks you are.
vMCP is licensed under Apache-2.0. This wiki is generated from the docs/ folder of the repository: send documentation fixes as pull requests, not wiki edits.
- Getting started
- Guided setup and client connections
- Installation options
- Kubernetes quickstart
- Install a published release
- Upstreams
- Virtual servers
- Resources and prompts
- Agent keys and authentication
- OAuth for agents
- SSO and roles
- Tool policies
- PII masking
- Rate limits
- Audit log
- FAQ and troubleshooting