Back to MCP Catalog

Bitcoin & Lightning Network MCP Server

Finance & FintechTypeScript
Interact with Bitcoin and Lightning Network from AI models
Available Tools

generate_key

Generate a new Bitcoin key pair including address, public key, and private key (WIF)

validate_address

Validate the correctness of a Bitcoin address

address

decode_transaction

Parse a raw Bitcoin transaction and display its details in a human-readable format

hex

get_latest_block

Retrieve details about the most recent Bitcoin block (hash, height, timestamp, transaction count, etc.)

get_transaction

Fetch detailed information about a transaction using its TXID

txid

decode_invoice

Parse a BOLT11 Lightning invoice and display human-readable information

invoice

pay_invoice

Pay a Lightning invoice directly from your LNBits wallet

invoice

A comprehensive toolkit that enables AI models to interact with Bitcoin and Lightning Network infrastructure. This MCP server provides capabilities for key generation, address validation, transaction decoding, blockchain querying, and Lightning Network operations, allowing AI assistants to perform cryptocurrency operations directly.

Bitcoin & Lightning Network MCP

This MCP server enables AI models to interact with Bitcoin and Lightning Network infrastructure, allowing them to perform various cryptocurrency operations directly.

Installation

You can install the Bitcoin & Lightning Network MCP in several ways depending on your preferred AI assistant platform.

Using with Claude Desktop

  1. Download and install Claude Desktop from the official Anthropic website.

  2. Configure Claude Desktop to use the Bitcoin MCP Server by editing the configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  3. Add the following entry to the mcpServers section:

{
  "mcpServers": {
    "bitcoin-mcp": {
      "command": "npx",
      "args": ["-y", "bitcoin-mcp@latest"]
    }
  }
}
  1. Save the file and restart Claude Desktop.

Using with Goose

STDIO (Local Extension)
  1. Install the MCP server:
npm install -g bitcoin-mcp
  1. Configure Goose to use the Bitcoin MCP by adding it to your extensions:
goose extension add bitcoin-mcp
SSE (Remote Extension)
  1. Start the MCP server:
npx bitcoin-mcp@latest
  1. Add the server URL to Goose:
goose extension add http://localhost:3000/sse

Development Setup

If you want to run the server from source:

  1. Clone the repository:
git clone https://github.com/AbdelStark/bitcoin-mcp.git
cd bitcoin-mcp
  1. Install dependencies:
npm install
  1. Create a .env file based on the example:
cp .env.example .env
  1. Start the server:
npm start

Lightning Network Configuration (Optional)

To enable Lightning Network functionality:

  1. Create an account on LNBits or set up your own LNBits instance.
  2. Create a new wallet and obtain your admin key.
  3. Add the following to your .env file:
LNBITS_ADMIN_KEY=your_admin_key
LNBITS_ENDPOINT=https://legend.lnbits.com

Docker Deployment

You can also run the MCP server using Docker:

docker build -t bitcoin-mcp .
docker run -p 3000:3000 bitcoin-mcp

Usage Examples

Once installed, you can ask your AI assistant to perform various Bitcoin and Lightning Network operations:

  • "Generate a new Bitcoin key pair"
  • "Validate this Bitcoin address: bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"
  • "Decode this Bitcoin transaction: 0200000001..."
  • "Get information about the latest Bitcoin block"
  • "Fetch details for transaction with TXID: 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"
  • "Decode this Lightning invoice: lnbc..."
  • "Pay this Lightning invoice: lnbc..."

The AI will use the appropriate tools from the MCP server to fulfill these requests.

Related MCPs

TastyTrade Portfolio Manager
Finance & FintechPython

Manage your TastyTrade brokerage account through Claude

Investor Agent
Finance & FintechPython

Financial analysis and investment insights for LLMs

Bankless Onchain
Finance & FintechTypeScript

Access and interact with blockchain data through the Bankless API

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.