MCP.so
Sign In
Servers

loop-mcp

@Loop-XXI

L402-native MCP payment proxy: 5 paid Bitcoin/Lightning tools for AI agents, 10-25 sats/call.

Overview

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 endpointPOST 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.

FAQ from loop-mcp

What is the difference between L402 and x402?

L402 uses Lightning invoices and preimage verification with the Authorization: L402 <token>:<preimage> header; x402 uses USDC on Base with an X-PAYMENT header. loop-mcp supports both and tags each row in the ledger with the rail used.

Do I need a Lightning wallet to use the hosted deployment?

For the default Lightning rail, yes — you need a wallet that can pay BOLT11 invoices and return the 64‑character hex preimage. Alternatively, you can buy fiat credit packs via Stripe and pay with a Bearer token, no Lightning wallet needed.

What are the costs for the live tools?

Each tool costs between 10 and 25 satoshis per call, as shown in the tool table (e.g., btc_price = 10 sats, tx_decode_explain = 25 sats). Fiat credits are priced in sats at the live Bitcoin price ($10 pack gives 1000 credits → sats).

Where does the payment data live?

loop-mcp verifies payments statelessly for L402 (no database) and forwards fiat credit debits to Loop Gateway’s POST /v1/credits/debit. The ledger is a LoopLedger that can be configured by the server operator.

Is there a free way to try a tool before paying?

Yes, the endpoint POST https://mcp.loopxxi.com/try/btc_price returns the live Bitcoin price for free, without any payment or wallet — it is a read-only lead‑gen endpoint.

More from Other