apple-notes-mcp 2.8.33 → 2.8.34
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 +31 -3
- package/build/index.js +873 -144
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -171,7 +171,7 @@ On first use, macOS will ask for permission to automate Notes.app. Click "OK" to
|
|
|
171
171
|
| **Checklist State** | Read checklist done/undone state directly from the Notes database (requires Full Disk Access) |
|
|
172
172
|
| **Audio Transcripts** | Read the transcripts and summaries Notes stored for audio recordings (requires Full Disk Access) |
|
|
173
173
|
| **Export** | Export all notes as JSON or get individual notes as Markdown |
|
|
174
|
-
| **Attachments** | List attachments, save them to disk, or fetch their bytes as base64 |
|
|
174
|
+
| **Attachments** | List attachments with their on-disk asset and preview paths, find a note's lead image, save or batch-export them to disk, or fetch their bytes as base64 |
|
|
175
175
|
| **Notes.app UI State** | Reveal a note in Notes.app or read the current Notes.app selection |
|
|
176
176
|
| **Sync Awareness** | Detect iCloud sync in progress, warn about incomplete results |
|
|
177
177
|
| **Collaboration** | Detect shared notes, warn before modifying |
|
|
@@ -1435,10 +1435,22 @@ Lists attachments in a note.
|
|
|
1435
1435
|
| `id` | string | No | Note ID (preferred) |
|
|
1436
1436
|
| `title` | string | No | Note title |
|
|
1437
1437
|
| `account` | string | No | Account containing the note |
|
|
1438
|
+
| `includePaths` | boolean | No | Also report where each attachment's files are on disk (needs `id` and Full Disk Access) |
|
|
1439
|
+
| `firstImage` | boolean | No | Return only the note's lead visual instead of the list (needs `id` and Full Disk Access) |
|
|
1438
1440
|
|
|
1439
1441
|
**Returns:** List of attachments with IDs, names, content identifiers, URLs when available, created/modified dates, and shared state.
|
|
1440
1442
|
|
|
1441
|
-
|
|
1443
|
+
With `includePaths`, each attachment also carries `identifier`, `uti`, `kind` (`image`, `scan`, `drawing`, `pdf`, `audio`, `video`, `url`, `table`, `other`), `bodyIndex`, and three path fields read from NoteStore and the Notes data folder (read-only):
|
|
1444
|
+
|
|
1445
|
+
- `assetPaths`: the attachment's own files, best first (the media file, or Notes' fallback image or PDF rendering).
|
|
1446
|
+
- `previewPath`: Notes' largest rendered thumbnail, chosen by pixel area from the `Previews` entries named `<identifier>-<scale>-<W>x<H>-<appearance>`. It is always the image file, including when the entry is a directory holding `<n>_<uuid>/Preview.png`. `null` when there is none.
|
|
1447
|
+
- `paths`: `assetPaths` followed by `previewPath`.
|
|
1448
|
+
|
|
1449
|
+
Container attachments (a scan gallery) list their child rows under `children`. If the database cannot be read, the list is still returned with a `pathsError`.
|
|
1450
|
+
|
|
1451
|
+
With `firstImage`, the result is `{firstImage, orderSource}`. `firstImage` is the first image in the note's body order, even when its asset has not downloaded (`path: null`, possibly with a `previewPath`). A scan or drawing stands in only when the note has no image, and a gallery's pages are considered at the gallery's position (`parentIdentifier`, `galleryIndex`). `orderSource` is `body`, or `creation` when the body did not record attachment order. `firstImage` is `null` when the note has no visual.
|
|
1452
|
+
|
|
1453
|
+
**⚠️ Safety:** A lookup failure is reported as an error, never as an empty list — so an empty result reliably means the note has no attachments and is safe to replace wholesale. Treat an error as "unknown", not "none". Treat returned paths as local data: copy files out with [`export-attachments`](#export-attachments) instead of passing raw paths on.
|
|
1442
1454
|
|
|
1443
1455
|
---
|
|
1444
1456
|
|
|
@@ -1456,6 +1468,22 @@ Saves a note attachment to disk.
|
|
|
1456
1468
|
|
|
1457
1469
|
---
|
|
1458
1470
|
|
|
1471
|
+
#### `export-attachments`
|
|
1472
|
+
|
|
1473
|
+
Copies a note's attachment files into a directory without opening Notes.app.
|
|
1474
|
+
|
|
1475
|
+
| Parameter | Type | Required | Description |
|
|
1476
|
+
|-----------|------|----------|-------------|
|
|
1477
|
+
| `noteId` | string | Yes | Exact CoreData note ID |
|
|
1478
|
+
| `exportDir` | string | Yes | Absolute destination directory, created if missing. Same allowlist as `save-attachment` (home, temp, or `/Volumes`), and never inside the Notes data folder |
|
|
1479
|
+
| `firstImageOnly` | boolean | No | Export only the lead visual that `list-attachments` `firstImage` reports |
|
|
1480
|
+
|
|
1481
|
+
**Returns:** `exportDir`, counts (`exported`, `previews`, `skipped`, `failed`), and per attachment its `attachmentId`, `identifier`, `kind`, `exportedTo`, and `exportedKind`: `"asset"` for the real file, `"preview"` when the asset never downloaded and only Notes' thumbnail was on disk, or `null` when nothing was on disk. A preview is never chosen over an available asset, and it is named `<name>-preview.<ext>` so it is not mistaken for the original. A scan gallery with no file of its own exports its pages.
|
|
1482
|
+
|
|
1483
|
+
**⚠️ Safety:** Existing files are never replaced. A name that is taken gets `-2`, `-3`, and so on. Reads NoteStore and the Notes data folder read-only and needs Full Disk Access.
|
|
1484
|
+
|
|
1485
|
+
---
|
|
1486
|
+
|
|
1459
1487
|
#### `fetch-attachment`
|
|
1460
1488
|
|
|
1461
1489
|
Returns a note attachment's bytes as base64, without writing to disk (the read counterpart to `save-attachment`).
|
|
@@ -1836,7 +1864,7 @@ MCP stores no secrets, but as a general rule keep only non-secret config here.
|
|
|
1836
1864
|
|
|
1837
1865
|
## Full Disk Access
|
|
1838
1866
|
|
|
1839
|
-
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`, and the database half of `get-sync-status`.
|
|
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`.
|
|
1840
1868
|
|
|
1841
1869
|
> 📘 **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.
|
|
1842
1870
|
|