Agent Pay MCP
x402 payments in USDC on Base inside an owner-signed budget the model cannot change
Agent Pay MCP is an open-source MCP server for finance and payments. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted
- Runs
- Locally
- What it can do
- Read-only
- Access
- Needs a secret key or token
- Version
- 0.2.1
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add agent-pay-mcp --env AGENT_PAY_BURNER_SEED='<AGENT_PAY_BURNER_SEED>' --env AGENT_PAY_AGENT_KEY='<AGENT_PAY_AGENT_KEY>' -- npx -y @deepfirstsearch/agent-pay-mcpAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"agent-pay-mcp": {
"command": "npx",
"args": [
"-y",
"@deepfirstsearch/agent-pay-mcp"
],
"env": {
"AGENT_PAY_BURNER_SEED": "<AGENT_PAY_BURNER_SEED>",
"AGENT_PAY_AGENT_KEY": "<AGENT_PAY_AGENT_KEY>"
}
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"agent-pay-mcp": {
"command": "npx",
"args": [
"-y",
"@deepfirstsearch/agent-pay-mcp"
],
"env": {
"AGENT_PAY_BURNER_SEED": "<AGENT_PAY_BURNER_SEED>",
"AGENT_PAY_AGENT_KEY": "<AGENT_PAY_AGENT_KEY>"
}
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"agent-pay-mcp": {
"command": "npx",
"args": [
"-y",
"@deepfirstsearch/agent-pay-mcp"
],
"env": {
"AGENT_PAY_BURNER_SEED": "<AGENT_PAY_BURNER_SEED>",
"AGENT_PAY_AGENT_KEY": "<AGENT_PAY_AGENT_KEY>"
}
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"agent-pay-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@deepfirstsearch/agent-pay-mcp"
],
"env": {
"AGENT_PAY_BURNER_SEED": "<AGENT_PAY_BURNER_SEED>",
"AGENT_PAY_AGENT_KEY": "<AGENT_PAY_AGENT_KEY>"
}
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add agent-pay-mcp --env AGENT_PAY_BURNER_SEED='<AGENT_PAY_BURNER_SEED>' --env AGENT_PAY_AGENT_KEY='<AGENT_PAY_AGENT_KEY>' -- npx -y @deepfirstsearch/agent-pay-mcpOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.agent-pay-mcp]
command = "npx"
args = ["-y", "@deepfirstsearch/agent-pay-mcp"]
env = { AGENT_PAY_BURNER_SEED = "<AGENT_PAY_BURNER_SEED>", AGENT_PAY_AGENT_KEY = "<AGENT_PAY_AGENT_KEY>" }Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"agent-pay-mcp": {
"command": "npx",
"args": [
"-y",
"@deepfirstsearch/agent-pay-mcp"
],
"env": {
"AGENT_PAY_BURNER_SEED": "<AGENT_PAY_BURNER_SEED>",
"AGENT_PAY_AGENT_KEY": "<AGENT_PAY_AGENT_KEY>"
}
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "agent-pay-mcp": { "command": "npx", "args": [ "-y", "@deepfirstsearch/agent-pay-mcp" ], "env": { "AGENT_PAY_BURNER_SEED": "<AGENT_PAY_BURNER_SEED>", "AGENT_PAY_AGENT_KEY": "<AGENT_PAY_AGENT_KEY>" } } } }Or run: gemini mcp add -s user -e AGENT_PAY_BURNER_SEED='<AGENT_PAY_BURNER_SEED>' -e AGENT_PAY_AGENT_KEY='<AGENT_PAY_AGENT_KEY>' agent-pay-mcp npx -- -y @deepfirstsearch/agent-pay-mcp
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "agent-pay-mcp": { "command": "npx", "args": [ "-y", "@deepfirstsearch/agent-pay-mcp" ], "env": { "AGENT_PAY_BURNER_SEED": "<AGENT_PAY_BURNER_SEED>", "AGENT_PAY_AGENT_KEY": "<AGENT_PAY_AGENT_KEY>" } } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "agent-pay-mcp": { "command": "npx", "args": [ "-y", "@deepfirstsearch/agent-pay-mcp" ], "env": { "AGENT_PAY_BURNER_SEED": "<AGENT_PAY_BURNER_SEED>", "AGENT_PAY_AGENT_KEY": "<AGENT_PAY_AGENT_KEY>" } } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "agent-pay-mcp": { "command": "npx", "args": [ "-y", "@deepfirstsearch/agent-pay-mcp" ], "env": { "AGENT_PAY_BURNER_SEED": "<AGENT_PAY_BURNER_SEED>", "AGENT_PAY_AGENT_KEY": "<AGENT_PAY_AGENT_KEY>" } } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "agent-pay-mcp": { "command": "npx", "args": [ "-y", "@deepfirstsearch/agent-pay-mcp" ], "env": { "AGENT_PAY_BURNER_SEED": "<AGENT_PAY_BURNER_SEED>", "AGENT_PAY_AGENT_KEY": "<AGENT_PAY_AGENT_KEY>" } } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "agent-pay-mcp": { "command": "npx", "args": [ "-y", "@deepfirstsearch/agent-pay-mcp" ], "env": { "AGENT_PAY_BURNER_SEED": "<AGENT_PAY_BURNER_SEED>", "AGENT_PAY_AGENT_KEY": "<AGENT_PAY_AGENT_KEY>" } } } }The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.
Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "agent-pay-mcp": { "command": "npx", "args": [ "-y", "@deepfirstsearch/agent-pay-mcp" ], "env": { "AGENT_PAY_BURNER_SEED": "<AGENT_PAY_BURNER_SEED>", "AGENT_PAY_AGENT_KEY": "<AGENT_PAY_AGENT_KEY>" } } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "agent-pay-mcp": { "command": "npx", "args": [ "-y", "@deepfirstsearch/agent-pay-mcp" ], "env": { "AGENT_PAY_BURNER_SEED": "<AGENT_PAY_BURNER_SEED>", "AGENT_PAY_AGENT_KEY": "<AGENT_PAY_AGENT_KEY>" } } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
Configuration
AGENT_PAY_BURNER_SEED32-byte hex secret the per-merchant payer addresses are derived from. Never your owner key.RequiredAGENT_PAY_AGENT_KEYThe budget's agent key (needed when a vault is configured).
About Agent Pay MCP
Agent Pay MCP lets an agent pay x402 APIs without being able to overspend, even if a web page or API response tries to prompt-inject it. The model gets only a handful of tools. It cannot choose a payee, amount, network or limit, because there is no argument for any of them. Merchants, price pins, caps and the spending plan come from your config file, and keys come from environment variables.
A payment goes through only if the merchant, price and budget match your configuration. A free price-check tool shows what paying a URL would do, or why it would refuse, without signing anything. Responses come back inside a randomly tagged fence marked as untrusted data. Optionally an on-chain vault enforces your signed per-payment and per-day caps even if the machine is compromised.
The README warns this is a beta and unaudited, and advises Base Sepolia or small amounts on mainnet. It ships a preset of 35 verified x402 sellers and an offline mock merchant for trying it.
Tools this server provides (4)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, all 4 tools only read data.
From the server's own tool labels and tool names; not verified by us.
- paid_fetchName suggests: reads
- Fetch a URL and pay a 402 challenge only if it matches your config.
- check_priceName suggests: reads
- Show what paying a URL would do without paying.
- list_merchantsName suggests: reads
- List payable origins, prices and remaining budget.
- budget_statusName suggests: reads
- Show remaining budget and vault balance.
What it does
- Budgeted payments
- Pays x402 APIs in USDC on Base within fixed limits.
- Price check
- Previews what a payment would do without paying.
- Merchant allow-list
- Only configured origins and payee addresses can be paid.
- Untrusted response fence
- Wraps responses as untrusted data to blunt prompt injection.
- On-chain vault
- Optional signed caps enforced on-chain.
- Verified seller preset
- Ships 35 sellers with confirmed payee and price.
Good for
- Let an agent buy data from paid APIs with a hard spending cap
- Test refusal of a hostile payment request safely
- Cap a day's spend across several merchants
- Try payments offline against a mock merchant
Pricing
Open source
Free software; payments are made in USDC to merchants you configure
Agent Pay MCP FAQ
Can the model change the budget?
No. The model has no argument for payee, amount, network or limit; those come from your config.
Is Agent Pay MCP production ready?
The README labels it beta and unaudited and suggests Base Sepolia or small amounts.
Which tools does the model get?
paid_fetch, check_price, list_merchants and budget_status.
Does Agent Pay MCP need a vault?
No. Without a vault each merchant gets its own payer address that you fund yourself.
Is Agent Pay MCP free?
Yes. Agent Pay MCP is open source, so you can use and self-host it for free.
How do I add Agent Pay MCP to Claude Code?
Run this command in your terminal: claude mcp add agent-pay-mcp --env AGENT_PAY_BURNER_SEED='<AGENT_PAY_BURNER_SEED>' --env AGENT_PAY_AGENT_KEY='<AGENT_PAY_AGENT_KEY>' -- npx -y @deepfirstsearch/agent-pay-mcp
What are the best alternatives to Agent Pay MCP?
The closest alternatives to Agent Pay MCP are REA, AiSOC, Solana MCP by Vybe, x64dbg-mcp-server and redamon.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.



