apple-notes-mcp 2.9.1 → 2.9.2
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 +58 -2
- package/build/index.js +3213 -2836
- 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** (under Claude Desktop, to the Node binary that runs the server; from a terminal, to the terminal app) 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.
|
|
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** (under Claude Desktop, to the Node binary that runs the server; from a terminal, to the terminal app) to enable the database-backed tools (`get-checklist-state`, `get-note-metadata`, `get-audio-transcripts`, `list-special-notes`, `list-native-tags`, `list-recent-notes`, `list-folder-tree`, `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:
|
|
@@ -1096,6 +1096,46 @@ Use the returned `id` for any follow-up read/update/move/delete rather than re-r
|
|
|
1096
1096
|
|
|
1097
1097
|
> **Changed in 2.7.0:** `notes` was previously `string[]` (titles only). Callers that treated the array as strings must now read `.title`.
|
|
1098
1098
|
|
|
1099
|
+
For date order, incremental sync cursors, Recently Deleted, or word counts, use [`list-recent-notes`](#list-recent-notes).
|
|
1100
|
+
|
|
1101
|
+
---
|
|
1102
|
+
|
|
1103
|
+
#### `list-recent-notes`
|
|
1104
|
+
|
|
1105
|
+
Lists notes from the NoteStore database (read-only) by stored modification time, with an exact cursor for incremental sync. With `since`, it pages through changes oldest first; without it, it shows the newest notes first. Unlike `list-notes`, it can include Recently Deleted and can count words.
|
|
1106
|
+
|
|
1107
|
+
**Requires:** Full Disk Access for the MCP host process (see [Full Disk Access Setup](#full-disk-access)).
|
|
1108
|
+
|
|
1109
|
+
| Parameter | Type | Required | Description |
|
|
1110
|
+
|-----------|------|----------|-------------|
|
|
1111
|
+
| `account` | string | No | Only this account (exact or unique-prefix name). Omit for every account |
|
|
1112
|
+
| `folder` | string | No | Only notes directly in this folder: a full path in `list-folders` syntax, or a unique folder name |
|
|
1113
|
+
| `since` | string | No | Return notes after this point, **oldest first**. A `modifiedCheckpoint` cursor (from a row or `nextSince`), or an ISO 8601 date (local midnight) or date-time (local time unless it carries `Z` or an offset), meaning modified strictly after it |
|
|
1114
|
+
| `limit` | number | No | Maximum rows, 1–1000 (default 50) |
|
|
1115
|
+
| `includeDeleted` | boolean | No | Also return notes in Recently Deleted, notes awaiting deletion, and folderless notes (default `false`) |
|
|
1116
|
+
| `wordCounts` | boolean | No | Decode each body and add `wordCount` and `charCount` (default `false`) |
|
|
1117
|
+
| `bodyPreview` | boolean | No | Add `bodyPreview` (up to 180 characters) and `textDecoded` (default `false`) |
|
|
1118
|
+
|
|
1119
|
+
**Returns:** `notes`, each with `id`, `identifier`, `title`, `folder`, `account`, `created`, `modified`, `modifiedCheckpoint`, `pinned`, `locked`, `inRecentlyDeleted`, and `markedForDeletion`. Also `count`, `limit`, `order` (`oldest-first` or `newest-first`), `saturated`, and `nextSince`.
|
|
1120
|
+
|
|
1121
|
+
- **Cursors.** `modifiedCheckpoint` is an opaque token (`cdts1:`, 16 hex digits, `:`, the note's database key). It carries the exact stored timestamp bits, so it never loses precision the way an ISO string can, and the key orders notes that share one timestamp. Pass it back as `since`.
|
|
1122
|
+
- **Syncing.** Call with `since`, store `nextSince`, and pass it as the next `since`. `nextSince` is the last returned row's cursor, or the incoming boundary when nothing matched, so every call advances. `saturated` is `true` when `count` equals `limit`: more changes may follow, so call again right away. When it is `false`, you are caught up. Notes that share a timestamp are split across pages by key, so none is skipped or repeated.
|
|
1123
|
+
- **First sync.** Start with `since: "1970-01-01"` and page the same way. A library larger than the 1000-row maximum is reached in full.
|
|
1124
|
+
- **Browsing.** Without `since`, rows come newest first. `nextSince` is then the newest row's cursor, set only when the call returned every matching note (`saturated` is `false`); otherwise it is `null`.
|
|
1125
|
+
- **Late edits.** A modification-date cursor can miss an edit that iCloud delivers later from another device with an older timestamp, for example after that device was offline. The row then sorts before the cursor. Run a full pass from the start now and then to catch these.
|
|
1126
|
+
- **Deletions.** Deleted notes are invisible unless `includeDeleted` is `true`. With it, notes in Recently Deleted and notes awaiting deletion appear, flagged, when their modification date is after the cursor. A note purged from the database leaves no row, so compare ids against a full pass to detect it.
|
|
1127
|
+
- **Word counts.** A word is a whitespace-separated token containing a letter or digit; `charCount` counts Unicode code points. Attachment markers are not counted. Both are `null` for locked notes and bodies that are not downloaded or cannot be decoded, and `0` for a body known to be empty.
|
|
1128
|
+
- **Previews.** With `wordCounts`, `bodyPreview` comes from the decoded body and `textDecoded` is `true`. Otherwise it is the stored snippet. Locked notes never get a preview.
|
|
1129
|
+
- Folderless notes (abandoned Quick Note drafts Notes.app never shows) and Recently Deleted appear only with `includeDeleted`. Notes without a stored modification date never match a `since` query.
|
|
1130
|
+
|
|
1131
|
+
**Example - incremental sync:**
|
|
1132
|
+
```json
|
|
1133
|
+
{
|
|
1134
|
+
"since": "cdts1:41c7e0ef438fcd6f:4312",
|
|
1135
|
+
"limit": 200
|
|
1136
|
+
}
|
|
1137
|
+
```
|
|
1138
|
+
|
|
1099
1139
|
---
|
|
1100
1140
|
|
|
1101
1141
|
#### `get-selected-notes`
|
|
@@ -1168,6 +1208,21 @@ carries `matchingNotesError` instead.
|
|
|
1168
1208
|
|
|
1169
1209
|
---
|
|
1170
1210
|
|
|
1211
|
+
#### `list-folder-tree`
|
|
1212
|
+
|
|
1213
|
+
Returns the folder hierarchy with note counts for each account, read from the NoteStore database in one pass.
|
|
1214
|
+
|
|
1215
|
+
**Requires:** Full Disk Access for the MCP host process (see [Full Disk Access Setup](#full-disk-access)).
|
|
1216
|
+
|
|
1217
|
+
| Parameter | Type | Required | Description |
|
|
1218
|
+
|-----------|------|----------|-------------|
|
|
1219
|
+
| `account` | string | No | Only this account (exact or unique-prefix name). Omit for every account |
|
|
1220
|
+
| `includeDeleted` | boolean | No | Include folders marked for deletion (flagged `markedForDeletion`) and folders whose account no longer exists (default `false`) |
|
|
1221
|
+
|
|
1222
|
+
**Returns:** `accounts`, each with `account`, `identifier`, `noteCount`, and `folders`. Each folder node has `id`, `identifier`, `name`, `path` (in `list-folders` syntax), `kind` (`folder`, `smart`, or `trash`), `noteCount` (notes directly inside), `totalNoteCount` (including subfolders), and `children`. Regular folders sort by name, then smart folders, then Recently Deleted. An account's `noteCount` sums its regular folders. Smart folders report 0 because their contents are a saved search. Also returns `folderCount`.
|
|
1223
|
+
|
|
1224
|
+
---
|
|
1225
|
+
|
|
1171
1226
|
#### `create-folder`
|
|
1172
1227
|
|
|
1173
1228
|
Creates a new folder, including a whole nested hierarchy in one call.
|
|
@@ -2192,7 +2247,7 @@ MCP stores no secrets, but as a general rule keep only non-secret config here.
|
|
|
2192
2247
|
|
|
2193
2248
|
## Full Disk Access
|
|
2194
2249
|
|
|
2195
|
-
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`, `export-notes-markdown`, `export-notes-html`, `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`.
|
|
2250
|
+
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`, `export-notes-markdown`, `export-notes-html`, `get-audio-transcripts`, `list-special-notes`, `list-native-tags`, `list-recent-notes`, `list-folder-tree`, `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`.
|
|
2196
2251
|
|
|
2197
2252
|
> 📘 **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.
|
|
2198
2253
|
|
|
@@ -2214,6 +2269,7 @@ Every tool that does not read the Notes database works normally without Full Dis
|
|
|
2214
2269
|
- `get-checklist-state` returns an error explaining that database access is needed
|
|
2215
2270
|
- `get-note-metadata` returns the same kind of error — it has no non-database path
|
|
2216
2271
|
- `list-special-notes` and the `list-native-tags` inventory return the same kind of error
|
|
2272
|
+
- `list-recent-notes` and `list-folder-tree` return the same kind of error
|
|
2217
2273
|
- `get-note-link` returns an error on macOS 26+; on macOS 12–15 it still works via the AppleScript `note link` fallback
|
|
2218
2274
|
- `get-note-markdown` returns plain list items without `[x]`/`[ ]` annotations (graceful fallback)
|
|
2219
2275
|
- `get-sync-status` still answers, but reports no pending uploads and no active sync — treat that as "unknown", not "idle"
|