v0.1.118
Notepatra v0.1.118
MCP support — your editor, readable by your AI. Notepatra now ships notepatra-mcp, a spec-compliant Model Context Protocol server that connects Claude Desktop, Claude Code, OpenAI Codex CLI, the OpenAI Agents SDK, and any spec-compliant MCP client to the running editor: 22 tools in three tiers, every write gated behind a human Approve/Deny card inside the editor window. Local socket + stdio only — nothing leaves your machine. Full offscreen ctest 68/68, 47 sidecar cargo tests, live editor-plus-sidecar end-to-end 17/17.
New — the MCP server
notepatra-mcpis a small standalone Rust binary speaking stdio JSON-RPC 2.0 MCP (protocol revision2025-06-18;2025-03-26and2024-11-05also accepted from older clients). Pass--socketand it talks to the running editor over a dedicated per-user local socket; without--socketit runs against a built-in mock editor so you can test client integrations without Notepatra running.- 22 tools in three tiers:
- Read (10, no approval):
list_open_tabs,read_tab,get_selection,get_status,app_info,list_recent_files,find_in_tab,search_project,list_notes,read_note. - Act (8, visible and non-destructive):
open_file,new_tab,goto_line,set_language,compare_tabs,format_json,format_sql,format_html. - Write (4, human-gated):
insert_text,replace_selection,apply_edit,save_tab.
- Read (10, no approval):
- Resources: every open tab is published as
notepatra://tab/Nand every Noter note asnotepatra://note/<basename>(basename collisions fall back to the URI-encoded full path), so clients with resource pickers can pull a tab or note straight into the conversation. - Three ready-made prompts:
review-current-file,explain-selection,summarize-notes. - Works with the assistants you already use — Claude Desktop, Claude Code (
claude mcp add notepatra -- notepatra-mcp --socket), OpenAI Codex CLI, the OpenAI Agents SDK, and any spec-compliant stdio MCP client (Cursor, Windsurf, VS Code, your own). Cloud-only connector surfaces (ChatGPT connectors, claude.ai web connectors) can't reach a desktop editor and are honestly listed as unsupported.
Security — every write is human-approved
- The four write tools never execute on arrival. Each request shows a non-modal approval card inside the Notepatra window — it doesn't steal focus or block typing — with a preview of the change and Approve / Deny buttons.
- 120-second auto-deny if you don't respond; an explicit Deny returns
denied by userto the assistant as a readable tool error. Pending writes queue one card at a time (FIFO), and a client disconnect drops its pending requests. - No headless bypass — by design. With no visible editor window, writes are denied with
approval unavailable. There is no auto-approve setting, environment variable, or config flag. - The gate lives in the editor process itself (the C++ bridge), not in the sidecar — a modified or malicious MCP client still cannot write without a human clicking Approve inside Notepatra.
Availability
- New release artifacts: prebuilt
notepatra-mcp-linux-x64.tar.gz,notepatra-mcp-linux-arm64.tar.gz, andnotepatra-mcp-macos-arm64.tar.gz— cosign-signed like every other artifact. Or build from source withcargo build --releaseinnotepatra-mcp/(stable Rust, no other dependencies). - Linux and macOS first. The sidecar reaches the editor over Unix domain sockets; the Windows named-pipe client is a stub that returns a clear "not available on Windows yet" error and lands in a future release. Mock mode works everywhere.
- Both editions carry the bridge — Lite and Full — and
app_inforeports which one is running. - New docs page: notepatra.org/mcp.html — full tool reference, per-client setup snippets, the approval model, resources/prompts, honest limitations, and FAQ.
Honesty
- Bare-binary size re-measured from this release's artifact: 12.4 MB on Linux x64. (v0.1.117's dead-code removal briefly brought it to 12.2 MB; the in-editor MCP bridge adds ~0.2 MB back. Docs state what the shipped bytes actually are, each release.)
Under the hood / tested
- The editor opens a dedicated per-user
-mcplocal socket on launch (greeting-first handshake, hardened parsing, 20 bridge verbs); the wire contract is byte-exact on both sides. - Sidecar: 47 cargo tests (protocol + socket bridge suites); editor bridge:
test_mcp_bridgewith 315 assertions in ctest; full offscreen suite 68/68; live end-to-end script (real editor + real sidecar, read/act flow — write approval is exercised in the C++ suite) 17/17. release-check.shgains acargo testgate for the sidecar, andstale-text-check.shnow derives the MCP tool count from the sidecar's dispatch table so every docs surface stating "22 tools" is checked against the code.
No changes to the editor's existing feature surface. The MCP sidecar is a separate binary; the bare editor binary stays lean.