The pain You built an MCP tool that calls a paid API on every invocation. Every agent that knows your server URL can hammer it for free. The polite caller with a real Nostr identity pays the same rate as the bot somebody spun up an hour ago, which is to say nothing. Here is how to stop that, end to end, with a server you can clone and run in the next ten minutes. What you will build A running MCP server with one tool, bitcoin_data , that fetches BTC/USD plus mempool fees from mempool.space. An L402 Lightning payment gate. First call returns 402 with a bolt11 invoice. Pay it, retry, get the data. A Depth-of-Identity score check on top of the payment. The caller has to pay AND carry a per-pubkey reputation above your threshold. L402 alone proves a caller paid a few sats. Adding the DoI score check proves they paid AND have a reputation that survives across sessions and costs irreversible work to fake. That second half is the part most MCP billing kits skip. Prerequisites Node 18 or newer.…