Skip to main content

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)

Paper mode is a simulation. No revenue is guaranteed; this is a metering SDK, not an income product. MIT licensed.

Metadata

Release files for tollbooth-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tollbooth-mcp 0.1.0
File Size Uploaded Provenance Actions
tollbooth_mcp-0.1.0.tar.gz 5.2 kB Without provenance Details for tollbooth_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tollbooth-mcp 0.1.0
File Interpreter ABI Platform Actions
tollbooth_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for tollbooth_mcp-0.1.0-py3-none-any.whl

Total release size: 10.6 kB

Release files / tollbooth_mcp-0.1.0.tar.gz

Download URL tollbooth_mcp-0.1.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0a866edbdb85ce132ac35f8df2e23d30db72adb0c609bddcb252439444f13b8d
BLAKE2b-256 checksum
How to use checksums
2e499ce2d158cdfa9e09d020e5834913018ebd4021e5b409381a2455c9bb75c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / tollbooth_mcp-0.1.0-py3-none-any.whl

Download URL tollbooth_mcp-0.1.0-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d27190e5d3584a58ce769232382bf56150d6a0ad0ec7cfc1ed736cc667320ca5
BLAKE2b-256 checksum
How to use checksums
faddb786a6cc945ed7671d83aa4ebda4659e3d2363c6d3ed4a83792d169a0de7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for tollbooth-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page