# Agent Pay MCP

> Agent Pay MCP is an open-source MCP server for finance and payments. x402 payments in USDC on Base inside an owner-signed budget the model cannot change. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/deepfirsthq/deepfirstsearch/tree/HEAD/integrations/mcp
- **MCP Registry name:** com.deepfirstsearch/agent-pay-mcp
- **Categories:** [finance and payments](https://ai-powered.com/categories/finance-and-payments), [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-11-23

## About

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.

## Features

- **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

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
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
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```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>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```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.

### Cursor (~/.cursor/mcp.json)

```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.

### VS Code (~/.copilot/mcp-config.json)

```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.

### Codex: Add with the CLI (Terminal)

```sh
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-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```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>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```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

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```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 (~/.config/devin/mcp_config.json)

```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 (cline_mcp_settings.json)

```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 (Zed settings.json)

```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 (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```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>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```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 (~/.kiro/settings/mcp.json)

```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.

### Other clients (your client's MCP settings (most use this shape))

```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>"
      }
    }
  }
}
```

## Tools

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_fetch` (name suggests: reads): Fetch a URL and pay a 402 challenge only if it matches your config.
- `check_price` (name suggests: reads): Show what paying a URL would do without paying.
- `list_merchants` (name suggests: reads): List payable origins, prices and remaining budget.
- `budget_status` (name suggests: reads): Show remaining budget and vault balance.

## 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.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [AiSOC](https://ai-powered.com/mcp/aisoc): AiSOC is an open-source MCP server for ai models and llm tooling.
- [Solana MCP by Vybe](https://ai-powered.com/mcp/solana-mcp-by-vybe): Solana MCP by Vybe is an MCP server for finance and payments.
- [x64dbg-mcp-server](https://ai-powered.com/mcp/x64dbg-mcp-server): x64dbg-mcp-server is an open-source MCP server for ai models and llm tooling.
- [redamon](https://ai-powered.com/mcp/redamon): redamon is an open-source MCP server for ai models and llm tooling.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [Treasure Map](https://ai-powered.com/mcp/treasure-map): Treasure Map is an open-source MCP server for security.
- [Agent Roast](https://ai-powered.com/mcp/agent-roast): Agent Roast is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/agent-pay-mcp
