MCP server that demos agent pay-per-call inside your own AI. Paper mode: 402 challenge, payment, signed receipt — no real money moves.
Project description
tollbooth-mcp
Watch agents pay per call — inside your own AI.
An MCP server that demonstrates the full x402 pay-per-call loop in paper mode: your assistant asks for a quote, gets an HTTP-402-style challenge, pays a simulated toll, and receives the result with a genuine receipt from the live nano-empire-tollbooth escrow lifecycle. No real money moves.
Install
pip install tollbooth-mcp
Claude Desktop / Claude Code
{
"mcpServers": {
"tollbooth": { "command": "tollbooth-mcp" }
}
}
Cursor
{ "mcp": { "servers": { "tollbooth": { "command": "tollbooth-mcp" } } } }
Then ask your assistant: "Use the tollbooth to run a paid call and show me the receipt."
Tools
| Tool | What it does |
|---|---|
quote_toll |
Returns the x402 payment challenge an agent would receive (402, price, nonce) |
demo_paid_call |
Runs a real metered function: escrow lock → work → release → receipt |
get_session_ledger |
Every paper-mode receipt issued this session, with running total |
about_tollbooth |
What the real package does and where to learn more |
Monetize your own functions
The real thing is one decorator:
from nano_empire_tollbooth import monetize
@monetize(price_usd=0.01)
def summarize(text: str) -> str:
return my_llm(text)
- Quickstart: https://neuralempireai.com/docs/quickstart.html
- Live simulator: https://neuralempireai.com/simulator/
- Source: https://github.com/roblambert9/nano-empire-tollbooth
Paper mode is a simulation. No revenue is guaranteed; this is a metering SDK, not an income product. MIT licensed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tollbooth_mcp-0.1.0.tar.gz.
File metadata
- Download URL: tollbooth_mcp-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a866edbdb85ce132ac35f8df2e23d30db72adb0c609bddcb252439444f13b8d
|
|
| MD5 |
75d27949d2d95b0ac429d21895b96f56
|
|
| BLAKE2b-256 |
2e499ce2d158cdfa9e09d020e5834913018ebd4021e5b409381a2455c9bb75c0
|
File details
Details for the file tollbooth_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tollbooth_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d27190e5d3584a58ce769232382bf56150d6a0ad0ec7cfc1ed736cc667320ca5
|
|
| MD5 |
604f168ec6e2ee79fe8724dd51853456
|
|
| BLAKE2b-256 |
faddb786a6cc945ed7671d83aa4ebda4659e3d2363c6d3ed4a83792d169a0de7
|