Commit 3a545ac
Add
v1 scaffolding for an HTTPS gateway that will expose the LDK Server gRPC
API as an MCP (Model Context Protocol) server, plus a small admin web UI
for minting scoped auth tokens to plug into Claude Desktop / Claude Code.
This PR adds the foundational pieces only:
- New `ldk-server-mcp` workspace crate with a TOML config, an `axum`-based
HTTPS listener (HTTP/1.1 + HTTP/2 via `hyper-util`'s auto builder), and
a `/healthz` endpoint
- Self-signed TLS cert auto-generation in `storage_dir`, mirroring the
daemon's pattern in `ldk-server/src/util/tls.rs` (the daemon code is
unchanged; the v2 plan extracts the shared bits into a util crate)
- A `DaemonClient` wrapper around `ldk-server-client` that loads the
daemon's `api_key` and TLS cert from disk and verifies connectivity on
boot via `GetNodeInfo`
- `GatewayLogger` matching the daemon's `ServerLogger` style so operators
see consistent log output across the two processes
- Sample config in `contrib/ldk-server-mcp-config.toml` and a crate-level
`README.md`
- Brainstorm doc at `docs/brainstorms/2026-05-07-ldk-server-mcp.md`
capturing the full v1 spec and the suggested PR breakdown for the rest
of the work (sqlite token store, web UI, MCP tool layer over the ~40
RPCs, `SubscribeEvents` -> MCP notifications fan-out, Connect-to-Claude
UX)
The daemon is unmodified. 14 unit tests cover config parsing, scheme
stripping, log-level validation, unknown-field rejection, the cert
generate/load roundtrip, and the `/healthz` route. `cargo fmt`, `cargo
clippy --all-targets -- -D warnings`, `cargo test`, `cargo check
--release`, and `cargo doc --release` all pass for the new crate.
This change was developed with Claude Code assistance.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>ldk-server-mcp crate scaffolding for MCP gateway1 parent bf4d8bd commit 3a545ac
15 files changed
Lines changed: 1662 additions & 6 deletions
File tree
- contrib
- docs/brainstorms
- ldk-server-mcp
- src
- daemon
- util
- web
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
0 commit comments