SatsAPI – Bitcoin data API, pay per call in sats via Lightning L402
L402 turns Lightning payments into stateless API auth for autonomous agents.
An MCP server that equips AI agents with a Lightning Network wallet to autonomously navigate and pay for HTTP 402 gated APIs using the L402 protocol.
Agents finally have bank accounts: 402 interception + Lightning payments just works.
Developers building autonomous AI agent workflows
As we move toward multi-agent orchestration, the biggest bottleneck I've seen is that agents don't have bank accounts. When an agent hits a paid API wall or needs to outsource a task to another agent, the workflow breaks.
I built BoltClaw to solve this by bridging the Model Context Protocol (MCP) with the Lightning Network.
How it works:
Claude uses the MCP tool to fetch data from an endpoint.
If the endpoint returns an HTTP 402 Payment Required, the tool intercepts the response and parses the L402 Macaroon and BOLT11 invoice.
The plugin automatically pays the micro-transaction (e.g., 50 sats) via the Alby API.
It re-requests the data using the cryptographic preimage and returns the payload to Claude's context window.
I built it in Python using FastMCP and httpx. The repo includes a local Dummy Agent (built with FastAPI) that returns mock L402 challenges so you can test the 402-interception loop locally without spending real satoshis.
Repo: https://github.com/jeffskafi/OpenBolt
Would love feedback on the architecture, specifically from anyone else experimenting with L402s or M2M payments.
L402 turns Lightning payments into stateless API auth for autonomous agents.
Biometric-gated payments let AI agents pay APIs without exposing private keys.
They revive HTTP 402 so agents can automatically buy API calls — the repo ships PayingClient/WalletManager primitives, an @x402-kit/core package, five agent templates (web-scraper, image-gen, search, translation, code-review), a live demo and 93 tests. Smart infrastructure play with a clear demoable surface; the hard part will be UX and economics (wallet funding, gas/settlement, and convincing API operators to adopt x402 instead of existing billing).
Instead of wrestling with raw mitmproxy output, this tool gives a purpose-built UI that shows system prompts, tool definitions, token accounting, streaming responses and tool calls — all in real time. The one-liner shell setup, keyboard shortcuts, and token breakdown make debugging Claude Code conversations startlingly quicker, though it’s inherently a local MITM (trust the generated CA) and is narrow by design to Anthropic’s workflow.
HTTP 402 finally meets crypto — agents pay micros without auth.
Prepaid wallet API for AI agents before Stripe builds this.