MCP‑BILLING · v1.0 available now

Ship auth and billing for your MCP server today. Not next week.

OAuth 2.1, API keys, Stripe metering, rate limiting — wired together and working. The part nobody ships.

One-time payment. No subscription. No revenue share. You own the code.

See it in action (67 seconds)

MCP-Billing demo thumbnail
$ npm test RUN v4.1.10 Test Files 29 passed (29) Tests 309 passed (309) Start at 01:31:46 Duration 2.32s (transform 1.94s, setup 301ms, import 3.96s, tests 2.69s, environment 3ms)

Real output, MCP-Billing v1.0.1 — OAuth flow, API key lifecycle, webhook idempotency, quota and rate limiting all covered.

§1

The problem

Building the MCP tool takes a weekend. Wiring identity and payments around it doesn't. This is a common story from builders shipping MCP servers in 2026:

$ adding OAuth to the MCP server... Four hours in, I was reading RFC 9728... not one line of auth code made the search smarter... I burned a weekend on identity plumbing. I shipped with a static API key.

— Real developer, r/mcp

§2

Why now

10,000+active public MCP servers as of March 2026 (Anthropic)
<5%of MCP servers are monetized — billing infra is still unbuilt
40%of exposed MCP services run with no auth at all (Censys)
§3

What's in the box

§4

The billing decisions nobody talks about

Usage-based billing gets interesting once you have retries, partial failures, and streamed responses. These three decisions are already made for you.

How these decisions were made in practice — and where the only one still open is → full write-up on Dev.to

Want the full decision reference these came from — idempotency, streaming, and the webhook out-of-order trade-off that isn't in the public write-up? Free, straight to your inbox.

§5

Free: the metering pattern, extracted

The idempotent metering pattern above — dedup by idempotency key, a commit boundary, partial/failed handling, a configurable billing policy — is also published separately as mcp-metering, a free, open-source (MIT) npm package. It's built for MCP servers that are already in production: drop it in as middleware around what you've already shipped, no rewrite required.

It does not include auth, OAuth, API keys, quota management, rate limiting, or Stripe integration — that's the full boilerplate below.

npm: mcp-metering · source on GitHub

Install it, read the code, and decide if the rest of the engineering is worth paying for. It's proof of quality, not a cut-down teaser.

§6

Pricing

€79↑ €149 after initial release window

≈ $90 USD · charged in EUR

One-time payment. Full source code. Commercial license — unlimited personal and client projects. Resale of the boilerplate itself not permitted.

Buy now — €79 →

7-day refund if it doesn't work in your environment.

§7

FAQ

Q: Do I need to understand OAuth 2.1 to use this?

A: No. Everything is pre-configured. Add your environment variables and deploy.

Q: What if Stripe changes its API?

A: The code is in your repository. You control the updates.

Q: Does it work with any MCP server or only certain frameworks?

A: It works as an independent layer. Your MCP server calls the auth and billing endpoints — framework agnostic.

Q: How does it handle retries and interrupted calls in billing?

A: Each usage event carries an idempotency_key. If the same event arrives twice (network retry), it's only charged once. Interrupted calls are recorded as 'partial' and you decide whether to charge them — documented with code examples.

Q: Is support included?

A: Yes — I respond to GitHub issues for 60 days from purchase. Built by Marc Gil · Dev.to

Q: Can I use it in client projects?

A: Yes. Unlimited use license. You cannot resell the boilerplate itself.

Q: Is there a refund policy?

A: Yes — 7-day refund if the code doesn't work in your environment and I can't fix it via GitHub issues. No questions asked within that window.

Q: Why not just ask Claude Code to build this?

A: You can — that's literally how this was built, with Claude Code as a pair programmer from day one. Writing the first draft was never the hard part. Early on, a webhook handler here returned the same 400 status for an invalid signature as for a transient database error — which meant Stripe never retried, and billing events could silently vanish. Catching that is the actual work: the code is cheap to generate now, the decisions and the tests that pin them down aren't. Check that level of detail yourself before paying: mcp-metering is free and open-source — install it, read it, judge for yourself.

Still deciding? Get the billing edge-case reference free.

Ready to ship?

Get MCP-Billing and have auth + billing running today.

Buy now — €79 →

One-time payment · No subscription · Commercial license