Metadata-Version: 2.4
Name: xrpl-x402-payer
Version: 0.1.1
Summary: CLI, proxy, and MCP payer for XRPL exact x402 payments
Project-URL: Homepage, https://github.com/lgcarrier/xrpl-x402-stack
Project-URL: Documentation, https://lgcarrier.github.io/xrpl-x402-stack/packages/payer/
Project-URL: Repository, https://github.com/lgcarrier/xrpl-x402-stack
Project-URL: Issues, https://github.com/lgcarrier/xrpl-x402-stack/issues
Project-URL: Changelog, https://github.com/lgcarrier/xrpl-x402-stack/blob/main/CHANGELOG.md
Author-email: Louis-Guillaume Carrier-Bedard <lgcarrier@gmail.com>
License-Expression: MIT
Keywords: mcp,payer,payments,x402,xrpl
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: httpx==0.28.1
Requires-Dist: pydantic<3,>=2
Requires-Dist: starlette<1,>=0.37
Requires-Dist: typer<1,>=0.12
Requires-Dist: uvicorn<1,>=0.30.6
Requires-Dist: xrpl-py==4.5.0
Requires-Dist: xrpl-x402-client<0.2.0,>=0.1.1
Requires-Dist: xrpl-x402-core<0.2.0,>=0.1.0
Provides-Extra: mcp
Requires-Dist: fastmcp>=3.1.0; extra == 'mcp'
Description-Content-Type: text/markdown

# xrpl-x402-payer

`xrpl-x402-payer` is the buyer-side CLI, proxy, and MCP package for the Open XRPL x402 Stack.

## Install

```bash
pip install xrpl-x402-payer
```

Install MCP support for Claude Desktop, Cursor, and other local agents:

```bash
pip install "xrpl-x402-payer[mcp]"
```

## CLI

```bash
xrpl-x402 pay https://merchant.example/premium --amount 0.001 --asset XRP --dry-run
xrpl-x402 proxy https://merchant.example --port 8787
xrpl-x402 skill install
xrpl-x402 mcp
```

`pay` sends one request, pays a valid x402 challenge when needed, and stores local receipts.

`proxy` runs a local forward proxy that auto-pays valid x402 challenges before retrying upstream.

`skill install` writes the bundled skill to `~/.agents/skills/xrpl-x402-payer/SKILL.md`.

`mcp` starts the stdio MCP server for Claude Desktop, Cursor, and compatible local agent runtimes.

## Claude Desktop / Cursor

```bash
claude mcp add xrpl-x402-payer -- xrpl-x402 mcp
```

Cursor can use the same command as a local MCP server.

## Environment

- `XRPL_WALLET_SEED`: wallet seed used for signing payments
- `XRPL_RPC_URL`: defaults to XRPL Testnet RPC
- `XRPL_NETWORK`: defaults to `xrpl:1`
- `XRPL_X402_RECEIPTS_PATH`: optional override for local receipt storage
- `XRPL_X402_MAX_SPEND`: optional default spend cap used by `budget_status`

## Public API

- `XRPLPayer`
- `PayResult`
- `ReceiptRecord`
- `budget_status`
- `get_receipts`
- `pay_with_x402`
- `create_proxy_app`

## Provenance

The implementation is independently developed for the open `x402` protocol and does not copy `x402-xrpl`.
