apple-notes-mcp 2.8.34 → 2.8.36

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.
Files changed (3) hide show
  1. package/README.md +73 -7
  2. package/build/index.js +1261 -325
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -56,7 +56,7 @@ Install as a Claude Code plugin for automatic configuration and enhanced AI beha
56
56
 
57
57
  This method also installs a **skill** that teaches Claude when and how to use Apple Notes effectively.
58
58
 
59
- On the first tool call, macOS shows an Automation permission prompt ("Claude" wants access to control "Notes") — click **OK**. Optionally, grant **Full Disk Access** to the app that launches the server to enable the database-backed tools (`get-checklist-state`, `get-note-metadata`, `get-audio-transcripts`, `get-note-link`, checklist annotations in `get-note-markdown`, and full `get-sync-status` detail); see the [Full Disk Access Setup Guide](https://github.com/sweetrb/apple-notes-mcp/blob/main/docs/FULL-DISK-ACCESS.md). The rest of the server is pure AppleScript and works without it.
59
+ On the first tool call, macOS shows an Automation permission prompt ("Claude" wants access to control "Notes") — click **OK**. Optionally, grant **Full Disk Access** to the app that launches the server to enable the database-backed tools (`get-checklist-state`, `get-note-metadata`, `get-audio-transcripts`, `list-special-notes`, `list-native-tags`, `get-note-link`, checklist annotations in `get-note-markdown`, and full `get-sync-status` detail); see the [Full Disk Access Setup Guide](https://github.com/sweetrb/apple-notes-mcp/blob/main/docs/FULL-DISK-ACCESS.md). The rest of the server is pure AppleScript and works without it.
60
60
 
61
61
  Native tag, checklist, table, pin, and rich append operations use two packaged
62
62
  Apple Shortcuts. A third, `Apple Notes MCP - Create Markdown Note`, is optional:
@@ -631,11 +631,25 @@ stable code in brackets, such as `[encrypted]` or `[no-full-disk-access]`.
631
631
 
632
632
  #### `list-native-tags`
633
633
 
634
- Lists actual native Notes tags used within one explicit `account` and `folder`,
635
- mapping each tag to its matching note IDs. This differs from textual hashtag
636
- search. The response reports `complete: false` and per-note errors when some
637
- native metadata is unavailable. This tool is read-only and requires Full Disk
638
- Access.
634
+ Lists actual native Notes tags. This differs from textual hashtag search. It is
635
+ read-only and requires Full Disk Access.
636
+
637
+ - **Folder mode** (pass `folder`, optionally `account`): maps each tag used in that
638
+ folder to its matching note IDs. The response reports `complete: false` and per-note
639
+ errors when some native metadata is unavailable.
640
+ - **Inventory mode** (omit `folder`): an account-wide inventory with counts, read-only from the
641
+ database. `account` narrows it to one account; omit it to count every
642
+ account. Each `inventory` entry has `tag`, `noteCount` (distinct notes, Recently
643
+ Deleted excluded), per-account counts in `accounts`, and any other `spellings` Notes
644
+ treats as the same tag. Tags with no remaining notes are listed with `noteCount: 0`.
645
+ A tag counts for a note only while the note body still references it. Locked or
646
+ unreadable bodies are counted from the tag objects alone and reported through
647
+ `unverifiedNotes` and `complete: false`.
648
+
649
+ | Parameter | Type | Required | Description |
650
+ |-----------|------|----------|-------------|
651
+ | `folder` | string | No | Folder to list (nested paths supported). Omit for the inventory |
652
+ | `account` | string | No | Account name, exact or unique prefix |
639
653
 
640
654
  ---
641
655
 
@@ -1341,6 +1355,27 @@ Reads note metadata that AppleScript cannot expose, by querying the NoteStore SQ
1341
1355
 
1342
1356
  ---
1343
1357
 
1358
+ #### `list-special-notes`
1359
+
1360
+ Lists a set of notes that AppleScript cannot enumerate: pinned notes, Quick Notes, notes in Recently Deleted, or password-protected notes. It reads the NoteStore database read-only and returns metadata only, never body text.
1361
+
1362
+ **Requires:** Full Disk Access for the MCP host process (see [Full Disk Access Setup](#full-disk-access)).
1363
+
1364
+ | Parameter | Type | Required | Description |
1365
+ |-----------|------|----------|-------------|
1366
+ | `kind` | string | Yes | `pinned`, `quick-notes`, `recently-deleted`, or `locked` |
1367
+ | `account` | string | No | Only this account (exact or unique-prefix name). Omit for every account |
1368
+ | `limit` | number | No | Maximum rows, 1–1000 (default 100) |
1369
+
1370
+ **Returns:** `notes`, newest first, each with `id`, `identifier` (Notes UUID), `title`, `folder` (path in `list-folders` syntax, or `null`), `account`, `created`, `modified`, and the flags `pinned`, `locked`, `quickNote`, `inRecentlyDeleted`, and `markedForDeletion`. Unlocked rows add the stored `snippet`. The `locked` listing adds `passwordHint` when one is set. Also returns `count`, `total` (matches before `limit`), `limit`, and `supported`.
1371
+
1372
+ - `pinned` and `quick-notes` cover notes in folders outside Recently Deleted. Folderless Quick Note drafts, which Notes.app never shows, are left out.
1373
+ - `recently-deleted` lists notes in each account's Recently Deleted folder and skips tombstones already waiting to sync away.
1374
+ - `locked` lists every password-protected note, including trashed and folderless ones, so a misplaced locked note can still be found. Their flags and `folder` say where each one is.
1375
+ - `supported: false` means this macOS version's database has no column for that kind (for example, Quick Notes before macOS 12).
1376
+
1377
+ ---
1378
+
1344
1379
  #### `get-audio-transcripts`
1345
1380
 
1346
1381
  Reads the transcript, and the summary when one exists, that Notes already computed for the audio recordings in a note. It does not transcribe anything itself. Notes keeps each recording's transcript as word-level mergeable data on the audio attachment's database row, and this tool decodes it read-only.
@@ -1468,6 +1503,36 @@ Saves a note attachment to disk.
1468
1503
 
1469
1504
  ---
1470
1505
 
1506
+ #### `list-paper-attachments`
1507
+
1508
+ Lists the Paper drawings (`com.apple.paper`) and classic drawings (`com.apple.drawing`, `com.apple.drawing.2`) in one note, and whether Notes has a rendered image of each. Read-only; needs Full Disk Access and does not open Notes.app.
1509
+
1510
+ | Parameter | Type | Required | Description |
1511
+ |-----------|------|----------|-------------|
1512
+ | `id` | string | Yes | Exact CoreData note ID |
1513
+
1514
+ **Returns:** Per drawing: `attachmentId`, `identifier`, `uti`, `kind` (`paper` or `drawing`), `handwritingSummary` (the handwriting text Notes recognized, or `null` when it stored none), `bundlePresent` (the Paper data bundle is on disk), `fallbackImagePath` (Notes' full rendering), `previewPath` (its largest thumbnail), and `raster` `{source, format, width, height}`: the validated image `export-paper-image` would copy, or `null`.
1515
+
1516
+ Strokes are not decoded. Notes' Paper bundle has no public reader, so the image is Notes' own rendering.
1517
+
1518
+ ---
1519
+
1520
+ #### `export-paper-image`
1521
+
1522
+ Saves Notes' rendered image of one Paper drawing or classic drawing to a new file.
1523
+
1524
+ | Parameter | Type | Required | Description |
1525
+ |-----------|------|----------|-------------|
1526
+ | `noteId` | string | Yes | Exact CoreData note ID |
1527
+ | `savePath` | string | Yes | Absolute path for the new file. It must end in the image's extension (`.png`, or `.jpg`/`.jpeg` for a JPEG rendering) |
1528
+ | `attachmentId` | string | No | The drawing to export (`attachmentId` or `identifier` from `list-paper-attachments`). Required when the note has more than one |
1529
+
1530
+ **Returns:** `savedPath`, `format`, `width`, `height`, `bytes`, `source` (`fallback` for Notes' full rendering, `preview` for its largest thumbnail when no full rendering exists), and the drawing's `attachmentId`, `identifier`, `kind`, and `handwritingSummary`.
1531
+
1532
+ **⚠️ Safety:** Writes one new file, readable only by you (mode 0600). `savePath` follows the `save-attachment` allowlist (home, temp, or `/Volumes`), may not be inside the Notes data folder, and must not exist yet. The image header (PNG signature and IHDR, or JPEG frame) is checked before copying and the written file is checked again; a file that fails is removed.
1533
+
1534
+ ---
1535
+
1471
1536
  #### `export-attachments`
1472
1537
 
1473
1538
  Copies a note's attachment files into a directory without opening Notes.app.
@@ -1864,7 +1929,7 @@ MCP stores no secrets, but as a general rule keep only non-secret config here.
1864
1929
 
1865
1930
  ## Full Disk Access
1866
1931
 
1867
- Several tools read directly from the Apple Notes SQLite database, which lives in a macOS-protected directory. Those tools require **Full Disk Access** for the process running the MCP server: `get-checklist-state`, `get-note-metadata`, `get-note-blocks`, `get-audio-transcripts`, `get-note-link`, the checklist annotations in `get-note-markdown`, `list-attachments` with `includePaths` or `firstImage`, `export-attachments`, and the database half of `get-sync-status`.
1932
+ Several tools read directly from the Apple Notes SQLite database, which lives in a macOS-protected directory. Those tools require **Full Disk Access** for the process running the MCP server: `get-checklist-state`, `get-note-metadata`, `get-note-blocks`, `get-audio-transcripts`, `list-special-notes`, `list-native-tags`, `get-note-link`, the checklist annotations in `get-note-markdown`, `list-attachments` with `includePaths` or `firstImage`, `export-attachments`, `list-paper-attachments`, `export-paper-image`, and the database half of `get-sync-status`.
1868
1933
 
1869
1934
  > 📘 **For the full why-and-how walkthrough (which app to grant, verifying with `doctor`, graceful degradation), see the [Full Disk Access Setup Guide](https://github.com/sweetrb/apple-notes-mcp/blob/main/docs/FULL-DISK-ACCESS.md).** The summary below is the quick version.
1870
1935
 
@@ -1885,6 +1950,7 @@ Several tools read directly from the Apple Notes SQLite database, which lives in
1885
1950
  Every tool that does not read the Notes database works normally without Full Disk Access — that is the whole AppleScript surface (create, read, search, update, move, delete, folders, accounts, attachments, stats, export). The database-backed tools degrade like this:
1886
1951
  - `get-checklist-state` returns an error explaining that database access is needed
1887
1952
  - `get-note-metadata` returns the same kind of error — it has no non-database path
1953
+ - `list-special-notes` and the `list-native-tags` inventory return the same kind of error
1888
1954
  - `get-note-link` returns an error on macOS 26+; on macOS 12–15 it still works via the AppleScript `note link` fallback
1889
1955
  - `get-note-markdown` returns plain list items without `[x]`/`[ ]` annotations (graceful fallback)
1890
1956
  - `get-sync-status` still answers, but reports no pending uploads and no active sync — treat that as "unknown", not "idle"