Repository navigation
feat: read-only MCP server for external AI clients - #109
Merged
Merged
Conversation
LowNotes serves the open vault to MCP clients over a per-user named pipe (Windows) or Unix socket, after a token handshake. The token lives in the OS credential store and never reaches the webview. Tools list, read and search notes and read links and backlinks; a resource template exposes notes by path. Off by default, and only vaults listed in the MCP settings are served. Closes #101
# Conflicts: # src-tauri/Cargo.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An MCP server inside the LowNotes process, so external AI clients (Claude Desktop, Claude Code, Cursor) can read the open vault while the window sits in the tray. Read-only, off by default.
What it does
rmcp3.8.0 (Apache-2.0), pinned exactly, with onlyserver,macrosandtransport-async-rw.reject_remote_clientsis on, andfirst_pipe_instancerefuses a name that another process already holds.0700folder, with the socket itself at0600.LOWNOTES-MCP/1 <token>\nand getsOKorDENIEDback. The comparison is constant-time.mcp:token).for_frontend()and settings exports blank it.readOnlyHint):list_notes(optional folder),read_note,search_notes(the current keyword search),get_links,get_backlinks.lownotes://note/{path}.vault_id. The server instructions tell the client that note text is data, not instructions.mcp.vault_ids..lownotes/;safe_joinstill rejects..and hidden folders.vault_servicereads now take the vault the caller resolved, so a vault switch between the scope check and the read cannot serve another vault.Not in this PR
"mcp": { "enabled": true, "vault_ids": ["<vault id>"] }insettings.jsonand restart.McpService::applystarts or stops the server to match the settings.lownotes-mcpstdio bridge that clients launch is lownotes-mcp: stdio bridge for MCP clients, shipped on all platforms #102. The end-to-end test plays the client: it does the handshake,initialize,tools/list, every tool,resources/read, and checks refused paths and an unshared vault.Checks
cargo fmt --check,cargo clippy --lib --tests -- -D warnings(Windows)cargo test --locked --lib: 194 passed, 10 ignored. The new tests run over a real named pipe with the restricted DACL on Windows; CI covers the Unix socket path.cargo deny check bans sources: ok.advisoriesreports RUSTSEC-2026-0414 inpulldown-cmark0.13.4. That was already onmain, wherereferences.rsenablesENABLE_WIKILINKS, so the Security check on this PR fails until a separate dependency PR moves to 0.13.5.Closes #101