# nano-pay

This MCP server pays x402 APIs with Nano from a local wallet and can run merchant endpoints that verify and settle incoming payments.

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

## What it does

nano-pay gives an agent a self-custodied Nano (XNO) wallet and an x402 payment client. It reads the required price, applies a cap, signs a send block on the local machine, then retries the request with payment headers. The `quote` command inspects a price without paying, while `nano-pay serve` supports paid endpoints with on-ledger verification and settlement.

The seed stays in `~/.nano-pay/wallet.json` with `0600` permissions. A Nano node is not needed: the client uses public RPC failover, and signing plus proof of work happen locally. The package needs Python 3.10+, while NanSwap top-ups require `NANSWAP_API_KEY`. The project is Beta and not audited, so the wallet should contain working capital only.

Each payment is recorded in `pending-payments.json`, allowing the same signed block to be presented again after a failed response. The balance is refreshed from the network before operations. Do not issue concurrent payments from one wallet, since competing blocks can invalidate one of them.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add nano-pay -- uvx feeless402
```
uvx runs the command named after the package; if the README names another one, use uvx --from feeless402 <command>

### Codex

**Platform CLI**
```bash
codex mcp add nano-pay -- uvx feeless402
```
uvx runs the command named after the package; if the README names another one, use uvx --from feeless402 <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "nano-pay": {
            "command": "uvx",
            "args": [
                "feeless402"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from feeless402 <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "nano-pay": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "feeless402"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from feeless402 <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add nano-pay uvx feeless402
```
uvx runs the command named after the package; if the README names another one, use uvx --from feeless402 <command>

## When to use it
- pay an x402 API request from an agent
- inspect an endpoint price before spending
- top up the Nano wallet through NanSwap
- serve an API endpoint that accepts Nano payments
- recover a payment after a failed response

## Example prompts
- Pay for `nano-gpt.com/api/v1/chat/completions` and report whether the payment is confirmed on the ledger.
- Check the x402 price for this endpoint without making a paid request.
- Run `nano-pay serve` for a paid endpoint and verify the Nano settlement.

## 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
