apple-notes-mcp 2.8.26 → 2.8.28
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 +73 -1
- package/build/index.js +1184 -206
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -513,6 +513,36 @@ Disk Access.
|
|
|
513
513
|
|
|
514
514
|
---
|
|
515
515
|
|
|
516
|
+
#### `get-note-blocks`
|
|
517
|
+
|
|
518
|
+
Decodes one note's body into typed blocks, read-only, from the NoteStore
|
|
519
|
+
database. Each block is one paragraph with its `style` (`title`, `heading`,
|
|
520
|
+
`subheading`, `body`, `monospaced`, `bulleted`, `dashed`, `numbered`,
|
|
521
|
+
`checklist`, or `unknown` with the raw `styleType`), `indent`, `alignment`,
|
|
522
|
+
`blockQuote`, checklist `id`/`done`, and `paragraphUuid` when stored. Each
|
|
523
|
+
block lists its inline `runs` with `bold`, `italic`, `underline`,
|
|
524
|
+
`strikethrough`, `superscript`, `subscript`, `color`, `highlight`, `link`
|
|
525
|
+
(plus `linkSafe`), `font`, and `attachment`, and its attachment markers in body
|
|
526
|
+
order. Offsets and lengths count UTF-16 code units. `summary` counts styles and
|
|
527
|
+
inline attributes for the whole note. `undecodedFields` lists stored field
|
|
528
|
+
numbers the decoder deliberately does not interpret.
|
|
529
|
+
|
|
530
|
+
**Requires:** Full Disk Access. Password-protected notes are refused.
|
|
531
|
+
|
|
532
|
+
| Parameter | Type | Required | Description |
|
|
533
|
+
|-----------|------|----------|-------------|
|
|
534
|
+
| `id` | string | Yes | Exact note ID |
|
|
535
|
+
| `offset` | number | No | First block to return (default 0). Use `page.nextOffset` |
|
|
536
|
+
| `limit` | number | No | Maximum blocks per page (default 500, max 5000) |
|
|
537
|
+
|
|
538
|
+
A page also stops early to stay under `APPLE_NOTES_MCP_BLOCKS_MAX_BYTES`
|
|
539
|
+
(default 4 MB). `paragraphUuid` is not unique: Notes copies it when a paragraph
|
|
540
|
+
is split. Link URLs are returned as stored, and `linkSafe` is false for schemes
|
|
541
|
+
other than http(s), `notes:`, `applenotes:` and `mailto:`. Errors carry a
|
|
542
|
+
stable code in brackets, such as `[encrypted]` or `[no-full-disk-access]`.
|
|
543
|
+
|
|
544
|
+
---
|
|
545
|
+
|
|
516
546
|
#### `list-native-tags`
|
|
517
547
|
|
|
518
548
|
Lists actual native Notes tags used within one explicit `account` and `folder`,
|
|
@@ -930,6 +960,47 @@ Lists all folders in an account with full hierarchical paths.
|
|
|
930
960
|
|
|
931
961
|
---
|
|
932
962
|
|
|
963
|
+
#### `list-smart-folders`
|
|
964
|
+
|
|
965
|
+
Lists every Smart Folder with the rules that define it, read from the NoteStore
|
|
966
|
+
database. Requires Full Disk Access.
|
|
967
|
+
|
|
968
|
+
| Parameter | Type | Required | Description |
|
|
969
|
+
|-----------|------|----------|-------------|
|
|
970
|
+
| `includeMatchingNotes` | boolean | No | Also list the notes each smart folder currently shows (default `false`) |
|
|
971
|
+
| `limit` | number | No | Maximum matching notes per folder, 1–500 (default 50). `matchingNoteCount` is always the total |
|
|
972
|
+
|
|
973
|
+
**Example:**
|
|
974
|
+
```json
|
|
975
|
+
{
|
|
976
|
+
"includeMatchingNotes": true,
|
|
977
|
+
"limit": 20
|
|
978
|
+
}
|
|
979
|
+
```
|
|
980
|
+
|
|
981
|
+
**Returns:** For each smart folder: `name`, `id`, `identifier`, `account`,
|
|
982
|
+
`accountId`, `accountIdentifier`, `parent`, `parentId`, and `parentIdentifier`
|
|
983
|
+
(the parent fields are `null` at the account root). Its rules are decoded as
|
|
984
|
+
`match` (`"all"`, `"any"`, or `"none"`) and `filters`. Each filter has a `type`
|
|
985
|
+
(the stored rule key, such as `folder`, `tag`, `checklist`, or
|
|
986
|
+
`creationDateRelativeRange`), its stored `value`, `excluded` for an Exclude
|
|
987
|
+
rule, and a readable `description`. Folder filters add the folder's `name` and
|
|
988
|
+
`folderId`, and a nested rule group is a filter of type `group` with its own
|
|
989
|
+
`match` and `filters`. Notes stores each query inside an outer
|
|
990
|
+
`{"deleted": false}` wrapper that keeps Recently Deleted out. `query` is the
|
|
991
|
+
stored query with that wrapper removed, `includesRecentlyDeleted` reports the
|
|
992
|
+
wrapper's value, and `rawQuery` is the stored JSON verbatim. A rule this server
|
|
993
|
+
does not recognize is kept as a filter of type `unknown`, and `fullyDecoded` is
|
|
994
|
+
then `false`.
|
|
995
|
+
|
|
996
|
+
With `includeMatchingNotes`, each folder also carries `matchingNoteCount` and
|
|
997
|
+
`matchingNotes` (`title` and `id`). These come from Notes.app itself, which
|
|
998
|
+
evaluates the folder's rules, so they need Automation permission. The server
|
|
999
|
+
does not re-evaluate the rules on its own. A folder whose notes cannot be read
|
|
1000
|
+
carries `matchingNotesError` instead.
|
|
1001
|
+
|
|
1002
|
+
---
|
|
1003
|
+
|
|
933
1004
|
#### `create-folder`
|
|
934
1005
|
|
|
935
1006
|
Creates a new folder, including a whole nested hierarchy in one call.
|
|
@@ -1569,6 +1640,7 @@ All configuration is optional — the server works out of the box. Override beha
|
|
|
1569
1640
|
| `APPLE_NOTES_MCP_CONFIG_FILE` | `~/Library/Application Support/apple-notes-mcp/config.json` | Path to the JSON config file (see below). |
|
|
1570
1641
|
| `APPLE_NOTES_MCP_TIMEOUT_MS` | `30000` (30 s) | Total AppleScript operation timeout, including retry attempts and delays. Raise it if full-library operations (large searches, exports) time out on a big Notes library. Per-call `timeoutMs` options still win. |
|
|
1571
1642
|
| `APPLE_NOTES_MCP_EXPORT_MAX_BYTES` | `8388608` (8 MB) | Largest response `export-notes-json` sends; a page closes early to stay under it. The default sits below the 10 MB per-message limit of MCP SDK stdio clients, which drop the connection on anything larger. Raise it only if your MCP client accepts bigger messages. |
|
|
1643
|
+
| `APPLE_NOTES_MCP_BLOCKS_MAX_BYTES` | `4194304` (4 MB) | Largest block payload one [`get-note-blocks`](#get-note-blocks) page returns; the page closes early to stay under it, and a single oversized paragraph comes back with `textOmitted: true`. |
|
|
1572
1644
|
| `APPLE_NOTES_MCP_MAX_RETRIES` | `2` | Maximum attempts for a read-only AppleScript call that fails with a **transient** error (Notes.app busy / not responding / lost connection). `2` means one retry; set `1` to fail fast with no retries. Retries share the single `APPLE_NOTES_MCP_TIMEOUT_MS` budget rather than each getting a fresh one, and a retry is skipped when under a second of that budget remains — so this is a ceiling, not a guarantee. In particular a call that exhausts the budget with a **timeout** has no time left to retry by construction. Mutating operations run once because a timeout can occur after Notes.app applied the change. Non-transient errors (e.g. "note not found") never retry. |
|
|
1573
1645
|
| `APPLE_NOTES_MCP_RETRY_DELAY_MS` | `1000` (1 s) | Base delay before the first retry; subsequent retries back off exponentially (1s, 2s, 4s, ...). |
|
|
1574
1646
|
| `DEBUG` / `VERBOSE` | unset | Set either to enable verbose diagnostic logging to stderr. |
|
|
@@ -1597,7 +1669,7 @@ MCP stores no secrets, but as a general rule keep only non-secret config here.
|
|
|
1597
1669
|
|
|
1598
1670
|
## Full Disk Access
|
|
1599
1671
|
|
|
1600
|
-
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-link`, the checklist annotations in `get-note-markdown`, and the database half of `get-sync-status`.
|
|
1672
|
+
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-note-link`, the checklist annotations in `get-note-markdown`, and the database half of `get-sync-status`.
|
|
1601
1673
|
|
|
1602
1674
|
> 📘 **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.
|
|
1603
1675
|
|