MCP-Billing
Authentication and billing template for MCP servers, with OAuth 2.1, API keys, Stripe metering, and rate limiting ready out of the box.
About MCP-Billing
MCP-Billing is an authentication and billing template for MCP servers, with OAuth 2.1, API keys, Stripe usage metering, and rate limiting prewired and ready to run. It supports per-call or per-token billing, clearly handles retries, partial failures, and interrupted streams, and includes code examples; every usage event carries an idempotency key, so submitting the same key twice incurs only one charge. The solution works as an independent layer: MCP servers integrate by calling its authentication and billing interfaces, regardless of framework. Pricing is a one-time purchase: €79 (about $90, billed in euros) during the launch window, then €149; the purchase includes the complete source code and a commercial license for unlimited personal and client projects, plus a 7-day refund guarantee. The author also releases the metering pattern separately as the free, MIT-licensed mcp-metering npm package, suitable for adding middleware to MCP servers already running in production without rewriting them.
Best for
Best use cases
Add OAuth 2.1 and API key authentication to an MCP server quickly
Meter and bill by call count or token count through Stripe
Prevent duplicate usage charges with idempotency keys and retry handling
Embed mcp-metering as middleware in an MCP server already running in production
Features
OAuth 2.1 authentication
OAuth 2.1 and API keys are built in, prewired with Stripe metering and rate limiting, and ready to run.
Flexible usage billing
Supports per-call or per-token billing, with clear handling and code examples for retries, partial failures, and interrupted streams.
Idempotent usage events
Each usage event carries an idempotency key; submitting the same key twice incurs only one charge.
Independent-layer integration
Works as an independent layer: MCP servers integrate by calling its authentication and billing interfaces, regardless of framework.
Pros
- OAuth 2.1, API keys, Stripe metering, and rate limiting are prewired and ready to run
- The documentation includes code examples and clearly handles retries, partial failures, and interrupted streams
- A one-time purchase provides the complete source code, with a commercial license covering unlimited personal and client projects
- Includes a 7-day refund guarantee, plus author replies through GitHub issues within 60 days after purchase
Cons
- The license terms prohibit reselling the template code itself
Pricing Plans
Launch price
- One-time payment
- Complete source code
- Commercial license for unlimited personal and client projects
- 7-day refund guarantee
Regular price
- One-time payment
- Complete source code
- Commercial license for unlimited personal and client projects
- 7-day refund guarantee
* Pricing information is for reference only. Please refer to the latest announcement on MCP-Billing's official website.