apple-notes-mcp 2.8.36 → 2.8.38
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 +95 -2
- package/build/index.js +1773 -240
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1311,6 +1311,99 @@ Gets a note's content as Markdown instead of HTML. If the note contains checklis
|
|
|
1311
1311
|
|
|
1312
1312
|
---
|
|
1313
1313
|
|
|
1314
|
+
#### `export-notes-markdown`
|
|
1315
|
+
|
|
1316
|
+
Exports one note, or the notes of one folder, as a single Markdown document
|
|
1317
|
+
rendered from the decoded note body (the same block model as
|
|
1318
|
+
[`get-note-blocks`](#get-note-blocks)). Titles render as `#`, headings as `##`,
|
|
1319
|
+
subheadings as `###`. Bulleted, dashed and numbered lists keep their indent
|
|
1320
|
+
(four spaces per level), checklists render as `- [x]`/`- [ ]`, block quotes as
|
|
1321
|
+
`>`, and monospaced paragraphs as fenced code. Inline runs keep bold, italic,
|
|
1322
|
+
strikethrough, underline (`<u>`), highlight (`==`), superscript and subscript
|
|
1323
|
+
(`<sup>`/`<sub>`), and links whose scheme is http(s), `notes:`, `applenotes:`
|
|
1324
|
+
or `mailto:`. Tables render as GitHub tables. Attachments stay in body order:
|
|
1325
|
+
with `assetsDir` they link to copies of their files (images inline, drawings
|
|
1326
|
+
through Notes' fallback image, scans as their PDF), and without it they render
|
|
1327
|
+
as labeled placeholders such as `\[Image: name\]`. An attachment whose file
|
|
1328
|
+
cannot be found renders as `\[Image unavailable: name\]`. This tool leaves
|
|
1329
|
+
`get-note-markdown` unchanged.
|
|
1330
|
+
|
|
1331
|
+
A folder export is one presentation document with notes separated by `---`.
|
|
1332
|
+
It is not a backup or restore format; use `export-notes-json` for that.
|
|
1333
|
+
|
|
1334
|
+
**Requires:** Full Disk Access. Password-protected notes are skipped in a
|
|
1335
|
+
folder export (listed in `skipped` with code `encrypted`) and refused for a
|
|
1336
|
+
single note.
|
|
1337
|
+
|
|
1338
|
+
| Parameter | Type | Required | Description |
|
|
1339
|
+
|-----------|------|----------|-------------|
|
|
1340
|
+
| `id` | string | One of `id`/`folder` | Exact note ID |
|
|
1341
|
+
| `folder` | string | One of `id`/`folder` | Folder path, as for `list-notes` |
|
|
1342
|
+
| `account` | string | No | Account holding `folder` |
|
|
1343
|
+
| `limit` | number | No | Maximum notes read from the folder (default 100, max 1000) |
|
|
1344
|
+
| `outputPath` | string | No | Absolute file to create. Create-only: an existing file (or symlink) is refused with `[output_exists]` |
|
|
1345
|
+
| `assetsDir` | string | No | Absolute directory for attachment copies. Existing files are never replaced; a taken name gets `-2`, `-3`, ... |
|
|
1346
|
+
| `wrap` | number | No | Hard-wrap prose at this many columns. Code, tables and headings are never wrapped |
|
|
1347
|
+
|
|
1348
|
+
Both paths follow the `save-attachment` rules (absolute, under the home
|
|
1349
|
+
directory, a temp directory, or `/Volumes`, no symlink escapes) and may not
|
|
1350
|
+
point inside the Notes library container. With `outputPath`, asset links are
|
|
1351
|
+
relative to the document's directory; without it they are absolute paths.
|
|
1352
|
+
|
|
1353
|
+
**Returns:** without `outputPath`, the Markdown itself (refused with
|
|
1354
|
+
`[too-large]` above half of `APPLE_NOTES_MCP_EXPORT_MAX_BYTES`, because the
|
|
1355
|
+
document travels in both the text and structured result). With `outputPath`, a
|
|
1356
|
+
receipt: `format`, `count`, `bytes`, `output`, and `assets` (`dir`, `files`).
|
|
1357
|
+
Both carry `stats` (attachments, placed, placeholders, unavailable, tables,
|
|
1358
|
+
unreadableTables, unreferenced) and `skipped`. Nothing already written is
|
|
1359
|
+
deleted if a later step fails.
|
|
1360
|
+
|
|
1361
|
+
---
|
|
1362
|
+
|
|
1363
|
+
#### `export-notes-html`
|
|
1364
|
+
|
|
1365
|
+
Exports one note, or the notes of one folder, as one standalone HTML file
|
|
1366
|
+
rendered from the decoded note body. It uses the same block model and
|
|
1367
|
+
attachment handling as [`export-notes-markdown`](#export-notes-markdown).
|
|
1368
|
+
Headings become `h1`-`h3`, lists nest by indent as `ul`/`ol`, checklists show
|
|
1369
|
+
disabled checkboxes, block quotes and monospaced paragraphs become
|
|
1370
|
+
`blockquote` and `pre`, and inline runs keep bold, italic, underline,
|
|
1371
|
+
strikethrough, highlight, superscript, subscript, text color and safe links.
|
|
1372
|
+
Tables are semantic `<table>` elements with a header row. Images, drawings
|
|
1373
|
+
(Notes' fallback image, or its preview), scans (PDF with preview), audio,
|
|
1374
|
+
video, files and link cards (title, domain and preview thumbnail) appear in
|
|
1375
|
+
body order. Attachments with no body marker are appended in creation order.
|
|
1376
|
+
An attachment with no usable source renders a visible
|
|
1377
|
+
`[Image unavailable: name]` marker. The document contains no script, no
|
|
1378
|
+
`file:` URL and no Notes library path.
|
|
1379
|
+
|
|
1380
|
+
A folder export is one presentation document with notes separated by
|
|
1381
|
+
`<hr class="note-separator">`. It is not a backup or restore format.
|
|
1382
|
+
|
|
1383
|
+
**Requires:** Full Disk Access. Password-protected notes are skipped in a
|
|
1384
|
+
folder export and refused for a single note.
|
|
1385
|
+
|
|
1386
|
+
| Parameter | Type | Required | Description |
|
|
1387
|
+
|-----------|------|----------|-------------|
|
|
1388
|
+
| `id` | string | One of `id`/`folder` | Exact note ID |
|
|
1389
|
+
| `folder` | string | One of `id`/`folder` | Folder path, as for `list-notes` |
|
|
1390
|
+
| `account` | string | No | Account holding `folder` |
|
|
1391
|
+
| `limit` | number | No | Maximum notes read from the folder (default 100, max 1000) |
|
|
1392
|
+
| `outputPath` | string | Yes | Absolute HTML file to create. Create-only: an existing file is refused with `[output_exists]` |
|
|
1393
|
+
| `embedAssets` | boolean | No | Embed assets as data URLs (default `true`). Each asset is capped at 10 MiB and a document at 256 MiB of embedded assets; a larger one renders as unavailable with a hint to use `embedAssets: false` |
|
|
1394
|
+
| `assetsDir` | string | No | With `embedAssets: false`, the sidecar directory (default `<output stem>.assets` beside the file). Existing files are never replaced; a taken name gets `-2`, `-3`, ... |
|
|
1395
|
+
|
|
1396
|
+
The HTML is always written to a file, because an embedded document is too
|
|
1397
|
+
large for an MCP message. Paths follow the `save-attachment` rules and may not
|
|
1398
|
+
point inside the Notes library container. Sidecar URLs are relative to the
|
|
1399
|
+
HTML file, so the file and its `.assets` directory can be moved together.
|
|
1400
|
+
|
|
1401
|
+
**Returns:** `format`, `count`, `bytes`, `output`, either `embedded` (assets
|
|
1402
|
+
embedded) or `assets` (`dir`, `files`), `stats`, and `skipped`. Nothing
|
|
1403
|
+
already written is deleted if a later step fails.
|
|
1404
|
+
|
|
1405
|
+
---
|
|
1406
|
+
|
|
1314
1407
|
#### `get-checklist-state`
|
|
1315
1408
|
|
|
1316
1409
|
Reads checklist done/undone state for a note. This bypasses the AppleScript limitation where `body of note` strips checklist state, by reading directly from the NoteStore SQLite database.
|
|
@@ -1899,7 +1992,7 @@ All configuration is optional — the server works out of the box. Override beha
|
|
|
1899
1992
|
| `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. |
|
|
1900
1993
|
| `APPLE_NOTES_MCP_CONFIG_FILE` | `~/Library/Application Support/apple-notes-mcp/config.json` | Path to the JSON config file (see below). |
|
|
1901
1994
|
| `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, and a write tool's `timeoutSeconds` argument overrides it for that call. |
|
|
1902
|
-
| `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. |
|
|
1995
|
+
| `APPLE_NOTES_MCP_EXPORT_MAX_BYTES` | `8388608` (8 MB) | Largest response `export-notes-json` sends; a page closes early to stay under it. `export-notes-markdown` returns inline Markdown up to half of 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. |
|
|
1903
1996
|
| `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`. |
|
|
1904
1997
|
| `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. |
|
|
1905
1998
|
| `APPLE_NOTES_MCP_RETRY_DELAY_MS` | `1000` (1 s) | Base delay before the first retry; subsequent retries back off exponentially (1s, 2s, 4s, ...). |
|
|
@@ -1929,7 +2022,7 @@ MCP stores no secrets, but as a general rule keep only non-secret config here.
|
|
|
1929
2022
|
|
|
1930
2023
|
## Full Disk Access
|
|
1931
2024
|
|
|
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`.
|
|
2025
|
+
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`.
|
|
1933
2026
|
|
|
1934
2027
|
> 📘 **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.
|
|
1935
2028
|
|