What is loop-mcp?
loop-mcp is a payment-aware transport for the Model Context Protocol (MCP) that charges AI agents per tool call over two rails: Bitcoin/Lightning via L402 or USDC via x402, and settles both into one canonical ledger. It is built and maintained by Loop XXI LLC and is API-compatible with x402-only MCP transports, adding Lightning as a first-class second rail. It is intended for developers who want to make MCP tools payable and for agents that need to pay per tool call.
How to use loop-mcp?
Use the hosted deployment at https://mcp.loopxxi.com/mcp (no install required) — point any MCP/L402 client at it. Alternatively, embed the dual-rail transport into your own MCP server by installing @loop-xxi/loop-mcp from npm and calling makePaymentAwareServerTransport with per-tool USD prices and optional Lightning provider configuration. The agent flow is: challenge (HTTP 402 with invoice) → pay invoice → retry with Authorization: L402 <token>:<preimage>. Fiat credits via Stripe use a single Authorization: Bearer loop_<credit_key> call.
Key features of loop-mcp
- Dual-rail payments — Lightning (L402) and USDC (x402) in one transport.
- Per-tool pricing — each tool call costs sats or USD (10–25 sats per tool on live deployment).
- Stateless L402 verification — preimage verified without database.
- Rail-tagged canonical ledger — both rails settle into one
LoopLedger with a rail tag.
- Free try endpoint —
POST https://mcp.loopxxi.com/try/btc_price returns live Bitcoin price for free.
- Fiat credits via Stripe — buy credit packs ($10/$25/$50) and pay with Bearer token, no Lightning wallet required.
Use cases of loop-mcp
- Charging AI agents per tool call for premium data (e.g., Bitcoin price, mempool analysis).
- Enabling Bitcoin-native micropayments for MCP tools without requiring a USDC/EVM wallet.
- Allowing agents to pay via fiat credits bought with Stripe, avoiding crypto wallets entirely.
- Running a payment preflight check before spending to avoid over-budget calls.
- Adding dual-rail (L402 + x402) payment support to any existing MCP server via npm package.
Comments