AgentBTC MCP Server
Enables AI agents to perform Bitcoin and Lightning Network payments using a non-custodial, zero-trust architecture. It provides 13 tools for wallet management, invoice creation, and payment processing while keeping node credentials local to the user's machine.
README
AgentBTC MCP Server
BYON (Bring Your Own Node) Bitcoin payments for AI agents via Model Context Protocol
The world's first Bitcoin/Lightning MCP server. Your Lightning node credentials never leave your machine. Works with Claude Desktop, OpenClaw, and any MCP-compatible AI tool.
๐ Features
- ๐ True BYON: Your Lightning credentials never leave your machine โ zero-trust architecture
- โก Lightning Network: Fast, cheap Bitcoin micropayments (~200ms per payment)
- ๐ค 13 MCP Tools: Complete wallet management, payments, invoices, channels, and L402
- ๐ L402 Protocol: HTTP 402 "Payment Required" for API monetization
- ๐ก๏ธ Non-Custodial: Zero counterparty risk โ you control your Bitcoin
- ๐ท๏ธ Lightning Addresses: Send to
bot@yourname.agentbtc.io - ๐ณ Spending Policies: Per-transaction, daily, and monthly limits for agent wallets
๐ Quick Start
Option 1: npx (no install)
npx agentbtc-mcp start
Option 2: Global install
npm install -g agentbtc-mcp
agentbtc-mcp start
Claude Desktop Config
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"agentbtc": {
"command": "npx",
"args": ["-y", "agentbtc-mcp", "start"],
"env": {
"AGENTBTC_LND_HOST": "your-node:8080",
"AGENTBTC_LND_MACAROON": "/path/to/readonly.macaroon",
"AGENTBTC_API_URL": "https://agentbtc.io",
"AGENTBTC_API_KEY": "your-api-key"
}
}
}
}
๐ง Available Tools (13)
| Tool | Description |
|---|---|
list_agent_wallets |
List all agent wallets |
get_agent_balance |
Check wallet balance |
create_agent_wallet |
Create a new agent wallet |
delete_agent_wallet |
Remove an agent wallet |
get_node_info |
Lightning node status |
create_lightning_invoice |
Generate payment requests |
pay_lightning_invoice |
Send Lightning payments |
send_to_lightning_address |
Pay Lightning addresses |
decode_invoice |
Decode BOLT11 invoices |
check_channel_balance |
Channel liquidity info |
list_channels |
List Lightning channels |
get_transaction_history |
Payment history |
access_l402_api |
Access L402-protected APIs |
โ๏ธ Configuration
Environment Variables
| Variable | Required | Description |
|---|---|---|
AGENTBTC_LND_HOST |
Yes | LND REST API endpoint (e.g., localhost:8080) |
AGENTBTC_LND_MACAROON |
Yes | Path to LND macaroon file |
AGENTBTC_API_URL |
No | AgentBTC server URL (default: http://localhost:8000) |
AGENTBTC_API_KEY |
No | Your owner API key for wallet management |
CLI Commands
agentbtc-mcp start # Start MCP server
agentbtc-mcp setup # Interactive Claude Desktop setup
agentbtc-mcp test # Test Lightning node connection
agentbtc-mcp config # Show current configuration
agentbtc-mcp version # Show version
๐ Requirements
- Node.js 18+
- Lightning Node โ LND with REST API enabled
- MCP Client โ Claude Desktop, OpenClaw, or compatible
๐ Security Model
AgentBTC uses a BYON (Bring Your Own Node) architecture:
- Your Lightning node credentials stay on your machine
- The MCP server runs locally, connecting directly to your node
- No credentials are ever transmitted to AgentBTC servers
- Agent wallets have configurable spending limits
- All payments are logged with full audit trail
๐งช Testing
# Test with testnet
export AGENTBTC_LND_HOST=your-testnet-node:8080
export AGENTBTC_LND_MACAROON=/path/to/testnet/readonly.macaroon
agentbtc-mcp test
๐ Troubleshooting
"Connection refused"
- Verify your Lightning node is running
- Check
AGENTBTC_LND_HOSTโ usuallylocalhost:8080for LND REST - For Voltage nodes: use
your-node.t.voltageapp.io:8080
"Permission denied"
- Check macaroon file exists and is readable
- Use
readonly.macaroonfor safety
"Invalid macaroon"
- Ensure you're using the correct network (mainnet vs testnet)
- Try copying the macaroon to a new path
๐ Links
- Website: agentbtc.io
- GitHub: github.com/bkblock/agentbtc-mcp
๐ License
MIT โ see LICENSE.
Built by BK Block Solutions โก
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.