Skip to main content
Glama
README.md
# crypto-payments-mcp

**🌐 [crypto-payments-mcp.online](https://irun2themoney.github.io/crypto-payments-mcp/)** — live demo, tool reference, and install links.

An [MCP](https://modelcontextprotocol.io) server that lets AI agents **read crypto wallets and prove on-chain payments** across Ethereum and Solana.

It exists for one job: the **x402 close-loop**. Before an agent hands over work (an API response, a file, a result), it can verify the buyer's payment actually landed at the expected address — on-chain, with no backend and no API key.

## Why this exists

Agents that sell things on-chain can't easily answer "did I get paid?" The primitives are not one-liners:

- Proving a transfer hit a specific recipient (native ETH/SOL *or* an ERC-20 like USDC)
- Reading an address's native + token balances
- Decoding what a transaction actually did
- Resolving ENS names so a payment request can arrive as `vitalik.eth`

`crypto-payments-mcp` wraps those reads behind clean MCP tools so any agent client can call them.

## Install

```bash
npx -y crypto-payments-mcp
```

Or add it to your agent's MCP config:

```json
{
  "mcpServers": {
    "crypto-payments-mcp": {
      "command": "npx",
      "args": ["-y", "crypto-payments-mcp"]
    }
  }
}
```

Works with Claude, Cursor, Hermes, ElizaOS, and any MCP client.

A hosted HTTP endpoint is also available for remote clients:

```
https://crypto-payments-mcp.irun2themoney.workers.dev/mcp
```

## Tools

| Tool | What it does |
|------|--------------|
| `verify_payment` | Confirm a payment reached the expected recipient (native ETH/SOL or ERC-20). The x402 close-loop. |
| `wallet_balance` | Native + ERC-20 balance for any address. |
| `token_info` | ERC-20 metadata (symbol, name, decimals) from a contract. |
| `decode_transaction` | From/to/value + ERC-20 transfer for an Ethereum tx. |
| `resolve_ens` | ENS name → address, or address → primary ENS name. |
| `chain_status` | Latest block/slot — a quick chain-liveness check. |
| `token_price` | Spot USD price via a Chainlink feed (no API key). |
| `transaction_history` | **PREMIUM** — recent transactions for an address (indexer view free RPCs can't give). Gated by an on-chain payment. |

## How it works

- **No API key, no backend, no accounts.** On-chain reads use free public RPCs (llamarpc for ETH, Solana mainnet for SOL).
- **Stateless and safe-fail.** If a chain can't be reached, the tool reports the error instead of guessing.
- **Zero dependencies.** Pure Node stdlib — drop it into any agent runtime.

## Premium tool (x402)

Six tools are free to drive adoption. `transaction_history` is premium: an agent pays our address on-chain, then calls again with the payment tx hash; the server verifies the payment via `verify_payment` before returning data. No backend, no accounts — the payment *is* the access key.

- Price: `0.5` USDC (ERC-20), `0.001` ETH, or `0.01` SOL.
- Receive: ETH/USDC `0xc62b0aCba58E2Fc31cE2d27721Ee51154a808f52`, SOL `D19x8rMGo9dCv98UGaNuv6SM2Xov8Q5TxCkjrmfeynmn`

## License

MIT. Free to use, modify, and ship inside your own agent.
Last verified: 2026-07-16 UTC