apple-notes-mcp 2.10.0 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1813,7 +1813,7 @@ disabled checkboxes, block quotes and monospaced paragraphs become
1813
1813
  `blockquote` and `pre`, and inline runs keep bold, italic, underline,
1814
1814
  strikethrough, highlight, superscript, subscript, text color and safe links.
1815
1815
  Tables are semantic `<table>` elements with a header row. Images, drawings
1816
- (Notes' fallback image, or its preview), scans (PDF with preview), audio,
1816
+ (Notes' fallback image by default, SVG with `vectorDrawings: true`; see below), scans (PDF with preview), audio,
1817
1817
  video, files and link cards (title, domain and preview thumbnail) appear in
1818
1818
  body order. Attachments with no body marker are appended in creation order.
1819
1819
  An attachment with no usable source renders a visible
@@ -1823,6 +1823,22 @@ An attachment with no usable source renders a visible
1823
1823
  A folder export is one presentation document with notes separated by
1824
1824
  `<hr class="note-separator">`. It is not a backup or restore format.
1825
1825
 
1826
+ By default every drawing keeps Notes' own fallback image, a fixed-size PNG.
1827
+ With `vectorDrawings: true`, classic PencilKit drawings (`com.apple.drawing.2`
1828
+ and `com.apple.drawing`) are rendered as SVG instead, decoded through the
1829
+ public native helper exactly as [`get-note-drawings`](#get-note-drawings)
1830
+ does. The option is off by default because decoding runs the helper and costs
1831
+ extra time per note. The SVG is embedded as a data
1832
+ URL, or written to the sidecar directory with `embedAssets: false`, and it is
1833
+ subject to the same size limits as any other asset. It stays sharp at any
1834
+ zoom. Paper drawings
1835
+ (`com.apple.paper`) have no public decoder and keep Notes' fallback image or
1836
+ preview. If the helper is not built (`apple-notes-mcp setup --public-helper`),
1837
+ a drawing does not decode, the helper stopped at its stroke limit, or the SVG
1838
+ is too large, that drawing falls back to the PNG; the export never fails for
1839
+ it. The SVG traces each stroke's points with its color and mean width, so
1840
+ pencil grain and marker blending are approximated.
1841
+
1826
1842
  **Requires:** Full Disk Access. Password-protected notes are skipped in a
1827
1843
  folder export and refused for a single note.
1828
1844
 
@@ -1835,6 +1851,7 @@ folder export and refused for a single note.
1835
1851
  | `outputPath` | string | Yes | Absolute HTML file to create. Create-only: an existing file is refused with `[output_exists]` |
1836
1852
  | `embedAssets` | boolean | No | Embed assets as data URLs (default `true`). Each asset is capped at 10 MiB and a document at 256 MiB of embedded assets; a larger one renders as unavailable with a hint to use `embedAssets: false` |
1837
1853
  | `assetsDir` | string | No | With `embedAssets: false`, the sidecar directory (default `<output stem>.assets` beside the file). Existing files are never replaced; a taken name gets `-2`, `-3`, ... |
1854
+ | `vectorDrawings` | boolean | No | Render classic drawings as SVG through the public native helper (default `false`). When `false` or omitted, every drawing keeps Notes' PNG and the helper never runs |
1838
1855
 
1839
1856
  The HTML is always written to a file, because an embedded document is too
1840
1857
  large for an MCP message. Paths follow the `save-attachment` rules and may not
@@ -1842,8 +1859,14 @@ point inside the Notes library container. Sidecar URLs are relative to the
1842
1859
  HTML file, so the file and its `.assets` directory can be moved together.
1843
1860
 
1844
1861
  **Returns:** `format`, `count`, `bytes`, `output`, either `embedded` (assets
1845
- embedded) or `assets` (`dir`, `files`), `stats`, and `skipped`. Nothing
1846
- already written is deleted if a later step fails.
1862
+ embedded) or `assets` (`dir`, `files`), `stats`, and `skipped`. When the notes
1863
+ contain classic drawings and `vectorDrawings` is `true`, `vectorDrawings` reports
1864
+ `rendered` (drawings placed as SVG), `fallback` (drawings left as PNG), and
1865
+ `fallbackReasons`, a count per code such as `helper_not_installed`,
1866
+ `undecodable`, `truncated`, `timeout`, or `too-large`. After one helper
1867
+ timeout, or when the helper is not usable, the remaining drawings in the
1868
+ export are not decoded. Nothing already written is deleted if a later step
1869
+ fails.
1847
1870
 
1848
1871
  ---
1849
1872
 
@@ -2863,6 +2886,45 @@ Every tool that does not read the Notes database works normally without Full Dis
2863
2886
 
2864
2887
  ---
2865
2888
 
2889
+ ## Permissions check
2890
+
2891
+ `apple-notes-mcp setup --permissions` checks, in one report, the four grants that decide what the server can do on this Mac:
2892
+
2893
+ | Item | How it is checked | Needed for |
2894
+ |------|-------------------|------------|
2895
+ | Full Disk Access | one read-only `SELECT 1` against `NoteStore.sqlite` | every database-backed tool (see [Full Disk Access](#full-disk-access)) |
2896
+ | Automation of Notes.app | one read-only Apple event (the first account's name), sent only with `--probe-automation` | every AppleScript tool |
2897
+ | Shortcut bridges (optional) | `shortcuts list`, like `setup --check` | the native-write tools |
2898
+ | Speech Recognition (optional) | the public helper's `speech_status`, read without prompting | `transcribe-note-audio` before macOS 26 |
2899
+
2900
+ ```bash
2901
+ apple-notes-mcp setup --permissions # report, then press Enter to check again
2902
+ apple-notes-mcp setup --permissions --open # also open the System Settings pane of each missing grant
2903
+ apple-notes-mcp setup --permissions --once # report once and exit (also --json)
2904
+ apple-notes-mcp setup --permissions --probe-automation # also check Automation (sends one Apple event)
2905
+ ```
2906
+
2907
+ For each missing grant the report names the System Settings pane and its URL, for example `x-apple.systempreferences:com.apple.settings.PrivacySecurity.extension?Privacy_AllFiles` (the `com.apple.preference.security` form before macOS 13). Panes open only with `--open`, each once per run. The command never changes a setting or a grant: you make the change in System Settings, then press Enter to check again. Type `q` to stop. It exits 1 when a required grant is missing or could not be verified, and 0 otherwise, so a run that did not probe Automation exits 0 if Full Disk Access is granted.
2908
+
2909
+ Automation is the one item that cannot be read without talking to Notes.app, so it is opt-in. By default the command sends no Apple event, and the Automation line reads `unknown` (not probed) with the command that checks it. Add `--probe-automation` to send one read-only event; the first time, macOS may ask whether the app may control Notes, and **Allow** is the only way to add an Automation grant. The probe never runs under `--check` (which reports state only) or when `SSH_CONNECTION` is set, because nobody at the remote shell can answer the prompt. In those cases the line reads `unknown` even if `--probe-automation` was passed. An unprobed Automation line does not change the exit code and the report says Automation was not checked, so run the probe from a terminal on the Mac itself when you need to know. A probe that runs and fails (denied, or no answer) does exit 1.
2910
+
2911
+ macOS attributes these grants to the app that launched the process, so the report names it (for example `/Applications/iTerm.app`). Run the check from the app you use as the MCP host when you can. Claude Desktop launches servers as their own responsible process, so for it use the `doctor` tool inside Claude Desktop, and add the Node binary it names to Full Disk Access. The Speech item reads `unknown` until the [public native helper](#public-native-helper) is built.
2912
+
2913
+ ### Optional checklist window
2914
+
2915
+ The same checklist is also available in a small window with **Open Settings** and **Re-check** buttons. Like the public helper, it is built on your Mac from the packaged Swift source, never shipped as a binary:
2916
+
2917
+ ```bash
2918
+ apple-notes-mcp setup --permissions-window # compile, ad-hoc sign, verify, install
2919
+ apple-notes-mcp setup --permissions-window --check # report the installed state only
2920
+ apple-notes-mcp setup --permissions --window # open the window
2921
+ apple-notes-mcp setup --permissions --window --probe-automation # the window's checks include Automation
2922
+ ```
2923
+
2924
+ Setup compiles `native/permissions-window/apple-notes-permissions-window.swift`, signs it ad hoc, runs its `hello` handshake (which shows no window), and installs it in `~/Library/Application Support/apple-notes-mcp/permissions-window/` with a manifest of source and binary SHA-256 digests; `APPLE_NOTES_MCP_PERMISSIONS_WINDOW_DIR` overrides the folder. The window probes nothing itself. The command runs every check and sends the results to it, and opens a pane only for an item it reported. The window shows an unprobed Automation item as "Not checked", with the command that checks it, and gives it no Open Settings button. If the window is not built, is stale after an upgrade, or was modified, `--window` says so and shows the checklist in the terminal instead. The server never uses the window.
2925
+
2926
+ ---
2927
+
2866
2928
  ## Public native helper
2867
2929
 
2868
2930
  `get-note-drawings` needs Apple's PencilKit framework and `transcribe-note-audio` needs the Speech framework; neither has an AppleScript or command-line interface. For them, the server uses a small Swift helper that links public Apple frameworks only (AppKit, PencilKit, AVFoundation, and Speech). No prebuilt binary ships with the package. Build it once on your Mac:
@@ -2967,6 +3029,7 @@ In a JSON string literal the two characters `\\` denote **one** literal backslas
2967
3029
  - macOS needs automation permission
2968
3030
  - Go to System Settings > Privacy & Security > Automation
2969
3031
  - Ensure your terminal/Claude has permission to control Notes
3032
+ - `apple-notes-mcp setup --permissions --open --probe-automation` checks every grant and opens the pane of each missing one ([Permissions check](#permissions-check))
2970
3033
 
2971
3034
  ### Native writes time out or report an uncertain outcome
2972
3035
  - Symptom: `add-native-tags`, `set-note-pinned`, `append-native` or another native write fails with "Shortcuts timed out waiting for …", "Operation outcome uncertain" or "readback was not verified", while `doctor` and `get-capabilities` report the bridges installed