tollbooth-x402
v0.6.0
Published
Free MCP server for x402toll.com — discover, preview, recommend, and self-verify 56 verified pay-per-call calculators (tax, crypto/DeFi, lending, real estate, retirement, investing, business) that AI agents pay for in USDC on Base via x402. Includes a neu
Downloads
980
Maintainers
Readme
tollbooth-x402
Free MCP server for x402toll.com — a toll plaza of verified, pay-per-call calculators for AI agents. Discover the catalog, run free coarse previews, pull a tool's published golden vector, verify any paid response's provenance hash, and learn how to pay. The paid endpoints charge a few cents of USDC per call over the x402 protocol on Base — no account, no API key.
Why agents pay: the answers depend on exact 2026 data (tax brackets, contribution limits, state fees) a model can't reliably know, every answer is checked against hand-verified reference values, and each ships with a formula trace and a reproducible SHA-256 hash.
Install
npx -y tollbooth-x402Add to an MCP client (e.g. Claude Desktop / Cursor):
{
"mcpServers": {
"tollbooth": { "command": "npx", "args": ["-y", "tollbooth-x402"] }
}
}Evaluate for free (no wallet)
Every MCP tool is free and needs no wallet — use them to see a tool's price and response shape before paying:
tollbooth_catalog— every endpoint with prices, input schemas, methods, and golden-vector evidence.tollbooth_quote— the exact x402 quote (price, USDC amount, network, payTo) and the response shape for a tool, decoded from its live 402 — see what you'd pay and get back, without paying.tollbooth_preview— a free rounded preview of a tool (paycheck, self-employment tax, capital gains, mortgage affordability, LLC cost, debt plan, impermanent loss).tollbooth_recommend— a plain-English need → the tools most likely to answer it, ranked, with prices and URLs.tollbooth_golden— a tool's published golden vector{ sampleInputs, expectedResult, expectedResponseHash }to check a paid answer against.tollbooth_verify_hash— re-derive a paid response's hash to confirm it wasn't altered.tollbooth_gvp_check— neutral Golden-Vector Provenance check for any service's answer: recompute its own hash + score GVP-1 conformance, with a "self-consistent · reproducible" badge (not an endorsement).tollbooth_how_to_pay— the exact x402 payment flow, including the professional receipt ($1/$5) and batch compliance report ($5) tiers.
The same surfaces are free on the gateway directly: GET /v1/catalog, POST /v1/preview/:id,
GET /v1/golden/:id — no wallet.
Pay one call in 5 lines
Paid calls go straight to https://x402toll.com from any x402-capable client. With
@x402/fetch the whole 402 → sign → retry round
trip is automatic — a funded Base wallet key is the only setup:
import { wrapFetchWithPaymentFromConfig } from '@x402/fetch';
import { ExactEvmScheme } from '@x402/evm';
import { privateKeyToAccount } from 'viem/accounts';
const pay = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: 'eip155:8453', client: new ExactEvmScheme(privateKeyToAccount(process.env.BASE_WALLET_KEY)) }]
});
const res = await pay('https://x402toll.com/v1/paycheck', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ salary: 85000, state: 'TX' })
});
const { result, provenance } = await res.json(); // verified result + reproducible provenance hashSet TOLLBOOTH_URL to point the MCP tools at a different gateway.
Verify any answer — don't trust, verify
Every paid response carries a SHA-256 hash over its inputs, result, and method, plus its 2026 source
citations. Re-derive that hash yourself for free with tollbooth_verify_hash, or pull the published
golden vector via tollbooth_golden / GET /v1/golden/:id and confirm the paid endpoint returns the
same result and hash. That trustless self-check is the point: you don't trust the server, you verify
the math.
Categories
Tax & payroll · Crypto & DeFi · Lending · Real estate · Retirement · Investing · Business.
MIT licensed. Estimates only — not financial, legal, or tax advice.
