MCP-Billing
Open SiteMCP-Billing is a self-hosted Next.js and TypeScript boilerplate for monetized MCP servers. It packages OAuth 2.1, PKCE, API keys, zero-downtime rotation, Stripe usage billing, Redis rate limiting, and a free open-source metering core.
Added on August 6, 2026
Product Information
What is MCP-Billing?
MCP-Billing is a developer boilerplate for teams building commercial MCP servers. It bundles the infrastructure pieces that are usually painful to assemble: OAuth 2.1 with PKCE, API key management, key rotation, usage metering, Stripe billing, and Redis rate limiting. The product is self-hosted, built with Next.js and TypeScript, and sold as a one-time kit rather than a revenue-share platform. It is useful for developers who want to ship a paid MCP product without spending weeks wiring auth and billing from scratch.
How to use MCP-Billing?
- Buy or download the MCP-Billing boilerplate and set it up in a Next.js project.
- Configure OAuth providers, PKCE settings, API key rules, Redis, and Stripe credentials.
- Integrate the metering module with the MCP server actions that should be billable.
- Deploy the self-hosted application and test authentication, rate limits, and usage events.
- Use the admin and billing flows to manage customers, usage, invoices, and key rotation.
Core Features
- OAuth 2.1 and PKCE - Provides a modern authorization flow for MCP clients and users.
- API key management - Issues and rotates keys with zero-downtime migration support.
- Usage metering - Tracks billable MCP server activity through an open-source metering core.
- Stripe billing - Connects usage data to paid plans and invoices.
- Redis rate limiting - Protects server endpoints from excessive or abusive requests.
- Self-hosted architecture - Avoids platform lock-in and revenue sharing.
- Tested modules - Ships as a structured TypeScript boilerplate with extensive tests.
Use Cases
- Paid MCP server launch - Add auth and billing before releasing a commercial MCP endpoint.
- Developer boilerplate - Start from a working monetization stack instead of building every module manually.
- Usage-based SaaS - Meter API or tool calls and bill customers according to actual usage.
- Self-hosted monetization - Keep customer and billing infrastructure under the team's own deployment control.