home / mcp / bitcoin mcp server
Bitcoin & Lightning Network MCP Server.
Configuration
View docs{
"mcpServers": {
"abdelstark-bitcoin-mcp": {
"command": "npx",
"args": [
"-y",
"bitcoin-mcp@latest"
],
"env": {
"LNbitsUrl": "https://demo.lnbits.com"
}
}
}
}You can use the Bitcoin and Lightning Network MCP Server to let AI models interact with the Bitcoin blockchain and Lightning Network. It supports key generation, address validation, transaction decoding, blockchain queries, and Lightning tools like invoice decoding and payments, enabling rich, programmatic access for your AI workflows.
To use the Bitcoin MCP Server with an MCP client, start the local MCP server process and configure your client to connect via the standard MCP transport. You can run the server as a local process and then have your MCP client issue requests to the server for operations such as creating keys, validating addresses, decoding transactions, fetching the latest block, retrieving transaction details, decoding Lightning invoices, and paying Lightning invoices.
Prerequisites: Node.js and an MCP client you intend to use (Claude Desktop, Goose, or another MCP-enabled client). Install Node.js from your operating systemโs package manager or website, and ensure you can run npm or npx from the command line.
# Start the Bitcoin MCP Server via npx as a local stdio extension
npx -y bitcoin-mcp@latestIf you plan to integrate with Claude Desktop, Goose, or another MCP client, you can configure the server as a local stdio MCP extension. The recommended startup command uses npx to fetch and run the latest Bitcoin MCP server package.
To enable Lightning Network features, provide LNBits connection details. These settings are optional and only needed if you plan to use LN-related tools such as decoding invoices or paying invoices.
{
"lnbitsUrl": "https://demo.lnbits.com",
"lnbitsAdminKey": "YOUR_ADMIN_KEY",
"lnbitsReadKey": "YOUR_READ_KEY"
}Below is a complete MCP server configuration using a local stdio transport. This starts the server via npx and uses the latest bitcoin-mcp package.
{
"mcpServers": [
{
"name": "bitcoin",
"type": "stdio",
"command": "npx",
"args": ["-y", "bitcoin-mcp@latest"]
}
],
"envVars": [
{
"name": "LNbitsUrl",
"description": "LNBits API base URL for Lightning Network features",
"required": false,
"example": "https://demo.lnbits.com"
}
]
}Keep the MCP server up to date and restrict access to the local host or trusted networks. If you encounter connection issues, verify the MCP server process is running and that your MCP client is configured to use the correct stdio transport endpoint.
The server supports a range of Bitcoin and Lightning Network tools exposed through the MCP interface. You can extend or customize your setup by integrating with your preferred MCP client and adding LNBits configuration as needed.
Contributions are welcome. The project is licensed under the MIT License, and you should follow standard open-source contribution practices when submitting changes.
Create new Bitcoin key pairs including address, public key, and private key in WIF format.
Validate the correctness of a Bitcoin address.
Decode a raw Bitcoin transaction into a human-readable structure.
Fetch details about the most recent block on the Bitcoin network.
Retrieve detailed information for a given TXID.
Decode a BOLT11 Lightning invoice into readable fields.
Pay a Lightning invoice directly from your LNBits wallet.