
SaturnZap
io.github.lqwdtechPublished by GitHub account lqwdtechv1.4.1Updated Oct 24, 2026
Non-custodial Bitcoin Lightning (LDK) wallet for AI agents — pays L402 APIs from CLI or MCP.
Overview
Lets an assistant run a self-hosted Bitcoin Lightning wallet: check balances, open channels, send and receive payments, and pay L402-gated APIs.
- What you can do
- SaturnZap is a non-custodial Lightning Network wallet that runs its own LDK node on the user's machine and exposes 25 MCP tools over stdio. Tools cover node lifecycle, wallet balances and addresses, peers, channels, BOLT11 invoices and payments, keysend, L402 fetch (auto-detecting HTTP 402, paying the invoice, retrying the request), and liquidity management. All commands emit structured JSON, and the CLI can also be called directly.
- When to use it
- Use it when an assistant needs to hold and spend Bitcoin over Lightning without a custodian, or to pay L402-gated APIs autonomously. It suits agent runtimes and automation pipelines that need machine-readable output and no interactive prompts.
- Requirements
- Local process on desktop: Python 3.12 with the saturnzap package (uv or pip; the ldk-node wheel comes from a GitHub release, not PyPI). Requires the SZ_PASSPHRASE environment variable to decrypt the local wallet seed, outbound network access for Esplora chain sync and peer connections, and on-chain or Lightning funds to open channels. Optional: SZ_MCP_MAX_SPEND_SATS, SZ_MCP_DAILY_SPEND_SATS, SZ_REGION, SZ_MAINNET_CONFIRM.
Installation
In SourceWeft
- Open SaturnZap in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
A lightweight, CLI-first, non-custodial Lightning Network wallet built for autonomous AI agents.
Self-sovereign. Runs its own Lightning node. No full Bitcoin node required.
[CI] [PyPI] [Python versions] [License: MIT]
Or install with uv tool directly
The --find-links flag is required because ldk-node==0.7.0.post1 is not yet on PyPI;
the SaturnZap GitHub Release ships the vendored wheel.
What is SaturnZap?
SaturnZap is an open-source Lightning wallet designed from the ground up for AI agents operating without human supervision. The agent installs SaturnZap, initializes its own Lightning node, opens channels to any peer on the network, sends and receives Bitcoin payments, and autonomously pays for L402-gated APIs.
SaturnZap is a CLI tool. It is not a hosted wallet, not a custodial service, and not a web application. Keys live on the agent's machine. The agent IS the Lightning node.
Two ways to integrate:
- CLI — call
szcommands from any language, parse JSON from stdout - MCP Server — connect AI agents directly via Model Context Protocol (stdio)
Documentation: See the docs/ folder for detailed guides on getting started, configuration, MCP server integration, architecture, and JSON API reference.
Business Model
SaturnZap has two layers:
CLI — Open Source (MIT)
The sz command-line tool is free and open source under the MIT license. Anyone can
install it, fork it, audit it, and build on it. There is no licensing fee, no API key
required to use the software itself, and no telemetry.
LQWD (LSP)
SaturnZap ships pre-configured to use LQWD Technologies as its default Lightning Service Provider (LSP). LQWD operates 18 Lightning nodes across 18 countries with deep global channel liquidity.
When an agent uses LQWD's infrastructure, LQWD earns through:
- Routing fees — sats earned as payments route through LQWD nodes
- Channel leasing — fees for opening and providing inbound liquidity to agents
- Managed connectivity — premium peering and reliability for agents that need it
LQWD is the default, not a requirement. Agents can open channels to any node on the Lightning Network. SaturnZap never enforces LQWD usage. LQWD competes on quality — 18-country coverage, deep liquidity, fast channel opens — not on lock-in.
This model mirrors how open-source software with cloud backends works: the tool is free, the infrastructure is the business.
Key Properties
- Non-custodial — BIP39 seed lives encrypted on the agent's machine. SaturnZap never holds, transmits, or has access to private keys.
- No full Bitcoin node — Esplora REST API provides chain data with automatic fallback (LQWD → blockstream.info → mempool.space). No bitcoind required.
- Peer-agnostic — Open channels to any Lightning node. LQWD is a smart default with global reach, but the agent controls its own peer relationships entirely.
- JSON-first — Every command writes structured JSON to stdout. Errors go to stderr. Designed for machine consumption from day one.
- MCP-native — Built-in MCP server exposes 25 tools over stdio. Connect Claude, Cursor, VS Code, or any MCP-compatible agent with a single config block.
- Autonomous — No interactive prompts in normal operation. Designed to run
inside agent runtimes, shell scripts, and orchestration pipelines. (Mainnet
spending commands prompt for confirmation unless
--yesis passed.)
Architecture
Full architecture details: docs/architecture.md
Component Map
Key Design Decisions
Unix Domain Socket IPC
The daemon (sz start) owns the LDK node and exposes 23 methods over a Unix
Domain Socket at ~/.local/share/saturnzap/<network>/sz.sock. CLI commands, the MCP
server, and OpenClaw automatically detect the daemon and route through IPC — no port
conflicts, no database locks. If no daemon is running, commands fall back to starting
an ephemeral node.
Esplora chain sync with fallback
LDK Node syncs chain data via Esplora (block explorer REST API). No external Bitcoin node is needed. SaturnZap ships with a fallback chain — if the primary Esplora server is unreachable, it automatically probes alternatives (LQWD, blockstream.info, mempool.space) and connects to the first healthy endpoint. First sync takes a few minutes on a fresh install; subsequent starts are near-instant.
LQWD as default LSP
On mainnet, fresh installs peer with LQWD-AI-Grid by default — LQWD's
agent-focused LSP node that supports LSPS1 and LSPS2 (JIT channels). The node
auto-opens a channel back on first peer contact, so a new wallet can start
receiving inbound liquidity without needing on-chain funds first. The 18-region
geographic fleet is still embedded and available: set SZ_REGION=NEAREST to
fall back to timezone-based selection (e.g. LQWD-England from UTC, LQWD-Japan
from JST), or SZ_REGION=CA / --region CA to pin a specific region.
Peer-agnostic after init
After the initial channel, agents use standard Lightning channel open flows to peer with anyone. SaturnZap has no routing logic that artificially prefers LQWD — Lightning pathfinding selects the best route. LQWD nodes appear as attractive routes naturally because of their connectivity and capacity across 18 countries.
JSON-first, non-interactive by default
All commands are designed for non-interactive execution. No spinners that break pipe
parsing. Pass --pretty for human-readable output in a TTY. Default is always clean
JSON.
One exception for safety: mainnet spending commands (send, pay, keysend,
channels open) show a [y/N] confirmation. Skip it with --yes or
SZ_MAINNET_CONFIRM=yes in automation. Signet and testnet never prompt.
Autonomous channel management
SaturnZap monitors channel health. When configured, it automatically opens new channels when outbound liquidity drops below a threshold, and requests inbound liquidity from the configured LSP when needed. Agents can run indefinitely without manual intervention.
Technology Stack
LQWD Node Directory
Embedded in SaturnZap as trusted default peers. On sz init or sz channels open --lsp lqwd,
the nearest node is auto-selected by comparing the system's UTC offset against each
node's timezone — smallest offset difference wins. Override with SZ_REGION env var or
--region flag. Full pubkeys and connection strings are in src/saturnzap/lqwd.py.
Full pubkeys and host:port connection strings are in src/saturnzap/lqwd.py.
Signet/testnet node details maintained separately for development.
CLI Reference
Full JSON API reference: docs/json-api-reference.md
Binary: sz
All commands output JSON to stdout. Errors exit with code 1, written to stderr.
Global options:
Node
Wallet
Peers
Config
Channels
Payments
L402 — Autonomous API Payments
Liquidity
Service Management
Once installed, the LDK node stays up across reboots and every sz command routes
through the daemon's IPC socket — no per-command startup overhead.
MCP Server
Or use the standalone entry point:
Agent configuration (Claude Desktop, Cursor, VS Code, etc.):
The MCP server exposes 25 tools covering node lifecycle, wallet, peers, channels,
payments, L402 fetch, and liquidity management. Set SZ_MCP_MAX_SPEND_SATS to
adjust its default 1,000-sat per-request ceiling; SZ_MCP_DAILY_SPEND_SATS
adjusts the persistent 10,000-sat rolling daily ceiling. Caps include routing fees
and follow requests through the daemon. New MCP wallets require a private
operator-configured mnemonic backup, and sweeps require explicit permission.
See spending policy and the
1.4.0 upgrade guide.
JSON Output Format
sz balance
sz pay
sz fetch (L402 flow)
Error (any command)
Exit Codes
Project Structure
Development Environment
Droplet Setup
Install from PyPI
Development Phases
Phase 1 — Node Foundation ✅
sz init, sz start, sz stop, sz status
BIP39 seed generation, encrypted storage, LDK Node startup, Esplora chain sync, auto-peer with nearest LQWD node, JSON output infrastructure.
Phase 2 — Channel Management ✅
sz channels, sz peers, sz address, sz balance
Open channels to any node. LQWD LSP-assisted channel opens. LQWD node directory embedded (18 regions, timezone-based auto-selection). Channels are announced to the public gossip graph by default when the node is reachable from the internet, turning agents into public routing nodes automatically. Channel list and close.
Phase 3 — Payments ✅
sz invoice, sz pay, sz keysend, sz transactions
Full BOLT11 send and receive. Variable-amount invoices. Keysend. Transaction history with sorting and pagination.
Phase 4 — L402 ✅
sz fetch
HTTP client with 402 detection, invoice extraction, auto-pay, request retry. Per-request spending caps. Token caching to avoid re-paying the same resource.
Phase 5 — Liquidity Intelligence ✅
sz liquidity
Channel health monitoring with 0-100 scoring. Actionable recommendations. Inbound liquidity requests via LQWD. Geography-aware peer selection across 18 regions.
Phase 6 — Packaging and Integration ✅
pip install saturnzap / uv add saturnzap / sz mcp
MCP server with 25 tools. Esplora fallback chain. GitHub Actions CI/CD. PyPI packaging. OpenClaw skill definition. Security scanner (Grade A+).
Phase 7 — Mainnet Support ✅
sz --network bitcoin
Network selection via CLI flag (--network signet|testnet|bitcoin), config.toml, or
default. Network-namespaced data directories isolate wallets per network. Real LQWD
mainnet node directory (18 nodes). Mainnet safety confirmation prompt on spending
commands, skippable with --yes flag or SZ_MAINNET_CONFIRM=yes. Network field
included in all JSON responses.
Upcoming
- PyPI publish (trusted publisher workflow ready)
- Docker image
- OpenClaw ClawHub listing
Responsible Use
SaturnZap is non-custodial software. You hold your own keys, and you are solely responsible for your funds. It is provided under the MIT license on an "as is" basis — the usual open-source terms apply. A few practical suggestions:
- Start with small amounts on mainnet while you get comfortable with the tooling.
- Back up your seed phrase somewhere safe and offline. Without it, there is no recovery path.
- Use
--network signetfor development and integration testing — signet coins are free and isolated from your mainnet wallet. - Set spending caps (
--max-sats,SZ_CLI_MAX_SPEND_SATS,SZ_MCP_MAX_SPEND_SATS) when running autonomous agents.
See SECURITY.md for the threat model and disclosure policy.
License
MIT License. See LICENSE.
The SaturnZap CLI is free and open source. LQWD infrastructure services are commercial. Using SaturnZap with non-LQWD peers requires no agreement with LQWD Technologies.
About LQWD
LQWD Technologies Corp (TSXV: LQWD | OTCQX: LQWDF) is a publicly traded Lightning Network infrastructure company. LQWD operates 18 Lightning nodes across 18 countries, providing routing infrastructure, liquidity services, and LSP connectivity for agents and developers building on Bitcoin's Lightning Network.
- Corporate: https://lqwdtech.com
- Agent endpoint: https://lqwd.ai
- Network: 18 nodes, 18 countries, 1,600+ channels
Source: README.md at commit 6df9882
Tools
0Version history
2- v1.4.1LatestSep 26, 2026
- v1.3.2Sep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts