# AgentPay — trust routing + spend caps for x402 agents

> AgentPay — trust routing + spend caps for x402 agents is a freemium MCP server for finance and payments. Budget-capped sessions, free market tools and receipts for agents paying over x402. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** CLI, API
- **Website:** https://agentpay.tools
- **Repository:** https://github.com/romudille-bit/agentpay
- **MCP Registry name:** io.github.romudille-bit/agentpay
- **Categories:** finance and payments, developer tools
- **Listing updated:** 2026-11-14

## About

AgentPay positions itself as the layer that decides whether an agent should spend money, not a wallet that moves it. Each session opens with a hard cap enforced at the payment layer, before any payment is signed; the agent can see call costs, check what remains and switch to cheaper options, and a receipt lists every call, cost and timestamp.

The MCP package offers a keyless mode with free tools, including url_reader, web_search, market_snapshot, token_price, gas_tracker and fear_greed_index. Wallet mode is off by default: set AGENTPAY_ENABLE_PAID to settle paid tools from a wallet the server mints on first run, with AGENTPAY_MAX_SPEND defaulting to $0.10 per session. Payments settle in USDC on Base and Stellar, and sBTC on Stacks.

The README counts 22 tools (17 free) and lists a verified_route trust oracle. A Python SDK installs with pip install agentpay-x402 and its quickstart() registers an agent and returns a capped session.

## Features

- **Enforced spend cap:** Hard budget applied before payments are signed.
- **Free tools:** Seventeen free tools for market data and web reading.
- **Session receipts:** Itemized record of calls, costs and transactions.
- **Opt-in wallet:** Paid tools settle only after enabling wallet mode.
- **Multi-network:** USDC on Base and Stellar, sBTC on Stacks.

## Good for

- Limit what an agent can spend per run
- Pull token prices and market snapshots without a wallet
- Audit what an agent paid for and why
- Route to the cheaper of two tools

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http agentpay https://agentpay.tools/mcp
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://agentpay.tools/mcp
```

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

```json
{
  "mcpServers": {
    "agentpay": {
      "url": "https://agentpay.tools/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "agentpay": {
      "type": "http",
      "url": "https://agentpay.tools/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "agentpay": {
      "serverUrl": "https://agentpay.tools/mcp"
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "agentpay": {
      "type": "http",
      "url": "https://agentpay.tools/mcp"
    }
  }
}
```

## Tools

- `url_reader`: Returns clean markdown for a web page URL.
- `web_search`: Returns the top 5 results with full content.
- `market_snapshot`: Returns S&P 500, Treasury yield, BTC, ETH and gas in one call.
- `token_price`: Returns price, 24h change and market cap for a symbol.
- `gas_tracker`: Returns slow, standard and fast gas prices and base fee.
- `fear_greed_index`: Returns the fear and greed value, classification and history.
- `token_market_data`: Returns market data for a token pair.

## FAQ

### Do I need a wallet?

Not for the free tools; paid wallet mode is off by default.

### What is the default cap?

$0.10 per session when wallet mode is enabled, via AGENTPAY_MAX_SPEND.

### Which networks are supported?

Base and Stellar with USDC, and Stacks with sBTC.

### How do I install the Python SDK?

pip install agentpay-x402.

### Is AgentPay — trust routing + spend caps for x402 agents free?

AgentPay — trust routing + spend caps for x402 agents has a free plan, with paid plans for more usage or features.

### How do I add AgentPay — trust routing + spend caps for x402 agents to Claude Code?

Run this command in your terminal: claude mcp add --transport http agentpay https://agentpay.tools/mcp

### What are the best alternatives to AgentPay — trust routing + spend caps for x402 agents?

The closest alternatives to AgentPay — trust routing + spend caps for x402 agents are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/agentpay-trust-routing-spend-caps-for-x402-agents
