From 335e51c29b10bfa39a8671e2410b5d469bbc4b4b Mon Sep 17 00:00:00 2001 From: Prateek Singh Date: Sat, 18 Jul 2026 15:26:01 -0400 Subject: [PATCH 01/26] =?UTF-8?q?MCP=20Phase=200a+1:=20sub-app=20control?= =?UTF-8?q?=20foundation=20(35=E2=86=9241=20tools)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 0a (ergonomics + discovery): - set_language resolver: case-insensitive + aliases (python→Python, cpp→C++…), echoes the canonical token - git_*/search_project fall back to the active file's directory when no workspace folder is open (runGit tries workspace root, then file's repo) - new READ verbs: list_languages, get_capabilities (edition/features/tiers) Phase 1 (Diagram control + Noter): - create_diagram (ACT) — opens a rendered .npd DiagramEditor tab from source; shared MainWindow::newDiagramTab() with the Features→Diagram menu - get_diagram_source (READ) / set_diagram_source (WRITE, approval-gated) - open_noter (ACT) — reveal/focus the Noter panel Local-only, human-approval no-bypass invariant preserved. Tool count derived count bumped to 41 across docs; [0.1.119] release records left at 35. Gates green: cargo test (protocol 49/socket 14/lib 4), notepatra build, test_mcp_bridge, stale-text-check. Live-verified: MCP drew a diagram on canvas. Co-Authored-By: Claude Opus 4.8 --- README.md | 10 +- docs/docs.html | 12 +- docs/index.html | 4 +- docs/llms.txt | 2 +- docs/mcp.html | 32 ++-- notepatra-mcp/Cargo.toml | 2 +- notepatra-mcp/README.md | 2 +- notepatra-mcp/e2e.sh | 8 +- notepatra-mcp/server.json | 2 +- notepatra-mcp/src/tools.rs | 173 +++++++++++++++++ notepatra-mcp/src/transport/mock.rs | 121 ++++++++++-- notepatra-mcp/src/transport/mod.rs | 33 ++++ notepatra-mcp/src/transport/socket.rs | 52 +++++- notepatra-mcp/tests/protocol.rs | 131 ++++++++++++- notepatra-mcp/tests/socket_bridge.rs | 96 ++++++++++ scripts/stale-text-check.sh | 2 +- src/mainwindow.cpp | 247 +++++++++++++++++++------ src/mainwindow.h | 1 + src/mcp_bridge.cpp | 251 ++++++++++++++++++++++--- src/mcp_bridge.h | 24 +++ test_mcp_bridge.cpp | 255 +++++++++++++++++++++++++- 21 files changed, 1327 insertions(+), 133 deletions(-) diff --git a/README.md b/README.md index e002c53..89ce5cf 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ C++ + Rust · ~12 MB bare native executable · Zero Electron · 238 file types · 82 language lexers · Local AI formatters · MCP server

- New in v0.1.119: notepatra-mcp — connect Claude Desktop, Claude Code, OpenAI Codex, and any MCP client to the running editor. 35 tools (Git, read-only SQL, Noter notes); every write human-approved in-window; nothing leaves your machine. + New in v0.1.119: notepatra-mcp — connect Claude Desktop, Claude Code, OpenAI Codex, and any MCP client to the running editor. 41 tools (Git, read-only SQL, Noter notes); every write human-approved in-window; nothing leaves your machine.

