MCP Billing Gateway SDK

MCP Billing Gateway SDK

Universal billing gateway for MCP servers. Add Stripe subscription billing to any MCP server with one line of code. Supports tiered plans, usage tracking, and automatic access control.

Category
Visit Server

README

<!-- mcp-name: io.github.sapph1re/mcp-billing-gateway -->

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

<!-- mcp-name: io.github.sapph1re/mcp-billing-gateway -->

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured