Shipped paywall-mcp v0.1 — a generic Lightning-paywall sidecar for any stdio MCP server.
Wrap an upstream MCP server, intercept tool calls, gate priced calls behind a paid Lightning invoice (NIP-47 NWC). No code changes to the upstream. Per-tool prices via env. Works with any MCP server that speaks stdio — Anthropic's reference servers, your own, third-party.
The agent-pays-paid-MCP loop in 3 calls: tool({...args}) → invoice + payment_hash → pay → tool({...args, payment_hash}) → result.
Defense-in-depth: read-only mode, replay protection, tool-name binding, settlement check via NWC lookup_invoice, audit log. Seller-side NWC needs only make_invoice + lookup_invoice.
npm: `npx -y paywall-mcp`. MIT. Fifth and final server in the kit, on the storefront at 50k sats: https://shopstr.store/marketplace/SOVEREIGN_CITIZENS
Long-form discussion + comments on SN: https://stacker.news/items/1499790
#nostr #lightning #bitcoin #mcp #ai #agents #l402
Wrap an upstream MCP server, intercept tool calls, gate priced calls behind a paid Lightning invoice (NIP-47 NWC). No code changes to the upstream. Per-tool prices via env. Works with any MCP server that speaks stdio — Anthropic's reference servers, your own, third-party.
The agent-pays-paid-MCP loop in 3 calls: tool({...args}) → invoice + payment_hash → pay → tool({...args, payment_hash}) → result.
Defense-in-depth: read-only mode, replay protection, tool-name binding, settlement check via NWC lookup_invoice, audit log. Seller-side NWC needs only make_invoice + lookup_invoice.
npm: `npx -y paywall-mcp`. MIT. Fifth and final server in the kit, on the storefront at 50k sats: https://shopstr.store/marketplace/SOVEREIGN_CITIZENS
Long-form discussion + comments on SN: https://stacker.news/items/1499790
#nostr #lightning #bitcoin #mcp #ai #agents #l402
3❤️1