# agent-pay-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/DeepFirstHQ/deepfirstsearch  
**GitHub Stars:** 1  
**npm Downloads (last month):** 3704  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/agent-pay-mcp

## Description
x402 payments in USDC on Base inside an owner-signed, on-chain budget the model can't change

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "agent-pay-mcp": {
    "command": "npx",
    "args": ["-y","@deepfirstsearch/agent-pay"],
    "env": {
      "AGENT_PAY_AGENT_KEY": "",
      "AGENT_PAY_BURNER_SEED": ""
    }
  }
}
```

**Requires environment variables:** `AGENT_PAY_AGENT_KEY`, `AGENT_PAY_BURNER_SEED` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What agent-pay-mcp does

The agent-pay-mcp MCP server exposes paid x402 API access to MCP clients such as Claude Desktop, Claude Code, Cursor, and other MCP-compatible applications. It handles payments in USDC on Base when a requested resource returns `402 Payment Required` and the request satisfies the configured merchant, price, and budget rules.

The server provides three tools:

- `paid_fetch` requests a URL and can accept an HTTP method, request body, and content type. If payment is required, it evaluates the payment before attempting to settle it.
- `list_merchants` reports the merchants the agent is permitted to pay, their configured prices, and remaining budget information.
- `budget_status` reports remaining funds by merchant, the plan window, and the vault balance.

The model does not supply the payee, price, or spending limit. Those values come from the configuration and the owner-signed on-chain budget. This separates the agent’s payment proposal from the policy that authorizes spending.

## How it works

agent-pay-mcp runs as a stdio MCP server. A client starts the package with `npx @deepfirstsearch/agent-pay-mcp` and passes the path to a JSON configuration file. The process receives tool calls from the MCP client and uses the configured payment credentials and policy to access x402 resources.

The payment flow is intended for x402 APIs on Base. The underlying implementation uses x402 version 2 by default, with version 1 merchants enabled explicitly per merchant through configuration. If a receipt cannot be read, the server confirms the result on-chain instead of automatically resending the payment; this behavior is enabled by default according to the repository description.

The associated Agent Safe uses owner-signed, timelocked, per-merchant budgets. The agent key can spend within those limits but cannot expand them. The repository reports a real payment on Base Sepolia and an unaudited beta deployment on Base mainnet.

## Setup and configuration

Start the server with a configuration path:

```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 configuration defines permitted payees, prices, and limits. The environment supplies the agent key and burner seed shown in the documented MCP setup. The repository links a separate MCP integration guide with the full configuration reference and a Base Sepolia demonstration.

## Tools and capabilities

agent-pay-mcp supports controlled fetching of paid resources, merchant discovery, and budget inspection. It is suited to agents that need to retrieve data from x402 merchants without allowing the model to select arbitrary payees or alter spending limits. The package is distributed as `@deepfirstsearch/agent-pay-mcp` and is launched locally through `npx`.

## Limitations and notes

Payments are limited to USDC on Base in this MCP integration. The project describes the Base mainnet deployment as an unaudited beta and identifies the MCP server as pre-launch, while Base Sepolia has a tested payment demonstration. The server does not provide a general-purpose wallet for unrestricted transfers; its documented tools operate within the configured merchant and budget policy. No token is available according to the repository status.

_Full upstream README: https://allmcps.com/mcp/agent-pay-mcp/readme_

