# x402receipts

This MCP server logs an agent’s x402 purchases and checks receipts against on-chain payments. Use it to inspect receipts and spot unmatched transfers.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 1
- Author: x402receipts
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/x402receipts/x402receipts
- Updated: 2026-09-29
- HTML: https://affpapa.org/en/nevibecode/mcp/x402receipts

## What it does

The server exposes `record_receipts`, `verify_receipt`, and `service_info`. It records x402 purchases and compares receipts with outgoing USDC transfers on Base and Solana. A transfer without a matching receipt is flagged; individual receipts can be checked separately.

Claude Code setup uses `X402RECEIPTS_EVM_PRIVATE_KEY` and `X402RECEIPTS_SOLANA_PRIVATE_KEY`. The server will not be configured by the listed command until you provide those key values. Start it with `npx -y x402receipts-mcp`. Codex, Cursor, GitHub Copilot, and Gemini CLI are also listed as supported platforms. Wallet owners can view supplier spending and export CSV or signed JSON reports.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `X402RECEIPTS_EVM_PRIVATE_KEY`, `X402RECEIPTS_SOLANA_PRIVATE_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mcp -e X402RECEIPTS_EVM_PRIVATE_KEY=<X402RECEIPTS_EVM_PRIVATE_KEY> -e X402RECEIPTS_SOLANA_PRIVATE_KEY=<X402RECEIPTS_SOLANA_PRIVATE_KEY> -- npx -y x402receipts-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add x402receipts --env X402RECEIPTS_EVM_PRIVATE_KEY=<X402RECEIPTS_EVM_PRIVATE_KEY> --env X402RECEIPTS_SOLANA_PRIVATE_KEY=<X402RECEIPTS_SOLANA_PRIVATE_KEY> -- npx -y x402receipts-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "x402receipts": {
            "command": "npx",
            "args": [
                "-y",
                "x402receipts-mcp"
            ],
            "env": {
                "X402RECEIPTS_EVM_PRIVATE_KEY": "<X402RECEIPTS_EVM_PRIVATE_KEY>",
                "X402RECEIPTS_SOLANA_PRIVATE_KEY": "<X402RECEIPTS_SOLANA_PRIVATE_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "x402receipts": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "x402receipts-mcp"
            ],
            "env": {
                "X402RECEIPTS_EVM_PRIVATE_KEY": "<X402RECEIPTS_EVM_PRIVATE_KEY>",
                "X402RECEIPTS_SOLANA_PRIVATE_KEY": "<X402RECEIPTS_SOLANA_PRIVATE_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e X402RECEIPTS_EVM_PRIVATE_KEY=<X402RECEIPTS_EVM_PRIVATE_KEY> -e X402RECEIPTS_SOLANA_PRIVATE_KEY=<X402RECEIPTS_SOLANA_PRIVATE_KEY> x402receipts npx -y x402receipts-mcp
```
Replace <…> with your own values

## When to use it
- log an agent’s x402 purchases
- match receipts to USDC transfers
- check whether a receipt is valid
- find payments without matching receipts
- export supplier spending as CSV

## Example prompts
- Record the receipts for the agent’s x402 purchases.
- Check this receipt and tell me whether it can be verified.
- Find USDC transfers that have no matching receipt.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74569
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89899

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
