apple-notes-mcp 2.9.5 → 2.9.7
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 +38 -2
- package/build/index.js +709 -67
- package/native/public-helper/apple-notes-public-helper.swift +257 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1658,8 +1658,12 @@ or `mailto:`. Tables render as GitHub tables. Attachments stay in body order:
|
|
|
1658
1658
|
with `assetsDir` they link to copies of their files (images inline, drawings
|
|
1659
1659
|
through Notes' fallback image, scans as their PDF), and without it they render
|
|
1660
1660
|
as labeled placeholders such as `\[Image: name\]`. An attachment whose file
|
|
1661
|
-
cannot be found renders as `\[Image unavailable: name\]`.
|
|
1662
|
-
|
|
1661
|
+
cannot be found renders as `\[Image unavailable: name\]`. Body text that
|
|
1662
|
+
Markdown would read as block syntax (a leading `#` to `######`, `>`, `-`, `+`,
|
|
1663
|
+
`*`, `1.` or `1)`, a `---` line, a code fence or a table row) is
|
|
1664
|
+
backslash-escaped, so a plain paragraph such as `## Notes` stays a paragraph,
|
|
1665
|
+
and `wrap` never starts a continuation line with such a marker. This tool
|
|
1666
|
+
leaves `get-note-markdown` unchanged.
|
|
1663
1667
|
|
|
1664
1668
|
A folder export is one presentation document with notes separated by `---`.
|
|
1665
1669
|
It is not a backup or restore format; use `export-notes-json` for that.
|
|
@@ -1834,6 +1838,22 @@ A recording extended with more takes has several fragments. Their transcripts ar
|
|
|
1834
1838
|
|
|
1835
1839
|
---
|
|
1836
1840
|
|
|
1841
|
+
#### `get-note-drawings`
|
|
1842
|
+
|
|
1843
|
+
Decodes a note's classic PencilKit drawings (`com.apple.drawing.2` and the older `com.apple.drawing` attachments) into strokes and SVG. The PencilKit bytes are read read-only from the NoteStore database and decoded by Apple's public `PKDrawing(data:)` in the [public native helper](#public-native-helper). Modern Paper sketches (`com.apple.paper`) are a different format and are not decoded here.
|
|
1844
|
+
|
|
1845
|
+
**Requires:** Full Disk Access for the MCP host process, and the public native helper built once with `apple-notes-mcp setup --public-helper`.
|
|
1846
|
+
|
|
1847
|
+
| Parameter | Type | Required | Description |
|
|
1848
|
+
|-----------|------|----------|-------------|
|
|
1849
|
+
| `id` | string | Yes | Note ID (use `search-notes` to find it first) |
|
|
1850
|
+
| `format` | string | No | `"json"` (default) returns strokes, `"svg"` returns a standalone SVG document per drawing, `"both"` returns both |
|
|
1851
|
+
| `includePoints` | boolean | No | Include per-point `x`, `y`, `width`, `opacity`, and `force` in JSON strokes (default `true`) |
|
|
1852
|
+
|
|
1853
|
+
**Returns:** `status` (`ok`, `partial`, `error`, or `none` when the note has no classic drawing), `drawingCount`, and one entry per drawing with `attachmentId`, `identifier`, `typeUti`, `status` (`ok`, or `error` with a `code` such as `no_data`, `undecodable`, or `timeout`), `strokeCount`, `bounds`, `truncated`, `strokes` (each with `inkType`, sRGB `color` with alpha, mean `width`, `pointCount`, `bounds`, and `points`), and `svg`. Points are already in drawing coordinates. When a response would exceed `APPLE_NOTES_MCP_EXPORT_MAX_BYTES`, points are dropped and `pointsOmitted` is set. The SVG draws one path per stroke; it is a faithful outline, not a pixel-exact copy of PencilKit's ink textures.
|
|
1854
|
+
|
|
1855
|
+
---
|
|
1856
|
+
|
|
1837
1857
|
#### `add-attachment`
|
|
1838
1858
|
|
|
1839
1859
|
Adds one nonempty local file of at most 64 MiB to an exact note using `id`, the
|
|
@@ -2436,6 +2456,22 @@ Every tool that does not read the Notes database works normally without Full Dis
|
|
|
2436
2456
|
- `get-note-link` returns an error on macOS 26+; on macOS 12–15 it still works via the AppleScript `note link` fallback
|
|
2437
2457
|
- `get-note-markdown` returns plain list items without `[x]`/`[ ]` annotations (graceful fallback)
|
|
2438
2458
|
- `get-sync-status` still answers, but reports no pending uploads and no active sync — treat that as "unknown", not "idle"
|
|
2459
|
+
- `get-note-drawings` returns the same Full Disk Access error
|
|
2460
|
+
|
|
2461
|
+
---
|
|
2462
|
+
|
|
2463
|
+
## Public native helper
|
|
2464
|
+
|
|
2465
|
+
`get-note-drawings` needs Apple's PencilKit framework, which has no AppleScript or command-line interface. For it, the server uses a small Swift helper that links public Apple frameworks only (AppKit and PencilKit). No prebuilt binary ships with the package. Build it once on your Mac:
|
|
2466
|
+
|
|
2467
|
+
```bash
|
|
2468
|
+
apple-notes-mcp setup --public-helper # compile, sign, verify, install
|
|
2469
|
+
apple-notes-mcp setup --public-helper --check # report the installed state only
|
|
2470
|
+
```
|
|
2471
|
+
|
|
2472
|
+
Setup compiles `native/public-helper/apple-notes-public-helper.swift` with `xcrun swiftc` (install the Command Line Tools with `xcode-select --install` if it is missing), signs it ad hoc, runs its `hello` handshake, and installs it in `~/Library/Application Support/apple-notes-mcp/public-helper/` next to a manifest recording the SHA-256 of the source and the binary. Before every use the server re-checks both digests: after an upgrade that changes the helper source, or if the binary is replaced, the helper is refused until you run setup again. `APPLE_NOTES_MCP_PUBLIC_HELPER_DIR` overrides the install folder and `APPLE_NOTES_MCP_PUBLIC_HELPER_TIMEOUT_MS` the per-call timeout.
|
|
2473
|
+
|
|
2474
|
+
The helper never opens the Notes database and never writes under the Notes group container. The server reads the bytes it needs (read-only) and passes them to the helper on stdin; the helper answers with one JSON object on stdout.
|
|
2439
2475
|
|
|
2440
2476
|
---
|
|
2441
2477
|
|