{"slug": "show-hn-mcp-billing-self-hosted-auth-and-usage-billing-for-mcp-servers", "title": "Show HN: MCP-Billing – self-hosted auth and usage billing for MCP servers", "summary": "MCP-Billing launches as a self-hosted solution for authentication and usage billing on MCP servers, offering OAuth 2.1, API keys, Stripe metering, and rate limiting in a single package. The product targets developers who need to add identity and payment infrastructure to their MCP servers without building it from scratch, available via a one-time payment with full source code under an MIT license.", "body_md": "OAuth 2.1, API keys, Stripe metering, rate limiting — wired together and working. The part nobody ships.\n\nOne-time payment. No subscription. No revenue share. You own the code.\n\nBuilding 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:\n\n— Real developer, r/mcp\n\nYour server accepts standard OAuth clients without you touching a single RFC.\n\nGenerate, rotate and revoke keys from the dashboard in one click.\n\nCharge per call, per token, whatever you want. Retries and interrupted calls already handled — no edge cases to think about.\n\nProtect your server from abuse without writing a sliding window algorithm.\n\nEach MCP server client gets its own context, keys and quota.\n\nDon't couple billing to your logic. It's infrastructure, not product code. Change your MCP server without touching billing.\n\nUsage-based billing gets interesting once you have retries, partial failures, and streamed responses. These three decisions are already made for you.\n\nEvery usage event carries an `idempotencyKey`\n\n. Same key twice, billed once.\n\nA call that dies mid-way is recorded with `status: \"partial\"`\n\n, not sent to Stripe unless you say so.\n\nOne usage event per completed stream — not one per token.\n\nOne-time payment. Full source code. MIT license with resale restriction.\n\n**Q: Do I need to understand OAuth 2.1 to use this?**\n\nA: No. Everything is pre-configured. Add your environment variables and deploy.\n\n**Q: What if Stripe changes its API?**\n\nA: The code is in your repository. You control the updates.\n\n**Q: Does it work with any MCP server or only certain frameworks?**\n\nA: It works as an independent layer. Your MCP server calls the auth and billing endpoints — framework agnostic.\n\n**Q: How does it handle retries and interrupted calls in billing?**\n\nA: 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.\n\n**Q: Is support included?**\n\nA: Yes — I respond to GitHub issues for 60 days from purchase.\n\n**Q: Can I use it in client projects?**\n\nA: Yes. Unlimited use license. You cannot resell the boilerplate itself.\n\nGet MCP-Billing and have auth + billing running today.\n\nOne-time payment · No subscription · MIT license", "url": "https://wpnews.pro/news/show-hn-mcp-billing-self-hosted-auth-and-usage-billing-for-mcp-servers", "canonical_source": "https://mcp-billing.com", "published_at": "2026-07-14 14:10:38+00:00", "updated_at": "2026-07-14 14:18:04.073047+00:00", "lang": "en", "topics": ["developer-tools", "ai-infrastructure", "ai-tools"], "entities": ["MCP-Billing", "Stripe", "OAuth 2.1", "MIT"], "alternates": {"html": "https://wpnews.pro/news/show-hn-mcp-billing-self-hosted-auth-and-usage-billing-for-mcp-servers", "markdown": "https://wpnews.pro/news/show-hn-mcp-billing-self-hosted-auth-and-usage-billing-for-mcp-servers.md", "text": "https://wpnews.pro/news/show-hn-mcp-billing-self-hosted-auth-and-usage-billing-for-mcp-servers.txt", "jsonld": "https://wpnews.pro/news/show-hn-mcp-billing-self-hosted-auth-and-usage-billing-for-mcp-servers.jsonld"}}