Skip to main content

MCP Billing Gateway

Add Stripe subscriptions, per-call credits, and x402 crypto payments to any MCP server — without writing billing code.

Live service: https://mcp-billing-gateway-production.up.railway.app


What it does

MCP Billing Gateway is a proxy that sits in front of your MCP server and handles all billing automatically:

  • Per-call billing — charge callers per tool call (fiat or crypto)
  • Subscriptions — monthly/annual Stripe plans with call limits
  • Tiered pricing — free tier + paid tiers based on usage
  • x402 micropayments — accept USDC on Base from AI agents with no API keys
  • Operator dashboard — track revenue, usage, and callers in real time

How it works

AI Agent → MCP Billing Gateway → Your MCP Server
            (billing enforced here)
  1. Register as an operator
  2. Register your MCP server URL + pricing plan
  3. Point callers to your proxy slug: https://mcp-billing-gateway.../proxy/{your-slug}/...
  4. Callers pay via Stripe API key or x402 USDC — billing is handled transparently

Quick Start

Register as operator

curl -X POST https://mcp-billing-gateway-production.up.railway.app/api/v1/operator/register \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "name": "Your Name"}'

Register your MCP server

curl -X POST https://mcp-billing-gateway-production.up.railway.app/api/v1/servers \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My MCP Server",
    "upstream_url": "https://your-mcp-server.com/mcp",
    "proxy_slug": "my-server"
  }'

Create a pricing plan

curl -X POST https://mcp-billing-gateway-production.up.railway.app/api/v1/servers/{server_id}/plans \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pay as you go",
    "billing_model": "per_call",
    "price_per_call_usd_micro": 10000,
    "free_calls_per_month": 100
  }'

Callers connect to your proxied server

{
  "mcpServers": {
    "my-server": {
      "url": "https://mcp-billing-gateway-production.up.railway.app/proxy/my-server/mcp",
      "headers": {
        "Authorization": "Bearer CALLER_API_KEY"
      }
    }
  }
}

Payment Methods

Method Best for How
Stripe subscription Human developers Monthly/annual plan
Stripe per-call Human developers Credits consumed per call
x402 micropayments AI agents USDC on Base, no API keys

Operator Dashboard

Access your dashboard at:

https://mcp-billing-gateway-production.up.railway.app/dashboard

Track revenue, usage, active callers, and configure your servers.

API Reference

Full API docs at: https://mcp-billing-gateway-production.up.railway.app/health

Operator endpoints

  • POST /api/v1/operator/register — create operator account
  • GET /api/v1/operator/profile — view profile and API keys
  • GET /api/v1/operator/stats — revenue and usage stats

Server management

  • POST /api/v1/servers — register an MCP server
  • GET /api/v1/servers — list your servers
  • POST /api/v1/servers/{id}/plans — create pricing plan

Proxy

  • * /proxy/{slug}/* — proxied calls with billing enforcement

Self-hosted

The gateway is open for use. If you need a self-hosted deployment, contact us.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_billing_gateway-0.1.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_billing_gateway-0.1.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file mcp_billing_gateway-0.1.2.tar.gz.

File metadata

  • Download URL: mcp_billing_gateway-0.1.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for mcp_billing_gateway-0.1.2.tar.gz
Algorithm Hash digest
SHA256 174c2ee5f0d6f05ed1264f6f43de724042cfd3532e6208c6ca2e5d4d7dd6a54f
MD5 d0cb1156d1a52f28d12435b7833c423a
BLAKE2b-256 7fffe8f6c8f6a7bbf28583598c0366de4f5945416d154575829bf5edbc7624ec

See more details on using hashes here.

File details

Details for the file mcp_billing_gateway-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_billing_gateway-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1f069be98fe6b849d24cc5453aa170ecb92ffb5176a3bbb037441194b7fd59bc
MD5 809e96dae592aba3993282533305adbf
BLAKE2b-256 423d679b261f083744408b948dc0a6a1ba7d3b5d7c3227ccbb9926b7f61a0d40

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page