home / mcp / core lightning mcp server
Rust-based gRPC MCP server to control Core Lightning nodes via the MCP interface.
Configuration
View docs{
"mcpServers": {
"adi2011-cln-mcp": {
"command": "Path/to/cln-mcp",
"args": [
"--certs-dir",
"Path/to/certificates"
]
}
}
}You can control a Core Lightning node through the MCP (Model Context Protocol) interface with the Core Lightning MCP Server. This server exposes a standardized way to issue commands and read data from Core Lightning, enabling seamless interaction with large language model clients and automation tools.
To use the Core Lightning MCP Server, run it as a local process and connect your MCP client to its gRPC interface. You will authenticate and exchange control messages with your Core Lightning node through the MCP API. Start by ensuring your TLS setup and certificates are in place, then configure your client to point at the server’s address.
Basic usage steps you can follow: start the MCP server locally with the appropriate --certs-dir, then configure your MCP client to communicate via the server’s gRPC endpoint. If you are using Claude or another MCP client, add the server configuration so that the client knows how to launch or connect to the cln-mcp process and where to find the certificates.
Prerequisites you need before installing the MCP server: Rust 1.80 or higher, Protocol Buffers Compiler (protoc), Core Lightning with gRPC enabled, and MCP clients (such as Claude or Goose). Ensure these components are available on your system before proceeding.
Option 1: From Release (Recommended) — download the appropriate binary for your platform from the latest release, then extract and set executable permissions.
# For Linux/macOS
tar -xzf cln-mcp-<platform>.tar.gz
# For Windows
# Use your preferred zip extractorMake the binary executable on Linux/macOS.
chmod +x cln-mcpOption 2: From Source — install prerequisites, clone the repository, and build the project with cargo.
# Prerequisites vary by platform; ensure Rust toolchain is installed
# Then build the project
cargo build --releaseKey prerequisites and steps for building from source include having Rust 1.80+, protoc, Core Lightning with gRPC, and MCP clients installed, followed by cloning the repository and building in release mode.
Configure how the MCP server starts and connects to Core Lightning using command-line options. The common options include the path to certificates, and the Core Lightning node address.
cln-mcp [OPTIONS]
Options:
--certs-dir <path> Path to certificates directory
--node-address <url> Node address (default: https://localhost:9736)
--help Shows help messageTLS certificate setup requires you to supply the certificate files used for mTLS when connecting to Core Lightning. Copy the following PEM files from the Lightning directory to a separate directory: - ca.pem - client.pem - client-key.pem
If you are integrating with Claude, you can configure a MCP server entry that launches the cln-mcp binary with the required certificate directory. The following example shows how to reference the executable and pass the certificates directory as an argument.
{
"mcpServers" : {
"cln-mcp" : {
"command": "Path/to/cln-mcp",
"args": [
"--certs-dir",
"Path/to/certificates"
]
}
}
}Launch the cln-mcp binary to start the MCP server with the required TLS certificates directory.
Create or prepare the TLS mTLS certificates (ca.pem, client.pem, client-key.pem) needed for secure communication with Core Lightning.
Provide Claude with the MCP server entry that launches cln-mcp and points to the certificate directory so Claude can manage the Core Lightning node via MCP.