apple-notes-mcp 2.8.22 → 2.8.24
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 +96 -0
- package/build/index.js +1233 -103
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -160,6 +160,7 @@ On first use, macOS will ask for permission to automate Notes.app. Click "OK" to
|
|
|
160
160
|
|---------|-------------|
|
|
161
161
|
| **Create Notes** | Create notes with titles, content, and optional folder/account targeting |
|
|
162
162
|
| **Search Notes** | Find notes by title or search within note content |
|
|
163
|
+
| **Query Language** | `query-notes` combines text, folder, account, tag, attachment, checklist, flag, word-count, and date conditions with AND/OR/NOT, read from the Notes database (requires Full Disk Access) |
|
|
163
164
|
| **Read Notes** | Retrieve note content and metadata |
|
|
164
165
|
| **Update Notes** | Modify existing notes (title and/or content) |
|
|
165
166
|
| **Delete Notes** | Remove notes (moves to Recently Deleted) |
|
|
@@ -347,6 +348,73 @@ Searches for notes by title or content.
|
|
|
347
348
|
|
|
348
349
|
---
|
|
349
350
|
|
|
351
|
+
#### `query-notes`
|
|
352
|
+
|
|
353
|
+
Finds notes with a boolean query expression evaluated against the NoteStore
|
|
354
|
+
database, read-only. Because it does not go through AppleScript, a query over
|
|
355
|
+
several hundred notes typically returns in well under a second, and one call
|
|
356
|
+
can match titles and bodies together.
|
|
357
|
+
|
|
358
|
+
**Requires:** Full Disk Access for the MCP host process (see [Full Disk Access Setup](#full-disk-access)). Without it, use `search-notes`.
|
|
359
|
+
|
|
360
|
+
| Parameter | Type | Required | Description |
|
|
361
|
+
|-----------|------|----------|-------------|
|
|
362
|
+
| `query` | string | Yes | Query expression (syntax below), at most 2000 characters |
|
|
363
|
+
| `limit` | number | No | Maximum notes to return. Defaults to 50, maximum 500. The response reports the total match count. |
|
|
364
|
+
| `scanLimit` | number | No | How many of the most recently modified notes to examine. Defaults to 500, maximum 5000. The response says when older notes were left unscanned. |
|
|
365
|
+
| `includeDeleted` | boolean | No | Also scan notes in Recently Deleted, notes pending deletion, and folderless notes. Defaults to `false`. |
|
|
366
|
+
|
|
367
|
+
**Syntax:**
|
|
368
|
+
|
|
369
|
+
| Form | Matches |
|
|
370
|
+
|------|---------|
|
|
371
|
+
| `budget`, `"quarterly budget"` | Title or body contains the word or phrase (case-insensitive substring) |
|
|
372
|
+
| `title:x`, `body:x`, `text:x` | Title only, body only (text after the first line), or either |
|
|
373
|
+
| `folder:Work`, `folder:"Work/Clients"` | The note's own folder, by name or full path, case-insensitive (notes in subfolders are not included); a literal `/` in a name can be written `\/` as in `list-folders` |
|
|
374
|
+
| `account:iCloud` | Account name, case-insensitive |
|
|
375
|
+
| `tag:finance` | Native Notes tag (with or without `#`); textual hashtags are ordinary words |
|
|
376
|
+
| `has:link`, `has:attachment`, `has:checklist`, `has:drawing`, `has:image`, `has:video`, `has:audio`, `has:pdf`, `has:table`, `has:scan`, `has:tag` | The note body contains that kind of object |
|
|
377
|
+
| `checklist:open`, `checklist:done` | At least one unchecked item; or items present and all checked |
|
|
378
|
+
| `pinned`, `locked`, `shared` (or `is:pinned` …) | Note flags; `shared` includes notes in a shared folder |
|
|
379
|
+
| `words:>250` | Word count, with `=`, `>`, `>=`, `<`, `<=` |
|
|
380
|
+
| `created:>=2026-07-01`, `modified:<2026-09-01` | Dates as `YYYY-MM-DD` in local time, with the same operators; `=` means that whole day |
|
|
381
|
+
| `a b`, `a AND b`, `a OR b`, `NOT a`, `-a`, `( … )` | AND is implicit and binds tighter than OR |
|
|
382
|
+
|
|
383
|
+
Operators are case-insensitive. Quote an operator or flag word to search it
|
|
384
|
+
literally, for example `"and"` or `"pinned"`. Queries are capped at 256 tokens
|
|
385
|
+
and 64 levels of nesting. An unknown field such as `titel:x` is an error rather
|
|
386
|
+
than a silent text search; quote it to search the literal text.
|
|
387
|
+
|
|
388
|
+
Password-protected notes match on title and metadata only. Their bodies are
|
|
389
|
+
encrypted, so body predicates never match them, and `-body:x` therefore does.
|
|
390
|
+
Their snippets are always empty.
|
|
391
|
+
|
|
392
|
+
**Example - Open to-dos in a folder:**
|
|
393
|
+
```json
|
|
394
|
+
{
|
|
395
|
+
"query": "folder:\"Work Projects\" has:checklist -checklist:done"
|
|
396
|
+
}
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
**Example - Invoices or finance-tagged notes since July, scanning more history:**
|
|
400
|
+
```json
|
|
401
|
+
{
|
|
402
|
+
"query": "(title:invoice OR tag:finance) modified:>=2026-07-01",
|
|
403
|
+
"scanLimit": 2000,
|
|
404
|
+
"limit": 20
|
|
405
|
+
}
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**Returns:** Matching notes, most recently modified first, each with `id`,
|
|
409
|
+
`title`, `folder`, `account`, `modified`, `created`, and a `snippet` centred on
|
|
410
|
+
the first matched phrase. The ids are the same `x-coredata://…/ICNote/p…` form
|
|
411
|
+
every other tool accepts. `structuredContent` also reports `matched` (total
|
|
412
|
+
matches), `scanned`, `eligible`, `scanTruncated`, `truncated`, and `unreadable`
|
|
413
|
+
(bodies that could not be decoded). A malformed query returns an error naming
|
|
414
|
+
the problem and its position.
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
350
418
|
#### `get-note-content`
|
|
351
419
|
|
|
352
420
|
Retrieves the full content of a specific note.
|
|
@@ -1153,6 +1221,10 @@ Run a full setup diagnostic: Notes.app reachability, the Automation permission,
|
|
|
1153
1221
|
|
|
1154
1222
|
**Returns:** A per-check report (`structuredContent` carries the raw `{healthy, checks[]}`). The Full Disk Access check tells you whether checklist-state features will work — see [Full Disk Access Setup](https://github.com/sweetrb/apple-notes-mcp/blob/main/docs/FULL-DISK-ACCESS.md).
|
|
1155
1223
|
|
|
1224
|
+
The report ends with the same feature matrix as [`get-capabilities`](#get-capabilities)
|
|
1225
|
+
(`structuredContent.runtimeOS` and `structuredContent.features`). It is
|
|
1226
|
+
informational: an unavailable optional feature never changes `healthy`.
|
|
1227
|
+
|
|
1156
1228
|
---
|
|
1157
1229
|
|
|
1158
1230
|
#### `get-notes-stats`
|
|
@@ -1205,6 +1277,30 @@ resolve the same note. Creating a note from Markdown is
|
|
|
1205
1277
|
Reports which background operations are implemented, live-verified, installed,
|
|
1206
1278
|
and currently available, with a specific reason for each unavailable operation.
|
|
1207
1279
|
|
|
1280
|
+
It also reports `runtimeOS` (`platform`, `macOSVersion` from `sw_vers`,
|
|
1281
|
+
`darwinRelease`) and a `features` matrix, one entry per feature group:
|
|
1282
|
+
`applescriptCore`, `fullDiskAccessReads`, `shortcutsBridges`,
|
|
1283
|
+
`backgroundOperationsBridge`, `nativeTagsBridge`, `markdownNoteBridge`, and the
|
|
1284
|
+
placeholders `checklistToggle`, `smartFolders`, `paragraphLinks`, and
|
|
1285
|
+
`audioTranscription`, which need a native helper this server does not ship.
|
|
1286
|
+
Each entry carries `available`, `osSupported`, `minimumMacOSVersion`,
|
|
1287
|
+
`requirements`, `missing`, `unverified`, `tools`, and a machine-readable
|
|
1288
|
+
`reason` that is `null` when available and otherwise the first that applies:
|
|
1289
|
+
|
|
1290
|
+
| `reason` | Meaning |
|
|
1291
|
+
|----------|---------|
|
|
1292
|
+
| `unsupported_platform` | Not running on macOS |
|
|
1293
|
+
| `not_implemented` | The server has no implementation for this feature yet |
|
|
1294
|
+
| `unknown_os_version` | The feature has a macOS floor and `sw_vers` could not be read |
|
|
1295
|
+
| `requires_macos_<major>` | macOS is older than `minimumMacOSVersion`, e.g. `requires_macos_26` |
|
|
1296
|
+
| `full_disk_access_missing` | The Notes database is not readable by this process |
|
|
1297
|
+
| `shortcuts_unavailable` | The `shortcuts` command could not be run |
|
|
1298
|
+
| `shortcut_not_installed` | A bridge Shortcut is missing or installed more than once |
|
|
1299
|
+
|
|
1300
|
+
The probe never opens Notes.app or runs a Shortcut, so the Automation
|
|
1301
|
+
permission for Notes.app appears under `unverified` rather than being guessed;
|
|
1302
|
+
`doctor` and `health-check` confirm it by contacting Notes.
|
|
1303
|
+
|
|
1208
1304
|
#### `append-native`
|
|
1209
1305
|
|
|
1210
1306
|
Appends bounded plaintext, semantic HTML, or Markdown while preserving existing
|