How to gate a paid MCP server with license keys, why revocation speed matters, and whether to sell through a marketplace or from your own site.
A remote MCP server is an HTTP endpoint, so gating it works like any paid API:
Authorization: Bearer <key> in the server config.Local (stdio) MCP servers are harder: the code runs on the user's machine, so a check can be patched out. Keys still work well for gating a hosted backend that the local server calls.
Many license systems cache validation results, sometimes for hours, to save on lookups. That's fine for desktop software. It's a problem for MCP servers, where a leaked key in a public config or a refunded customer can keep calling paid tools until the cache expires. Some marketplaces document revocation delays of up to 24 hours.
The alternative is to route every check for a key through one authoritative place, so a revoke is seen by the next call. Stevens Keys does this with one Durable Object per key, and returns a short cache_ttl hint (default 30 seconds, 0 on deny) for servers that want to cache allows. You choose the trade-off; you can see it in the demo.
Marketplaces bring discovery, and typically take 15–20% of revenue. The catch is that the customer relationship lives on their storefront, and moving away later means re-issuing keys to every customer.
Selling yourself (your site, your GitHub README, your listing on a directory) keeps the customer relationship and pricing in your hands, but you have to build keys, metering and billing. A billing layer that isn't a storefront sits between the two: you sell wherever you want, and it handles keys, validation, usage and (once live) payouts.
| Marketplace | Your own site + key service | |
|---|---|---|
| Discovery | Built in | Yours to drive (directories, GitHub, content) |
| Customer relationship | Theirs | Yours |
| Typical fee | 15–20% | Stevens Keys: 15%, free to start |
| Switching cost | High | Low: keys and server stay where they are |
Stevens Keys, from Marc Stevens and the team behind Surface, issues hashed license keys, validates and meters them at the edge, and revokes on the next call. Creators keep 85%. It's in preview: test mode only, payouts via Stripe Connect not live yet, and account verification is manual during early access.