get_billing_info is the whole local surface — it reports what the gateway supports and where to read further. The work starts when you register a server and point callers at /proxy/{slug}/mcp, after which payment verification, usage tracking and tier enforcement sit between the caller and your upstream with no billing code of your own. The x402 rail is what makes this usable by autonomous callers: USDC on Base with no key to issue, next to the Stripe options that suit human developers. If routing your traffic through someone else's proxy is the sticking point, the gateway ships as a Docker image you can run yourself.
A hosted billing proxy that sits between callers and an MCP server you operate. Register as an operator, register your server's upstream URL under a proxy slug, attach a pricing plan, and hand callers the proxied URL; the gateway verifies payment, tracks usage and enforces tiers before forwarding each call. The installable package is the discovery side of that — one tool reporting what the service supports and where the integration docs are.
- get_billing_info returns the service capabilities and the supported payment methods — stripe_subscription, stripe_metered and x402_crypto — with the integration docs alongside
- Registering an operator through /api/v1/operator/register returns an operator id and a bg_live_ API key
- Registering a server takes a name, the upstream_url of your MCP server and a proxy_slug; callers then connect to /proxy/{slug}/mcp instead of reaching your server directly
- A pricing plan sets billing_model, price_per_call_usd_micro and free_calls_per_month — the documented starter plan is 10000 micro-USD a call with the first 100 calls each month free
- Three ways for a caller to pay: a monthly or annual Stripe subscription, Stripe credits consumed per tool call, or USDC on Base over x402, which needs no API key at the caller's end
- The operator dashboard tracks revenue, usage and active callers in real time, with /api/v1/operator/stats behind it
- The gateway speaks Streamable HTTP MCP at /mcp/, and ships as a Docker image if you would rather run the proxy yourself than use the hosted deployment
The local package installs with pip install mcp-billing-gateway or runs as uvx mcp-billing-gateway over stdio, and takes no environment variables. The hosted gateway lives at https://mcp-billing-gateway-production.up.railway.app and also answers as a streamable-HTTP MCP server at /mcp/. Operators authenticate to the management API with Authorization: Bearer bg_live_…; callers authenticate to a proxied server with their own key. Self-hosting is a Docker build of the gateway. MIT.
One command — uvx mcp-billing-gateway
