apple-notes-mcp 2.8.9 → 2.8.11
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 +47 -3
- package/build/index.js +803 -567
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,6 +58,19 @@ This method also installs a **skill** that teaches Claude when and how to use Ap
|
|
|
58
58
|
|
|
59
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-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
|
+
Native tag, checklist, table, pin, and rich append operations use two packaged
|
|
62
|
+
Apple Shortcuts. Run the explicit setup once:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npx -y apple-notes-mcp setup
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The command checks existing installations and opens only missing signed
|
|
69
|
+
workflows. Confirm **Add Shortcut** in each macOS window, then verify with
|
|
70
|
+
`npx -y apple-notes-mcp setup --check` or the MCP `doctor` tool. macOS does not
|
|
71
|
+
support silent Shortcut import, so merely connecting an MCP client never opens
|
|
72
|
+
setup windows or bypasses these confirmations.
|
|
73
|
+
|
|
61
74
|
### Using the Codex Marketplace
|
|
62
75
|
|
|
63
76
|
The same plugin is available for Codex. Add the marketplace and install the plugin:
|
|
@@ -802,11 +815,41 @@ after the note's actual container folder ID matches the destination folder ID.
|
|
|
802
815
|
|
|
803
816
|
#### `export-notes-json`
|
|
804
817
|
|
|
805
|
-
Exports
|
|
818
|
+
Exports notes as JSON — metadata, HTML content, and plaintext, grouped by account and folder — one page at a time. A whole library rarely fits in one MCP message (note bodies embed images as base64), so each call returns a page and says where the next one starts.
|
|
806
819
|
|
|
807
|
-
|
|
820
|
+
| Parameter | Type | Required | Description |
|
|
821
|
+
|-----------|------|----------|-------------|
|
|
822
|
+
| `offset` | number | No | 0-based position to start from, counting notes in account → folder → note order (default `0`). Pass the previous page's `page.nextOffset` |
|
|
823
|
+
| `limit` | number | No | Maximum notes in this page (default `50`, max `500`). A page holds fewer when it reaches the response size limit |
|
|
824
|
+
| `modifiedSince` | string | No | ISO 8601 date string; export only notes modified on or after this date (e.g., `"2025-01-01"`). Keep the same value while paging |
|
|
825
|
+
|
|
826
|
+
**Example - First page:**
|
|
827
|
+
```json
|
|
828
|
+
{}
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
**Example - A later page of an incremental backup:**
|
|
832
|
+
```json
|
|
833
|
+
{
|
|
834
|
+
"offset": 50,
|
|
835
|
+
"modifiedSince": "2025-06-01"
|
|
836
|
+
}
|
|
837
|
+
```
|
|
838
|
+
|
|
839
|
+
**Returns:** `exportDate`, `version`, `accounts` (every account and folder, holding the notes that fall in this page), `summary` (`totalNotes` in this page, `totalFolders`, `totalAccounts`), and `page`:
|
|
840
|
+
|
|
841
|
+
| Field | Description |
|
|
842
|
+
|-------|-------------|
|
|
843
|
+
| `offset` / `limit` | The window that was applied |
|
|
844
|
+
| `totalAvailable` | Notes in the library, after `modifiedSince` |
|
|
845
|
+
| `returned` | Notes in this page |
|
|
846
|
+
| `nextOffset` | Where the next page starts; absent on the last page |
|
|
847
|
+
| `hasMore` | `true` until the last page — call again with `offset` set to `nextOffset` |
|
|
848
|
+
| `stoppedAtSizeLimit` | `true` when the page closed early to stay under the response size limit |
|
|
849
|
+
|
|
850
|
+
**Size limit:** each response stays under `APPLE_NOTES_MCP_EXPORT_MAX_BYTES` (default 8 MB), below the 10 MB per-message limit of MCP SDK stdio clients, which drop the connection on anything larger without passing on any error text. A note too large to fit on its own is still returned: its oversized inline images are replaced with placeholders (`strippedImages`), or failing that its HTML body, and if necessary its plaintext, is left empty with `contentOmitted: true`. Read such a note with `get-note-content`, and its files with `list-attachments` / `save-attachment`. Lower `limit` if your MCP client caps tool output below that size.
|
|
808
851
|
|
|
809
|
-
**
|
|
852
|
+
**Paging:** positions are worked out on every call, so notes created, deleted, or moved between calls can shift a page. Page through promptly, or use `modifiedSince` for incremental backups.
|
|
810
853
|
|
|
811
854
|
---
|
|
812
855
|
|
|
@@ -1176,6 +1219,7 @@ All configuration is optional — the server works out of the box. Override beha
|
|
|
1176
1219
|
| `APPLE_NOTES_MCP_MAX_INLINE_IMAGE_BYTES` | `262144` (256 KB) | Per-image cap on the base64 payload kept inline in a [`get-note-content`](#get-note-content) response. Inline images over the cap are replaced with placeholders (with a warning appended) so an image-heavy note cannot exceed the MCP client's message limit and drop the connection; export the real files with [`save-attachment`](#save-attachment) or [`fetch-attachment`](#fetch-attachment). Raise it to keep bigger images inline. |
|
|
1177
1220
|
| `APPLE_NOTES_MCP_CONFIG_FILE` | `~/Library/Application Support/apple-notes-mcp/config.json` | Path to the JSON config file (see below). |
|
|
1178
1221
|
| `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. |
|
|
1222
|
+
| `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. |
|
|
1179
1223
|
| `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. |
|
|
1180
1224
|
| `APPLE_NOTES_MCP_RETRY_DELAY_MS` | `1000` (1 s) | Base delay before the first retry; subsequent retries back off exponentially (1s, 2s, 4s, ...). |
|
|
1181
1225
|
| `DEBUG` / `VERBOSE` | unset | Set either to enable verbose diagnostic logging to stderr. |
|