loop-mcp
@Loop-XXI
About loop-mcp
L402-native MCP payment proxy: 5 paid Bitcoin/Lightning tools for AI agents, 10-25 sats/call.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"loop-mcp": {
"type": "streamable-http",
"url": "https://mcp.loopxxi.com/mcp"
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
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
LoopLedgerwith a rail tag. - Free try endpoint —
POST https://mcp.loopxxi.com/try/btc_pricereturns 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.
Frequently asked questions
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.
Basic information
More Other MCP servers

DeepMark
DeepMark helps teachers deliver rapid, consistent marking with meaningful feedback for every student — in a fraction of the time. What once took a week, now takes one free period.
ghidraMCP
LaurieWiredMCP Server for Ghidra
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web
XcodeBuildMCP
cameroncookeA Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Inbox Zero AI
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
Comments