Website · @@ -239,13 +239,13 @@ A first-class diagramming surface that **renders in the default binary on every From v0.1.118, Notepatra ships **`notepatra-mcp`** — a stdio JSON-RPC 2.0 [Model Context Protocol](https://modelcontextprotocol.io) server that connects external AI assistants (Claude Desktop, Claude Code, OpenAI Codex, the OpenAI Agents SDK, and any spec-compliant MCP client) to the running editor over a local socket. Nothing leaves your machine: stdio to the client, local socket to the editor, no network connections. -**35 tools in three tiers** (as of v0.1.119): +**41 tools in three tiers** (as of v0.1.119): | Tier | Tools | Gate | |---|---|---| -| **Read** (18) | tabs, selection, status, recent files, in-tab + project search, Noter notes, reminders, read-only Git (status / diff / log / show / branch), `.npd` validation, read-only SQL (`run_sql`) | None — observation only | -| **Act** (9) | open file, new tab, go to line, set language, compare tabs, format JSON/SQL/HTML, open note | None — visible, non-destructive | -| **Write** (8) | insert text, replace selection, find-and-replace, save, create note, append note, set reminder, export diagram | **Approve/Deny card inside the editor** — 120 s auto-deny, FIFO one card at a time, no headless bypass | +| **Read** (21) | tabs, selection, status, recent files, in-tab + project search, Noter notes, reminders, read-only Git (status / diff / log / show / branch), `.npd` validation, read-only SQL (`run_sql`), language list (`list_languages`), capability probe (`get_capabilities`), `.npd` source read (`get_diagram_source`) | None — observation only | +| **Act** (11) | open file, new tab, go to line, set language, compare tabs, format JSON/SQL/HTML, open note, create diagram, open Noter | None — visible, non-destructive | +| **Write** (9) | insert text, replace selection, find-and-replace, save, create note, append note, set reminder, export diagram, set diagram source | **Approve/Deny card inside the editor** — 120 s auto-deny, FIFO one card at a time, no headless bypass | `find_in_tab` and `search_project` also take an optional `regex` flag. `run_sql` is **SELECT-only** (rejected by the SQL classifier otherwise) and, on the Full/DuckDB edition, runs in an engine sandbox — the target file is materialized into an in-memory table, then DuckDB's external filesystem access is disabled (`enable_external_access=false`) before the untrusted query runs, so it cannot read host files. Since v0.1.119 the sidecar also supports Windows over a named pipe. diff --git a/docs/docs.html b/docs/docs.html index 2ddc03e..898c43e 100644 --- a/docs/docs.html +++ b/docs/docs.html @@ -1710,20 +1710,20 @@

Canvas & export

MCP server — your editor, readable by your AI (new in v0.1.118)

- New in v0.1.118, expanded to 35 tools in v0.1.119 (the current release). Full details, per-client setup snippets, and the FAQ live on the dedicated MCP page. + New in v0.1.118, expanded to 41 tools in v0.1.119 (the current release). Full details, per-client setup snippets, and the FAQ live on the dedicated MCP page.

From v0.1.118, Notepatra ships notepatra-mcp — a standalone stdio JSON-RPC 2.0 Model Context Protocol server (protocol revision 2025-06-18; 2025-03-26 and 2024-11-05 also accepted) that connects external AI assistants to the running editor over a dedicated per-user local connection (a Unix domain socket on Linux/macOS, or — since v0.1.119 — a Windows named pipe). Pass --socket to target the live editor; without it the server runs against a built-in mock editor for protocol testing. It works with Claude Desktop, Claude Code, OpenAI Codex CLI, the OpenAI Agents SDK, and any spec-compliant stdio MCP client (Cursor, Windsurf, VS Code).

-

The server exposes 35 tools in three tiers:

+

The server exposes 41 tools in three tiers:

- - - + + +
TierToolsGate
Read (18)list_open_tabs, read_tab, get_selection, get_status, app_info, list_recent_files, find_in_tab, search_project, list_notes, read_note, list_reminders, git_status, git_diff, git_log, git_show, git_branch, validate_npd, run_sqlNone — observation only
Act (9)open_file, new_tab, goto_line, set_language, compare_tabs, format_json, format_sql, format_html, open_noteNone — visible, non-destructive editor actions
Write (8)insert_text, replace_selection, apply_edit, save_tab, create_note, append_note, set_reminder, export_diagramHuman approval card — see below
Read (21)list_open_tabs, read_tab, get_selection, get_status, app_info, list_recent_files, find_in_tab, search_project, list_notes, read_note, list_reminders, git_status, git_diff, git_log, git_show, git_branch, validate_npd, run_sql, list_languages, get_capabilities, get_diagram_sourceNone — observation only
Act (11)open_file, new_tab, goto_line, set_language, compare_tabs, format_json, format_sql, format_html, open_note, create_diagram, open_noterNone — visible, non-destructive editor actions
Write (9)insert_text, replace_selection, apply_edit, save_tab, create_note, append_note, set_reminder, export_diagram, set_diagram_sourceHuman approval card — see below

find_in_tab and search_project take an optional regex flag (v0.1.119) for regular-expression search. run_sql is SELECT-only — the classifier rejects any non-read query — and on the Full/DuckDB edition it runs in an engine sandbox: the target CSV / Parquet / JSON is materialized into an in-memory table, then DuckDB's external filesystem access is disabled (enable_external_access=false) before the untrusted SQL runs, so it cannot read host files even via read_text, read_csv_auto, or a replacement scan.

-

The write-approval model. The eight write tools never execute on arrival. Each request shows a non-modal approval card inside the editor window with a preview and Approve / Deny buttons. No response within 120 seconds auto-denies (approval timed out); an explicit Deny returns denied by user to the assistant. Pending writes queue one card at a time (FIFO), and there is no headless fallback: without a visible window the write is denied with approval unavailable. The gate lives in the editor process, not in the sidecar, so no MCP client can write without a human click.

+

The write-approval model. The nine write tools never execute on arrival. Each request shows a non-modal approval card inside the editor window with a preview and Approve / Deny buttons. No response within 120 seconds auto-denies (approval timed out); an explicit Deny returns denied by user to the assistant. Pending writes queue one card at a time (FIFO), and there is no headless fallback: without a visible window the write is denied with approval unavailable. The gate lives in the editor process, not in the sidecar, so no MCP client can write without a human click.

Beyond tools, the server publishes MCP resources — every open tab as notepatra://tab/N and every Noter note as notepatra://note/<basename> — and three prompts: review-current-file, explain-selection, and summarize-notes.

Quick start with the two CLI-first clients (from v0.1.118):

# Claude Code (Anthropic)
diff --git a/docs/index.html b/docs/index.html
index d7aa498..54601c4 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1315,7 +1315,7 @@
     
v0.1.119 · Now Available · MCP server for AI assistants · Linux · Windows · macOS

The code editor built for the AI era

-

Tiny native binary (~12 MB bare, ~4.4 MB compressed on Linux). C++ and Rust. 238 file types · 82 language lexers. JSON / HTML / SQL fixers — regex first, local AI as fallback. Local AI by default; cloud LLMs opt-in. Or pick the Local AI build for a binary that physically refuses to talk to public endpoints. New in v0.1.119: the MCP server grows to 35 tools (Git, read-only SQL, Noter notes) with Windows support — connect Claude, Codex, or any MCP client straight to your editor.

+

Tiny native binary (~12 MB bare, ~4.4 MB compressed on Linux). C++ and Rust. 238 file types · 82 language lexers. JSON / HTML / SQL fixers — regex first, local AI as fallback. Local AI by default; cloud LLMs opt-in. Or pick the Local AI build for a binary that physically refuses to talk to public endpoints. New in v0.1.119: the MCP server grows to 41 tools (Git, read-only SQL, Noter notes) with Windows support — connect Claude, Codex, or any MCP client straight to your editor.

@@ -1670,7 +1670,7 @@

Windows x64

🔌

MCP — your editor, readable by your AI NEW IN v0.1.118

-

A built-in Model Context Protocol server (notepatra-mcp) connects the assistants you already use — Claude Desktop, Claude Code, OpenAI Codex, the OpenAI Agents SDK, and any spec-compliant MCP client — to the running editor. 35 tools in three tiers (v0.1.119): read (tabs, selection, search, Noter notes, reminders, read-only Git and SQL), act (open, compare, format, navigate, open notes), and write (edit, save, create/append notes, set reminders, export diagrams) — where every write shows an Approve / Deny card inside the editor and does nothing until you click Approve (auto-deny after 120 s, no headless bypass). Local socket + stdio only — nothing leaves your machine. Read the MCP docs →

+

A built-in Model Context Protocol server (notepatra-mcp) connects the assistants you already use — Claude Desktop, Claude Code, OpenAI Codex, the OpenAI Agents SDK, and any spec-compliant MCP client — to the running editor. 41 tools in three tiers (v0.1.119): read (tabs, selection, search, Noter notes, reminders, read-only Git and SQL, diagram source), act (open, compare, format, navigate, open notes, create diagram, open Noter panel), and write (edit, save, create/append notes, set reminders, replace diagram source, export diagrams) — where every write shows an Approve / Deny card inside the editor and does nothing until you click Approve (auto-deny after 120 s, no headless bypass). Local socket + stdio only — nothing leaves your machine. Read the MCP docs →

diff --git a/docs/llms.txt b/docs/llms.txt index 7d9027b..5687e55 100644 --- a/docs/llms.txt +++ b/docs/llms.txt @@ -18,7 +18,7 @@ Key facts: - From v0.1.118 Notepatra ships notepatra-mcp, a stdio JSON-RPC 2.0 Model Context Protocol server (protocol revision 2025-06-18; 2025-03-26 and 2024-11-05 also accepted) that connects AI assistants to the running editor over a local socket. Since v0.1.119 the sidecar also supports Windows over a named pipe. - Works with Claude Desktop, Claude Code, OpenAI Codex CLI, the OpenAI Agents SDK, and any spec-compliant stdio MCP client; cloud-only connector surfaces (ChatGPT connectors, claude.ai web connectors) cannot reach a desktop editor. -- Exposes 35 tools in three tiers (v0.1.119): read (18: tabs, selection, search, Noter notes, reminders, read-only Git status/diff/log/show/branch, npd validation, read-only SELECT SQL), act (9: open, compare, format, navigate, open note), and write (8: insert/replace/edit/save, create/append note, set reminder, export diagram) — every write requires the user to click Approve on a card inside the editor (120-second auto-deny, no headless bypass). find_in_tab and search_project take an optional regex flag. run_sql is SELECT-only and, on the Full/DuckDB edition, runs in an engine sandbox (file materialized in-memory, then enable_external_access=false) so it cannot read host files. Also publishes open tabs and Noter notes as MCP resources plus 3 prompts. +- Exposes 41 tools in three tiers (v0.1.119): read (21: tabs, selection, search, Noter notes, reminders, read-only Git status/diff/log/show/branch, npd validation + diagram source read, read-only SELECT SQL, language list, capability probe), act (11: open, compare, format, navigate, open note, create diagram, open Noter panel), and write (9: insert/replace/edit/save, create/append note, set reminder, set diagram source, export diagram) — every write requires the user to click Approve on a card inside the editor (120-second auto-deny, no headless bypass). find_in_tab and search_project take an optional regex flag. run_sql is SELECT-only and, on the Full/DuckDB edition, runs in an engine sandbox (file materialized in-memory, then enable_external_access=false) so it cannot read host files. Also publishes open tabs and Noter notes as MCP resources plus 3 prompts. - Privacy: stdio + local socket only; notepatra-mcp itself makes no network connections. - [MCP documentation](https://notepatra.org/mcp.html): tool reference, per-client setup, security model, FAQ. diff --git a/docs/mcp.html b/docs/mcp.html index 2633fed..e01185b 100644 --- a/docs/mcp.html +++ b/docs/mcp.html @@ -4,7 +4,7 @@ Notepatra MCP — Your editor, readable by your AI - + @@ -229,13 +229,13 @@

Your editor, readable by your AI

From v0.1.118, Notepatra ships notepatra-mcp — a Model Context Protocol server that lets Claude Desktop, Claude Code, OpenAI Codex, the OpenAI Agents SDK, and any spec-compliant MCP client see what you have open, search your workspace, run read-only SQL over your data files, read your Git status and Noter notes, and — only with your explicit per-action approval — edit, save, and create notes. Everything runs over stdio and a local socket. Nothing leaves your machine.

- Release status. MCP first shipped in v0.1.118; the current release is v0.1.119, which expands the server to 35 tools (Git, read-only SQL, Noter write verbs, diagram export) and adds Windows named-pipe support. Everything on this page describes v0.1.119. + Release status. MCP first shipped in v0.1.118; the current release is v0.1.119, which expands the server to 41 tools (Git, read-only SQL, Noter write verbs, diagram export) and adds Windows named-pipe support. Everything on this page describes v0.1.119.
-

Single instance. As of v0.1.119, launching notepatra file.txt while Notepatra is already running hands the file to the existing window (raised and focused) and exits — after the running instance proves it's alive, so an open can never be silently swallowed. If the running instance is hung or busy for more than ~3 seconds, you get a visible temporary window with just your files instead: it never touches your saved session, and it prompts Save / Discard / Cancel per modified tab when closed. --new opens the same kind of session-independent window on purpose. --line N always targets the first file listed. Files that don't exist produce a notice in the running window rather than disappearing silently.

+

Single instance. As of v0.1.120, launching notepatra file.txt while Notepatra is already running hands the file to the existing window (raised and focused) and exits — after the running instance proves it's alive, so an open can never be silently swallowed. If the running instance is hung or busy for more than ~3 seconds, you get a visible temporary window with just your files instead: it never touches your saved session, and it prompts Save / Discard / Cancel per modified tab when closed. --new opens the same kind of session-independent window on purpose. --line N always targets the first file listed. Files that don't exist produce a notice in the running window rather than disappearing silently.

Config file layout

All persistent state lives under:

diff --git a/docs/index.html b/docs/index.html index f459693..aee3fb7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -49,7 +49,7 @@ "applicationCategory": "DeveloperApplication", "applicationSubCategory": "TextEditor", "description": "Native Qt5 + QScintilla code editor with an original C++17/Rust core, built for the AI era. Bare executable is ~12 MB across platforms (12.4 MB on Linux x64); full downloads are 4.4 MB (Linux x64 tar.gz), 27.7 MB (macOS DMG with bundled Qt), 42.7 MB (Windows MSI with bundled Qt DLLs). 238 file types. 82 language lexers. JSON / HTML / SQL fixers. AI dock dropdown ships six backends: Ollama, llama.cpp (GGUF), OpenRouter, Ollama Cloud, OpenAI, Azure OpenAI; the llama.cpp entry also accepts a user-configured URL so it can reach any OpenAI-compatible server (examples redacted). Free forever. Linux, Windows, macOS.", - "softwareVersion": "0.1.119", + "softwareVersion": "0.1.120", "fileSize": "12.4 MB", "downloadUrl": "https://github.com/singhpratech/notepatra/releases/latest", "installUrl": "https://notepatra.org/#install", @@ -151,7 +151,7 @@ "name": "How big is the Notepatra binary?", "acceptedAnswer": { "@type": "Answer", - "text": "The bare Notepatra executable is ~12 MB across every platform (12.4 MB on Linux x64). Latest v0.1.119 download sizes: 4.4 MB Linux x64 tar.gz, 4.1 MB Linux ARM64 tar.gz, 27.7 MB macOS DMG (with bundled Qt), 42.7 MB Windows MSI / 32.8 MB NSIS / 37.4 MB portable zip (with bundled Qt + QScintilla DLLs). After Windows install the on-disk footprint is ~75-85 MB because the MSI extracts the bundled Qt5 DLLs and QScintilla DLL out of the compressed payload — that's normal for any Qt app installer. Linux installs stay tiny (~12.4 MB on disk / bare) because Qt5 comes from your distro repo. Notepatra installs at ~12–85 MB depending on platform." + "text": "The bare Notepatra executable is ~12 MB across every platform (12.4 MB on Linux x64). Latest v0.1.120 download sizes: 4.4 MB Linux x64 tar.gz, 4.1 MB Linux ARM64 tar.gz, 27.7 MB macOS DMG (with bundled Qt), 42.7 MB Windows MSI / 32.8 MB NSIS / 37.4 MB portable zip (with bundled Qt + QScintilla DLLs). After Windows install the on-disk footprint is ~75-85 MB because the MSI extracts the bundled Qt5 DLLs and QScintilla DLL out of the compressed payload — that's normal for any Qt app installer. Linux installs stay tiny (~12.4 MB on disk / bare) because Qt5 comes from your distro repo. Notepatra installs at ~12–85 MB depending on platform." } }, { @@ -167,7 +167,7 @@ "name": "What languages and file types does Notepatra support?", "acceptedAnswer": { "@type": "Answer", - "text": "Notepatra supports 238 file types with 82 language lexers as of v0.1.119: Python, JavaScript, TypeScript, C, C++, C#, Java, Kotlin, Rust, Go, Dart, Solidity, Zig, Vala, Hack, Julia, R, Protobuf, F#, HCL/Terraform, Thrift, GraphQL, GDScript, Nim, Cython, Mojo, Crystal, Elixir, Scala, Groovy, Apex, HTML, CSS, SQL (6 dialect presets), JSON, JSON5, YAML, TOML, Markdown, Bash, Fish, Nushell, Ruby, Perl, Lua, Fortran, Verilog, VHDL, MATLAB, LaTeX, BibTeX, Jinja, Liquid, Twig, Dockerfile, DotEnv, Gitignore, and many more." + "text": "Notepatra supports 238 file types with 82 language lexers as of v0.1.120: Python, JavaScript, TypeScript, C, C++, C#, Java, Kotlin, Rust, Go, Dart, Solidity, Zig, Vala, Hack, Julia, R, Protobuf, F#, HCL/Terraform, Thrift, GraphQL, GDScript, Nim, Cython, Mojo, Crystal, Elixir, Scala, Groovy, Apex, HTML, CSS, SQL (6 dialect presets), JSON, JSON5, YAML, TOML, Markdown, Bash, Fish, Nushell, Ruby, Perl, Lua, Fortran, Verilog, VHDL, MATLAB, LaTeX, BibTeX, Jinja, Liquid, Twig, Dockerfile, DotEnv, Gitignore, and many more." } }, { @@ -1284,8 +1284,8 @@ - - Download v0.1.119 ↓ + + Download v0.1.120 ↓
@@ -1313,9 +1313,9 @@
-
v0.1.119 · Now Available · MCP server for AI assistants · Linux · Windows · macOS
+
v0.1.120 · Now Available · MCP server for AI assistants · Linux · Windows · macOS

The code editor built for the AI era

-

Tiny native binary (~12 MB bare, ~4.4 MB compressed on Linux). C++ and Rust. 238 file types · 82 language lexers. JSON / HTML / SQL fixers — regex first, local AI as fallback. Local AI by default; cloud LLMs opt-in. Or pick the Local AI build for a binary that physically refuses to talk to public endpoints. New in v0.1.119: the MCP server grows to 48 tools (Git, read-only SQL, saved-connection queries, charts, Noter notes) — connect Claude, Codex, or any MCP client straight to your editor.

+

Tiny native binary (~12 MB bare, ~4.4 MB compressed on Linux). C++ and Rust. 238 file types · 82 language lexers. JSON / HTML / SQL fixers — regex first, local AI as fallback. Local AI by default; cloud LLMs opt-in. Or pick the Local AI build for a binary that physically refuses to talk to public endpoints. New in v0.1.120: the MCP server ships a prebuilt signed Windows sidecar and a one-click Claude Desktop bundle — its 48 tools (Git, read-only SQL, saved-connection queries, charts, Noter notes) connect Claude, Codex, or any MCP client straight to your editor.

@@ -1403,7 +1403,7 @@

Built-in tools.

- +
One-command install or direct download
Auto-detecting installer scripts, or pick your platform from GitHub Releases. No telemetry. No tracking. Just a binary.
@@ -1471,7 +1471,7 @@

margin-top: 18px; padding: 9px 16px; border-radius: 8px; background: var(--green); color: white; text-decoration: none; font-weight: 600; font-size: 13.5px;"> - Get Notepatra v0.1.119 → + Get Notepatra v0.1.120 →

@@ -1514,7 +1514,7 @@

margin-top: 18px; padding: 9px 16px; border-radius: 8px; background: #a87bc4; color: white; text-decoration: none; font-weight: 600; font-size: 13.5px;"> - Get Notepatra Local AI v0.1.119 → + Get Notepatra Local AI v0.1.120 →

@@ -2016,47 +2016,40 @@

Responsible disclosure

-
v0.1.119 LATEST
+
v0.1.120 LATEST
2026-07-18 - · MCP depth — 35 tools: the notepatra-mcp server grows from 22 to 35 tools — read-only Git (status / diff / log / show / branch), read-only SQL, Noter reminders and .npd validation, plus approval-gated write verbs for creating and appending notes, setting reminders, and exporting diagrams. Windows named-pipe transport is now supported. + · MCP distribution — prebuilt Windows sidecar + one-click Claude Desktop bundle: the notepatra-mcp server (48 tools) now ships a prebuilt, cosign-signed Windows binary (notepatra-mcp-windows-x64.zip) and a one-click .mcpb Claude Desktop bundle as release assets, alongside cargo install notepatra-mcp on every platform. · Lite (default, bare) + Full · Linux · macOS (incl. Apple Silicon) · Windows
-
New — 13 more MCP tools (Read 18 / Act 9 / Write 8)
+
New — signed release distribution for the MCP sidecar
    -
  • Read (no approval)list_reminders, git_status, git_diff, git_log, git_show, git_branch, validate_npd, and run_sql (SELECT-only).
  • -
  • Act (visible, no approval)open_note opens a Noter note in the editor.
  • -
  • Write (human-approved)create_note, append_note, set_reminder, and export_diagram. find_in_tab and search_project also gained an optional regex flag.
  • +
  • Prebuilt Windows sidecarnotepatra-mcp-windows-x64.zip ships as a cosign-signed release asset, so Windows users no longer have to build from source or run cargo install first.
  • +
  • One-click Claude Desktop bundlenotepatra-mcp.mcpb installs the sidecar straight from Claude Desktop's Settings → Extensions.
  • +
  • cargo install notepatra-mcp remains a fully supported install path on every platform.
-
New — Windows named-pipe transport
+
Unchanged — the 48-tool surface and the approval gate
    -
  • The sidecar now connects to the running editor over a Windows named pipe (\\.\pipe\…), so --socket works on Linux, macOS, and Windows alike. Prebuilt Windows binaries aren't in the signed bundle yet — build from source or cargo install notepatra-mcp.
  • -
-
-
-
Security — the approval gate extends to the new write verbs, and run_sql is sandboxed
-
    -
  • The four new write verbs (create / append note, set reminder, export diagram) go through the same in-editor Approve / Deny card as every other write — 120 s auto-deny, no headless bypass, gate in the editor process.
  • -
  • run_sql is SELECT-only via the SQL classifier; on the Full/DuckDB edition the file is materialized into an in-memory table and DuckDB's external filesystem access is then disabled (enable_external_access=false) before the untrusted query runs, so it cannot read host files. An adversarial security pass hardened run_sql before ship.
  • +
  • All 48 tools (Read / Act / Write) behave exactly as in v0.1.119; every write verb still goes through the in-editor Approve / Deny card (120 s auto-deny, no headless bypass), and run_sql stays SELECT-only with the DuckDB engine sandbox.
Honesty
    -
  • The 13 new tools live in the separate notepatra-mcp sidecar, so the bare Lite editor binary is unchanged at 12.4 MB on Linux x64. Full offscreen ctest 71/71, Lite 68/68, 60 sidecar cargo tests, live editor-plus-sidecar end-to-end across all 35 tools.
  • +
  • The new distribution artifacts live in the separate notepatra-mcp sidecar, so the bare Lite editor binary is unchanged at 12.4 MB on Linux x64. Full offscreen ctest 71/71, Lite 68/68, 60 sidecar cargo tests, live editor-plus-sidecar end-to-end across all 48 tools.
@@ -2173,7 +2166,7 @@

v0.2.0 — next milestone

What is Notepatra?

-

Notepatra is a native Qt5 + QScintilla code editor with an original C++17/Rust core for hot paths (memory-mapped I/O, Aho-Corasick search, Myers diff, formatters). Runs on Linux x64 / ARM64, macOS Apple Silicon, and Windows x64 from a single codebase. ~12 MB bare executable, no Electron runtime, no telemetry, no mandatory account. Local-first AI is built in: pick from Ollama, llama.cpp, OpenRouter, OpenAI, Azure OpenAI, or Ollama Cloud. As of v0.1.119: 238 file types · 82 language lexers, a Data Analyst mode that works out of the box on CSV files and an in-memory SQLite engine (the Full download bundles the DuckDB v1.1.3 engine on every platform), agentic Coding Mode with read / list / search / write / apply_diff tools, Cursor-style Composer + Ctrl+I inline edit, multi-cursor, AI-driven git tools (read-only: status / diff / log / branch / show).

+

Notepatra is a native Qt5 + QScintilla code editor with an original C++17/Rust core for hot paths (memory-mapped I/O, Aho-Corasick search, Myers diff, formatters). Runs on Linux x64 / ARM64, macOS Apple Silicon, and Windows x64 from a single codebase. ~12 MB bare executable, no Electron runtime, no telemetry, no mandatory account. Local-first AI is built in: pick from Ollama, llama.cpp, OpenRouter, OpenAI, Azure OpenAI, or Ollama Cloud. As of v0.1.120: 238 file types · 82 language lexers, a Data Analyst mode that works out of the box on CSV files and an in-memory SQLite engine (the Full download bundles the DuckDB v1.1.3 engine on every platform), agentic Coding Mode with read / list / search / write / apply_diff tools, Cursor-style Composer + Ctrl+I inline edit, multi-cursor, AI-driven git tools (read-only: status / diff / log / branch / show).

Is it really free? What's the catch?

@@ -2185,7 +2178,7 @@

Can I install Notepatra at my company?

How big is the binary?

-

The bare executable is ~12 MB (12.4 MB on Linux x64) across every platform. Latest v0.1.119 download sizes: 4.4 MB Linux x64 tar.gz · 4.1 MB Linux ARM64 tar.gz · 27.7 MB macOS DMG · 42.7 MB Windows MSI / 32.8 MB NSIS / 37.4 MB portable zip. Installed on Windows the on-disk footprint grows to ~75-85 MB because the MSI extracts bundled Qt5 + QScintilla DLLs out of the compressed payload — normal for every Qt-based installer. Linux stays tiny (~12 MB on disk) because Qt is a system package; macOS and Windows bundle Qt + QScintilla DLLs for portability.

+

The bare executable is ~12 MB (12.4 MB on Linux x64) across every platform. Latest v0.1.120 download sizes: 4.4 MB Linux x64 tar.gz · 4.1 MB Linux ARM64 tar.gz · 27.7 MB macOS DMG · 42.7 MB Windows MSI / 32.8 MB NSIS / 37.4 MB portable zip. Installed on Windows the on-disk footprint grows to ~75-85 MB because the MSI extracts bundled Qt5 + QScintilla DLLs out of the compressed payload — normal for every Qt-based installer. Linux stays tiny (~12 MB on disk) because Qt is a system package; macOS and Windows bundle Qt + QScintilla DLLs for portability.

Does my code go to the cloud?

@@ -2193,7 +2186,7 @@

Does my code go to the cloud?

What languages does Notepatra highlight?

-

238 file types via 82 language lexers as of v0.1.119 — Python, JavaScript, TypeScript, C, C++, C#, Java, Kotlin, Rust, Go, Dart, Solidity, Zig, Vala, Hack, Julia, R, Protobuf, F#, HCL/Terraform, Thrift, GraphQL, GDScript, Nim, Cython, Mojo, Crystal, Elixir, Scala, Groovy, Apex, HTML, CSS, SQL (6 dialect presets), JSON, JSON5, YAML, TOML, Markdown, Bash, Fish, Nushell, Ruby, Perl, Lua, Fortran, Verilog, VHDL, MATLAB, LaTeX, BibTeX, Jinja, Liquid, Twig, Dockerfile, DotEnv, Gitignore, Pascal, CMake, Makefile, and more. Each lexer ships with comment / uncomment / block-comment syntax (Ctrl+Q / Ctrl+Shift+Q) and proper file-extension routing.

+

238 file types via 82 language lexers as of v0.1.120 — Python, JavaScript, TypeScript, C, C++, C#, Java, Kotlin, Rust, Go, Dart, Solidity, Zig, Vala, Hack, Julia, R, Protobuf, F#, HCL/Terraform, Thrift, GraphQL, GDScript, Nim, Cython, Mojo, Crystal, Elixir, Scala, Groovy, Apex, HTML, CSS, SQL (6 dialect presets), JSON, JSON5, YAML, TOML, Markdown, Bash, Fish, Nushell, Ruby, Perl, Lua, Fortran, Verilog, VHDL, MATLAB, LaTeX, BibTeX, Jinja, Liquid, Twig, Dockerfile, DotEnv, Gitignore, Pascal, CMake, Makefile, and more. Each lexer ships with comment / uncomment / block-comment syntax (Ctrl+Q / Ctrl+Shift+Q) and proper file-extension routing.

What file encodings are supported?

diff --git a/docs/mcp.html b/docs/mcp.html index f1b6c49..fa57b89 100644 --- a/docs/mcp.html +++ b/docs/mcp.html @@ -4,7 +4,7 @@ Notepatra MCP — Your editor, readable by your AI - + @@ -229,7 +229,7 @@

Your editor, readable by your AI

From v0.1.118, Notepatra ships notepatra-mcp — a Model Context Protocol server that lets Claude Desktop, Claude Code, OpenAI Codex, the OpenAI Agents SDK, and any spec-compliant MCP client see what you have open, search your workspace, run read-only SQL over your data files, read your Git status and Noter notes, and — only with your explicit per-action approval — edit, save, and create notes. Everything runs over stdio and a local socket. Nothing leaves your machine.

- Release status. MCP first shipped in v0.1.118; the current release is v0.1.119, which expands the server to 48 tools (Git, read-only SQL, Noter write verbs, diagram export) and adds Windows named-pipe support. Everything on this page describes v0.1.119. + Release status. MCP first shipped in v0.1.118; the current release is v0.1.120. The server provides 48 tools (Git, read-only SQL, Noter write verbs, diagram export) and supports Windows named-pipe transport, and v0.1.120 adds a prebuilt, cosign-signed Windows sidecar (notepatra-mcp-windows-x64.zip) plus a one-click notepatra-mcp.mcpb Claude Desktop bundle as release assets. Everything on this page describes v0.1.120.