Prerequisites
- An Agent Vault account at app.agentvault.io, and a card saved in the dashboard for any agent that will pay. Plans set a monthly payment quota and an agent-card allowance; see Billing and plans.
- For the hosted MCP server: an MCP client that supports streamable HTTP and OAuth sign-in.
- For the self-run MCP server, the SDK and the HTTP API: an API key from the dashboard. The SDK runs server side on Bun or Node 20 or later.
How it works
- The account holder adds cards, logins and addresses to the vault in the dashboard.
- Your agent receives mock tokens such as
av_card_1_number_u7x2k. A token typed anywhere outside Agent Vault’s browser is a plain string and does nothing. - The agent drives a browser that runs inside Agent Vault’s proxy and fills fields with tokens.
- At each fill, the proxy checks the account holder’s rules, swaps the token for the real value and types it into the merchant page. A login fills only on the site it was saved for.
Choose an integration
If you are unsure, start with the hosted MCP server. Agent Vault documents setup for Meta Muse, Grok Bot, OpenClaw, Claude Code, Hermes, Claude Desktop, Antigravity and Codex in Connect your agent.
Connect through MCP
The hosted MCP server is athttps://mcp.agentvault.io/mcp. You sign in with your Agent Vault account; there is no API key to copy.
- Claude Code
- Codex
- Other clients
/mcp in Claude Code, choose agent-vault and sign in.Install the SDK
@agentvault/playwright replaces Playwright’s chromium: every browser action runs in the proxy, and token fills resolve there. The package is not on npm. Install it from the URL Agent Vault hosts, then set all three variables.
MCP tools and HTTP endpoints
The MCP server exposes 29 tools, plusget_pending_result on the hosted server. They are grouped in the order a run uses them:
The HTTP API covers everything except driving the browser, which uses the proxy’s WebSocket protocol through the SDK or the MCP server:
Rules your agent must follow
Agent Vault publishes nine rules as a page and as an installable skill, so you can load them on their own or paste them into a system prompt:- Never ask for or type a real card number, CVV or password.
- Never generate a password or an email address. Call
create_loginand the vault mints the password. - Never read back a filled value.
page.evaluateis disabled for agent sessions. - Match the token to the page. Credentials are locked to the site they belong to.
- Hand challenges such as 3-D Secure, one-time codes and CAPTCHAs to the account owner.
- Fill the card in the right order.
- Submit once.
- Read the run report before telling anyone money moved.
- Contribute what you learned to the recipe registry.
Limits and timeouts
Set spending limits for an agent
The account holder gives each agent an agent card: a set of rules on one of their saved cards. The rules are checked on every fill.Receive events with webhooks
Webhooks are set per agent card and are available on Plus and Enterprise. Each delivery is a signed JSONPOST to your HTTPS endpoint. Verify the X-AgentPay-Signature header with the card’s signing secret, which starts with whsec_. Failed deliveries are retried up to five times in total, and queuing an event is best effort, so treat webhooks as alerts, not a ledger. The events are card_fill, denied_fill, limit_threshold, auto_pause and approval_required.
Troubleshooting
Branch on the errorcode, not the message. The SDK throws SelfAgentPayError with a stable code, and the MCP server returns a tool error with the same message. The error codes page says which codes are safe to retry.
What Agent Vault does not do
- It does not hide the card from the merchant, and it does not move money.
- It does not solve CAPTCHAs, 3-D Secure checks or one-time codes. It hands the live page to the account holder to complete.
- Its documentation describes no blockchain component, so it gives the agent no wallet or onchain identity. For agent identity on Celo, see ERC-8004 and Self Agent ID.
- Limits bound what an agent can spend, not what it can buy. A compromised agent can still make purchases that the limits and merchant rules allow. For what is and is not protected, read Agent Vault’s security model.
Resources
Related
- Build with AI on Celo — where card and login flows sit next to onchain agent payments
- x402: Agent Payments — pay per HTTP request with stablecoins on Celo
- MPP: Machine Payments Protocol — charge USDC per API request
- Model Context Protocol (MCP) — how MCP servers connect to your agent
- Self Agent ID — proof-of-human identity for an agent on Celo