Agent Pay MCP logo

Agent Pay MCP

Pays approved x402 API charges in USDC on Base using owner-signed merchant budgets.

Install Agent Pay MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "agent-pay-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@deepfirstsearch/agent-pay-mcp"
      ],
      "env": {
        "AGENT_PAY_AGENT_KEY": "YOUR_VALUE_HERE",
        "AGENT_PAY_BURNER_SEED": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

agent-pay-mcp exposes approved x402 payments to Claude, Cursor, Claude Code, and other MCP clients through a stdio server. Its three tools fetch paid URLs, list permitted merchants, and report budget status. Payments use USDC on Base and proceed only when the merchant, price, and remaining owner-defined budget match configuration and the on-chain policy. Reach for it when an agent needs to access paid APIs without letting model instructions determine payees, prices, or spending limits.

Use cases

  • Pay for approved x402 data APIs from an MCP client
  • Restrict agent spending with per-merchant budgets
  • Inspect permitted merchants and remaining balances
  • Test paid API access on Base Sepolia

Key features

  • USDC payments on Base
  • Owner-signed on-chain spending limits
  • Per-merchant payment policies
  • Three MCP tools for fetching and budget inspection
  • Optional x402 v1 merchant support
  • On-chain receipt confirmation by default

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

7/7 checks healthy over the last 25d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 7d ago via OSV.dev · @deepfirstsearch/agent-pay-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads1.7kPackage downloads in the last 30 days.
Last commit11d agoMost recent push to the default branch.

How Agent Pay MCP works

What agent-pay-mcp does

agent-pay-mcp gives an MCP-compatible agent a constrained way to call x402-protected APIs. It supports payment in USDC on Base and exposes three tools: paid_fetch, list_merchants, and budget_status.

paid_fetch requests a URL and can accept an HTTP method, request body, and content type. When the endpoint returns HTTP 402 Payment Required, the server evaluates the payment against the configured merchant, price, and available budget before attempting settlement. The model cannot use the tool to add merchants, raise limits, or choose a different payee from the one authorized by policy.

The package is intended for MCP clients such as Claude Desktop, Claude Code, and Cursor. It is distributed as @deepfirstsearch/agent-pay-mcp and runs locally as a stdio process.

How it works

Start the process with a configuration-file path. The MCP client communicates with the process over stdio, while the server uses the configured payment credentials and policy to handle eligible x402 responses.

Merchant permissions, prices, and spending limits come from the configuration and the owner-signed on-chain budget rather than from the model or an untrusted 402 response. The associated Agent Safe uses owner-signed, timelocked, per-merchant budgets. The agent key can spend within those boundaries but cannot expand them.

The implementation targets x402 v2 and allows x402 v1 merchants to be enabled per merchant with x402Versions. Receipt handling can confirm an unreadable receipt on-chain instead of resending a payment; confirmOnChain is enabled by default.

Setup and configuration

Run the server with npx and pass the path to a JSON configuration file:

config.json
{
  "mcpServers": {
    "agent-pay": {
      "command": "npx",
      "args": ["-y", "@deepfirstsearch/agent-pay-mcp", "/path/config.json"],
      "env": {
        "AGENT_PAY_AGENT_KEY": "0x…",
        "AGENT_PAY_BURNER_SEED": "0x…"
      }
    }
  }
}

The server requires an agent key and burner seed through environment variables in the example configuration, along with a policy configuration file defining permitted merchants and budgets. A Base Sepolia demonstration is available, and the project also reports a capped Base mainnet beta.

Tools and capabilities

  • paid_fetch(url, method?, body?, contentType?): fetches a URL and handles an eligible 402 response by paying when policy checks pass.
  • list_merchants(): shows merchants the agent is allowed to pay, their configured prices, and remaining budgets.
  • budget_status(): reports remaining budget by merchant, the plan window, and vault balance.
  • Supports USDC payments on Base.
  • Applies per-merchant policy checks and owner-signed on-chain spending limits.
  • Supports optional per-merchant x402 v1 participation through x402Versions.

Limitations and notes

The MCP package is described as pre-launch. The deployment has been tested on Base Sepolia with a real x402 payment, while Base mainnet operation is a capped beta. The on-chain contracts have not yet received a professional audit; the project states that an audit is planned before public launch. Use appropriate caution with live funds and verify the policy configuration before connecting an agent.

The server is limited to the payment flow and tools exposed through this MCP package. It does not give the model unrestricted control over the wallet or budget, and it does not make a merchant eligible merely because that merchant returns a 402 response.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Agent Pay MCP

agent-pay-mcp is an MCP server that connects Claude, Cursor, Claude Code, and other MCP clients to x402-protected APIs on Base. Its main tools are paid_fetch for approved USDC payments, list_merchants for allowed payees and prices, and budget_status for remaining merchant budgets and vault balance.

Install it through `npx` by configuring the MCP client to run `npx -y @deepfirstsearch/agent-pay-mcp /path/config.json`. Set the agent key and burner seed environment variables, then provide a policy configuration file.

Yes, agent-pay-mcp is intended for Claude Desktop, Claude Code, Cursor, and other MCP clients. Configure each client to launch the package as a stdio server and pass the configuration-file path as its argument.

No, it pays only merchants authorized by the configured policy and owner-signed budget. The merchant, price, and remaining allowance must match before payment proceeds, and an x402 response cannot add a new payee or increase the limit.

agent-pay-mcp uses USDC on Base. The project provides a Base Sepolia demo and reports a capped beta on Base mainnet.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAgent Pay MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/agent-pay-mcp?style=directory)](https://allmcps.com/mcp/agent-pay-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/agent-pay-mcp"><img src="https://allmcps.com/api/badge/agent-pay-mcp?style=directory" alt="Agent Pay MCP on AllMCPs" /></a>