ldk
MCP server from tnull/ldk-server-mcp
claude mcp add --transport stdio tnull-ldk-server-mcp node target/release/ldk-server-mcp
How to use
This MCP server wraps the LDK Server operations as MCP tools, exposing the Lightning and Bitcoin on-chain capabilities via JSON-RPC 2.0 over stdio. It connects securely to an LDK Server instance using TLS (through the ldk-server-client) and presents a suite of tools that correspond to the underlying LDK Server API. Agents can query node information, manage on-chain and Lightning operations, handle channels, payments, and perform utility actions such as signing messages and exporting pathfinding scores. The server enumerates 24 available tools grouped into Node, On-chain, Payments, Channels, Payment History, Peers, and Utilities, each mapped to a specific RPC method inside the MCP protocol.
To use, start the MCP server process and communicate through standard input/output using JSON-RPC 2.0. Tools are invoked by sending initialize, tools/list, and tools/call requests according to the MCP protocol. For example, a client can list available tools, then call a particular tool (like get_node_info or open_channel) with the required parameters. The server handles authentication against the configured LDK Server instance via the provided API key and TLS certificate, ensuring secure access to the LDK environment.
How to install
Prerequisites:
- Rust toolchain (cargo)
- A Rust environment capable of building the project (stable 1.60+ recommended)
- TLS credentials and connection details for the target LDK Server
Installation steps:
- Install Rust and Cargo:
- macOS/Linux: curl --proto "https" -sSf https://sh.rustup.rs | sh
- Windows: follow rustup-init via the official installer
- Clone the MCP server repository (or download the source): git clone https://github.com/your/repo.git cd repo/ldk-server-mcp
- Build the project in release mode: cargo build --release
- Run the server (example):
Ensure you have the required environment variables or config file in place
./target/release/ldk-server-mcp
Note: If you prefer a config file, place a TOML config at the recommended paths (as described in the README) and run the binary with --config /path/to/config.toml.
Additional notes
Environment variables (as per the README):
- LDK_BASE_URL: The base URL of the LDK Server (e.g., localhost:3000)
- LDK_API_KEY: The API key used to authenticate with the LDK Server
- LDK_TLS_CERT_PATH: Path to the TLS certificate for TLS validation with the LDK Server
Configuration precedence is: environment variables, then --config file, then defaults at ~/.ldk-server/config.toml, ~/.ldk-server/tls.crt, and ~/.ldk-server/{network}/api_key.
Common issues:
- TLS certificate validation failures: ensure LDK_TLS_CERT_PATH points to a valid certificate and that the LDK Server is reachable at LDK_BASE_URL with the provided API key.
- Incorrect config paths: verify the TOML config file follows the format used by ldk-server-cli (same as README example).
- Tool discovery: run tools/list to confirm available tools and their expected parameters before invoking tools/call.
Tips:
- For Claude Desktop/Code integration, provide the MCP configuration with the proper command path to your built ldk-server-mcp executable and the necessary environment variables for LDK connectivity.
- Keep the LDK Server and this MCP server in trusted networks due to sensitive credentials and TLS usage.
Related MCP Servers
goose
an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
cunzhi
告别AI提前终止烦恼,助力AI更加持久
probe
AI-friendly semantic code search engine for large codebases. Combines ripgrep speed with tree-sitter AST parsing. Powers AI coding assistants with precise, context-aware code understanding.
mcp-center
A centralized platform for managing and connecting MCP servers. MCP Center provides a high-performance proxy service that enables seamless communication between MCP clients and multiple MCP servers.
backlog -rust
MCP server for Backlog, project management service.
perplexity-web-api
🔍 Perplexity AI MCP without API key