itcoin & Lightning Network MCP Server
Overview
Demo
[object Object] | [object Object] |
[object Object] | [object Object] |
Table of Contents
- itcoin \& Lightning Network MCP Server
Features
- Key Generation: Create new Bitcoin key pairs including address, public key, and private key (WIF).
- Address Validation: Validate the correctness of a Bitcoin address.
- Transaction Decoding: Parse a raw Bitcoin transaction and display its details in a human-readable format.
- Blockchain Queries:
- Lightning Network:
Claude Desktop Integration
- Download and Install Claude Desktop: Visit the official Claude Desktop downloads page and get the app for your operating system (macOS or Windows) (Installing Claude for Desktop | Anthropic Help Center). Install the app and ensure you're using the latest version (you can check for updates in the app menu).
- Configure Claude Desktop to use the Bitcoin MCP Server: Open the Claude Desktop configuration file (it's created when you first edit settings in Claude Desktop):In the snippet above,
"bitcoin-mcp"
is an identifier for the server (you can name it whatever you want). Thecommand
is set to run thenpx
command, andargs
points to the path of your Bitcoin MCP server script or the command to run the server.
- Restart Claude Desktop: Save the
claude_desktop_config.json
file and then close and reopen Claude Desktop. On the next launch, Claude will automatically start the Bitcoin MCP server as configured. If Claude Desktop was running, you need to restart it for the changes to take effect.
Testing the Claude Desktop Integration
- Ask Claude a sample question related to Bitcoin. For example, try asking: "What's the latest block on the Bitcoin network?" If the integration is successful, Claude's response should include the latest block fetched via the MCP server, rather than an "I don't know" or a generic answer. You can also try other queries like "Give me information about the transaction with TXID abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890." Claude should use the MCP server's tools to retrieve the data and answer your query.
- Verify the response: Claude should return a detailed answer (e.g. the latest block on the Bitcoin network) without errors. If you get an error message or no useful response, the MCP server might not be connected properly.
- Check Claude's logs (if needed): Claude Desktop provides log files that can help debug MCP integrations. If the tool isn't responding, check the log files in:
Goose Integration
Using STDIO (Local Extension)
- Add a new extension in Goose: Open Goose's configuration interface. You can do this via the command line by running
goose configure
, or in the Goose Desktop app by going to Settings > Extensions. From the menu, choose "Add Extension." (Using Extensions | goose)
- Choose the extension type Command-Line Extension: When prompted for the type of extension, select Command-Line Extension (in the CLI menu or UI) so that Goose knows it should launch a local command (Using Extensions | goose) (as opposed to a built-in or remote extension).
- Enter the extension details: Provide a name and command for the Bitcoin MCP server:
- Finalize and enable: Complete the extension addition. Goose will add this new extension to its configuration (usually
~/.config/goose/config.yaml
). Ensure the extension is enabled (if using the CLI wizard, it should be enabled by default once added; in the Goose Desktop app, you can check the Extensions list and toggle it on if it isn't already (Using Extensions | goose) (Using Extensions | goose)).
- Start a Goose session with the new extension: You can now use the extension in Goose. If you're running Goose via CLI, start a session that includes the extension by running:
Using SSE (Remote Extension)
- Launch the MCP server as a standalone service: Run the Bitcoin MCP server so that it listens for connections. In practice, this means the server needs to be started in a mode that serves an HTTP endpoint for MCP. For example, you might run the server with a specific command or option to listen on a port (such as using an MCP library's built-in web server capabilities or running under a web framework). Ensure the server is reachable at a known URL (e.g.,
http://localhost:9000
) and supports the MCP protocol over SSE.
- Add a new extension in Goose (Remote): As before, run
goose configure
or use the Goose UI to Add Extension (Using Extensions | goose). This time, choose Remote Extension when asked for the type of extension (Using Extensions | goose). This tells Goose that it will connect to an external server via SSE.
- Enter the remote extension details: Give the extension a name (e.g., "bitcoin") and provide the server's URL. For the URL, enter the base address where the MCP server is running. For instance, if your server is listening on port 9000 on your local machine, you might enter
http://localhost:9000
. Goose will attempt to connect to the MCP server's SSE endpoint at that address. (Goose uses the standard MCP SSE path, which by convention is under the/mcp/sse
route on the server, you usually just need to supply the host and port, and Goose handles the rest.)
- Enable the extension: After adding the remote extension, ensure it's enabled in Goose's settings (just like in the STDIO case). Only one of the STDIO or SSE extension (with the same tools) needs to be enabled if you accidentally enable both a local and remote version of the same server, you may want to disable one to avoid confusion.
- "What's the latest Bitcoin block?"
- "Give me information about the transaction with TXID abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890."
Development Setup
Lightning Network Configuration (Optional)
- Creating an account at LNBits
- Creating a new wallet
- Going to API info to find your API keys
Available Tools
Error Handling
Contributing
License
itcoin & Lightning Network MCP Server
Overview
Demo
[object Object] | [object Object] |
[object Object] | [object Object] |
Table of Contents
- itcoin \& Lightning Network MCP Server
Features
- Key Generation: Create new Bitcoin key pairs including address, public key, and private key (WIF).
- Address Validation: Validate the correctness of a Bitcoin address.
- Transaction Decoding: Parse a raw Bitcoin transaction and display its details in a human-readable format.
- Blockchain Queries:
- Lightning Network:
Claude Desktop Integration
- Download and Install Claude Desktop: Visit the official Claude Desktop downloads page and get the app for your operating system (macOS or Windows) (Installing Claude for Desktop | Anthropic Help Center). Install the app and ensure you're using the latest version (you can check for updates in the app menu).
- Configure Claude Desktop to use the Bitcoin MCP Server: Open the Claude Desktop configuration file (it's created when you first edit settings in Claude Desktop):In the snippet above,
"bitcoin-mcp"
is an identifier for the server (you can name it whatever you want). Thecommand
is set to run thenpx
command, andargs
points to the path of your Bitcoin MCP server script or the command to run the server.
- Restart Claude Desktop: Save the
claude_desktop_config.json
file and then close and reopen Claude Desktop. On the next launch, Claude will automatically start the Bitcoin MCP server as configured. If Claude Desktop was running, you need to restart it for the changes to take effect.
Testing the Claude Desktop Integration
- Ask Claude a sample question related to Bitcoin. For example, try asking: "What's the latest block on the Bitcoin network?" If the integration is successful, Claude's response should include the latest block fetched via the MCP server, rather than an "I don't know" or a generic answer. You can also try other queries like "Give me information about the transaction with TXID abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890." Claude should use the MCP server's tools to retrieve the data and answer your query.
- Verify the response: Claude should return a detailed answer (e.g. the latest block on the Bitcoin network) without errors. If you get an error message or no useful response, the MCP server might not be connected properly.
- Check Claude's logs (if needed): Claude Desktop provides log files that can help debug MCP integrations. If the tool isn't responding, check the log files in:
Goose Integration
Using STDIO (Local Extension)
- Add a new extension in Goose: Open Goose's configuration interface. You can do this via the command line by running
goose configure
, or in the Goose Desktop app by going to Settings > Extensions. From the menu, choose "Add Extension." (Using Extensions | goose)
- Choose the extension type Command-Line Extension: When prompted for the type of extension, select Command-Line Extension (in the CLI menu or UI) so that Goose knows it should launch a local command (Using Extensions | goose) (as opposed to a built-in or remote extension).
- Enter the extension details: Provide a name and command for the Bitcoin MCP server:
- Finalize and enable: Complete the extension addition. Goose will add this new extension to its configuration (usually
~/.config/goose/config.yaml
). Ensure the extension is enabled (if using the CLI wizard, it should be enabled by default once added; in the Goose Desktop app, you can check the Extensions list and toggle it on if it isn't already (Using Extensions | goose) (Using Extensions | goose)).
- Start a Goose session with the new extension: You can now use the extension in Goose. If you're running Goose via CLI, start a session that includes the extension by running:
Using SSE (Remote Extension)
- Launch the MCP server as a standalone service: Run the Bitcoin MCP server so that it listens for connections. In practice, this means the server needs to be started in a mode that serves an HTTP endpoint for MCP. For example, you might run the server with a specific command or option to listen on a port (such as using an MCP library's built-in web server capabilities or running under a web framework). Ensure the server is reachable at a known URL (e.g.,
http://localhost:9000
) and supports the MCP protocol over SSE.
- Add a new extension in Goose (Remote): As before, run
goose configure
or use the Goose UI to Add Extension (Using Extensions | goose). This time, choose Remote Extension when asked for the type of extension (Using Extensions | goose). This tells Goose that it will connect to an external server via SSE.
- Enter the remote extension details: Give the extension a name (e.g., "bitcoin") and provide the server's URL. For the URL, enter the base address where the MCP server is running. For instance, if your server is listening on port 9000 on your local machine, you might enter
http://localhost:9000
. Goose will attempt to connect to the MCP server's SSE endpoint at that address. (Goose uses the standard MCP SSE path, which by convention is under the/mcp/sse
route on the server, you usually just need to supply the host and port, and Goose handles the rest.)
- Enable the extension: After adding the remote extension, ensure it's enabled in Goose's settings (just like in the STDIO case). Only one of the STDIO or SSE extension (with the same tools) needs to be enabled if you accidentally enable both a local and remote version of the same server, you may want to disable one to avoid confusion.
- "What's the latest Bitcoin block?"
- "Give me information about the transaction with TXID abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890."
Development Setup
Lightning Network Configuration (Optional)
- Creating an account at LNBits
- Creating a new wallet
- Going to API info to find your API keys