apple-notes-mcp
CLAUDE.md144 starsChanged 57 days agoMITView on GitHub
This file provides guidance for AI agents (Claude, etc.) when using this MCP server. This MCP server enables AI assistants to interact with Apple Notes on macOS via AppleScript. All operations are local - no data leaves the user's machine. When sending content with backslashes to any tool, you MUST escape them. The MCP protocol uses JSON for parameters. In JSON, \ is an escape character. To include a literal backslash: If you send a single backslash without escaping: -…
- Reads credentials
In this repositoryOne other file it gives its agents.
- apple-notesSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
46 rules. About 0 are common, 10 are distinctive, and 36 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
36
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
If you send a single backslash without escaping:
- Very specific: line 66
All note operations support an optional id parameter.
- Distinctive: line 69
No issues with special characters
- Very specific: line 72
Use search-notes or create-note to get the note's ID
- Very specific: line 73
Use the ID for subsequent operations (get-note-content, update-note, delete-note, move-note)
- Distinctive: line 89
Always escape backslashes in content (see above)
- Very specific: line 92
HTML format: When using format: "html", do NOT include a <h1> tag in content — the title is prepended automatically as <h1>.
- Very specific: line 101
delete-notechecks placement: If Notes.app accepts the delete but the note is still in its original folder, the call reports that nothing … - Very specific: line 120
When you send checklist HTML or markdown to create-note or update-note:
- Very specific: line 132
Create the note with <ul><li>…</li></ul> items (HTML) or - bullet lines (plaintext) — the list structure is preserved.
- Very specific: line 136
Do not try alternative HTML class names, data attributes, or Unicode characters like ☐ — none of them produce a real checklist.
- Very specific: line 142
Important: When repeatedly updating a note (especially with HTML content), Apple Notes can accumulate whitespace artifacts - specifically …
- Distinctive: line 151
Solution: If a note has accumulated unwanted whitespace:
- Very specific: line 152
Delete the note with delete-note
- Very specific: line 153
Create a fresh note with create-note
- Very specific: line 159
All folder operations support hierarchical paths using / as a separator:
- Very specific: line 172
Prefer it over delete-folder when you have an exact folder id.
- Very specific: line 179
Use them when a write should only happen while the note is still where you reviewed it, or must never touch a protected subtree (for …
- Distinctive: line 184
Read-only; reads the NoteStore database, so it needs Full Disk Access
- Very specific: line 187
Check
fullyDecoded: When false, at least one rule is a filter of type unknown. - Very specific: line 194
Use modifiedSince (ISO 8601 date) to filter to recently modified notes — useful for large collections
- Very specific: line 196
Use folder to restrict search to a specific folder (supports nested paths)
- Very specific: line 213
Prefer the returned id over the title for any follow-up read/update/move/delete — titles are not unique, and a by-title lookup collapses …
- Very specific: line 214
Use get-note-content to retrieve full content
- Very specific: line 215
Use modifiedSince (ISO 8601 date) to filter to recently modified notes
- Very specific: line 216
Use limit to cap the number of notes returned
- Very specific: line 246
Prefer using id parameter to avoid issues with duplicate titles
- Very specific: line 255
Use when the user says "attach what I copied" or "put this screenshot in the note".
- Very specific: line 288
Check
tableCellsComplete: When false, an undecodable cell is null in rows, listed in incompleteCells, and shown as [undecoded cell] in … - Distinctive: line 293
Read-only structure of one note by exact id: paragraph styles, indent, alignment, block quote, checklist state, inline formatting, links, …
- Distinctive: line 299
Read-only view: do not build a full-body update from it
- Very specific: line 304
Do not build a paragraph link yourself from get-note-blocks paragraphUuid: it skips the uniqueness check and can open the wrong paragraph
- Very specific: line 312
When a paragraph link must keep working after edits, record an anchor: get-paragraph-link with recordAnchor: true, list-note-paragraphs …
- Very specific: line 328
Check linkSafe before emitting a link into HTML
- Very specific: line 359
Start a new template from show-markdown-template output and validate before saving
- Distinctive: line 389
Do not hand raw Notes paths to a browser or another tool.
- Distinctive: line 399
No action needed — enrichment happens transparently
- Very specific: line 416
Use includeText: false when only statuses and word counts are needed.
- Very specific: line 420
Always call native-helper-status first.
- Very specific: line 425
Use list-accounts to see available accounts
- Very specific: line 427
When using id, account is not needed (IDs are globally unique)
- Very specific: line 432
Use get-sync-status to check if sync is in progress
- Distinctive: line 434
If you get incomplete results, wait a moment and retry
- Very specific: line 437
Use list-shared-notes to find notes shared with collaborators
- Very specific: line 462
If a user reports being repeatedly prompted for Full Disk Access or Automation for "node" (especially after a brew upgrade), or that this …
- Very specific: line 474
If that matches (ad-hoc / no Team ID), offer to migrate this MCP to the official Developer-ID-signed Node per …
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md - Apple Notes MCP Server
This file provides guidance for AI agents (Claude, etc.) when using this MCP server.
Overview
This MCP server enables AI assistants to interact with Apple Notes on macOS via AppleScript. All operations are local - no data leaves the user's machine.
Related Documentation
- TECHNICAL_NOTES.md - Deep technical research on Apple Notes internals, database structure, protobuf format, and alternative access methods
- TODO.md - Prioritized improvement roadmap with stability fixes and new features
Critical: Backslash Escaping
When sending content with backslashes to any tool, you MUST escape them.
The MCP protocol uses JSON for parameters. In JSON, \ is an escape character. To include a literal backslash:
| You want | Send in JSON parameter |
\ | \\ |
\\ | \\\\ |
Mobile\ Documents | Mobile\\ Documents |
Why This Matters
If you send a single backslash without escaping:
- The JSON parser interprets
\as an escape sequence - Invalid sequences like
\(backslash-space) cause silent failures - The note creation/update will fail with no clear error
Examples
Correct - Shell command with escaped space:
content: "cp ~/Library/Mobile\\ Documents/file.txt ~/dest/"→ arrives as: cp ~/Library/Mobile\ Documents/file.txt ~/dest/
Correct - Regex pattern:
content: "Version pattern: \\d+\\.\\d+"→ arrives as: Version pattern: \d+\.\d+
Correct - Literal double backslash:
content: "In a JSON string, one backslash is written \\\\"→ arrives as: In a JSON string, one backslash is written \\
(One \\ per literal backslash, exactly as in the shell example above. \\\\
is the escaping for a literal double backslash — see the table's second row —
so sending \\\\ where you mean a single backslash stores two of them.)
Incorrect - Will fail:
content: "cp ~/Library/Mobile\ Documents/file.txt ~/dest/"Tool Usage Tips
Using IDs for Reliability (Recommended)
All note operations support an optional id parameter. Using IDs is more reliable than titles because:
- IDs are unique across all accounts
- Titles can be duplicated
- No issues with special characters
Recommended workflow:
- Use
search-notesorcreate-noteto get the note's ID - Use the ID for subsequent operations (
get-note-content,update-note,delete-note,move-note)
# Search returns IDs
search-notes query="Meeting"
→ "Meeting Notes (Work) [id: x-coredata://ABC/ICNote/p123]"
# Use ID for reliable operations
get-note-content id="x-coredata://ABC/ICNote/p123"
update-note id="x-coredata://ABC/ICNote/p123" newContent="Updated"
delete-note id="x-coredata://ABC/ICNote/p123"Other id forms. Anywhere a note id is accepted, you may also pass the note's Notes UUID (the identifier field that list and read tools return, and the value in notes://showNote?identifier= links) or its numeric Core Data key (the digits after p). The server resolves either to the x-coredata id before the tool runs. Both need Full Disk Access; without it they fail with an error naming it, and x-coredata ids keep working. A numeric key resolves only to a note, never a folder or attachment. Folder-id tools (show-folder, get-folder-by-id, rename-folder) accept a folder's UUID or numeric key the same way. Prefer identifier when you need to store a reference outside this session: it is stable across devices, while x-coredata ids are local to this Mac's database.
create-note / update-note / append-to-note
- Always escape backslashes in content (see above)
- Newlines can be sent as
\n(this is a valid JSON escape) - Title handling: The
titleparameter is automatically prepended as<h1>in the note body. Do NOT include the title in thecontentparameter, or it will appear twice. - HTML format: When using
format: "html", do NOT include a<h1>tag incontent— the title is prepended automatically as<h1>. create-notereturns the new note's ID for subsequent operationscreate-note'sfoldermust already exist. It does not create the folder — callcreate-folderfirst (it is idempotent, so calling it unconditionally is fine). Passing a folder Notes doesn't have fails with a generic "check that Notes.app is configured and accessible" message, which is misleading: Notes.app is fine, the folder isn't there. The same applies to a misspelledaccount.- To add to a note, use
append-to-note, notupdate-note.update-notereplaces the whole body;append-to-notetakescontentplusposition("after"default /"before"to insert directly below the title line),separator, andformat, does the read-and-concatenate itself, and always round-trips the body as HTML so existing rich formatting survives. - Body from a file:
create-notetakescontentPath(an absolute path to a UTF-8 file of at most 1 MiB in home, temp, or/Volumes; hidden paths such as~/.sshor~/.configand anything in~/Libraryother than iCloud Drive (~/Library/Mobile Documents) and~/Library/CloudStorageare refused unless the server setsAPPLE_NOTES_MCP_ALLOW_PRIVATE_CONTENT_PATHS=1) instead ofcontent. Pass exactly one of the two. - Markdown title line: with
format: "markdown", a first line that is exactly# <title>is removed (plus one blank line), sincetitleis supplied separately. A different first heading is kept. markdownRoute: "html"imports Markdown through AppleScript HTML instead of the Shortcut: any account, tags allowed, no real Heading styles. Task items (- [ ],- [x]) become list rows starting with a visible ☐ / ☑ character. Those are text, not checkable checklist items; tell the user so. Block quotes, fenced code and inline code are refused on this route, and a---line stays literal text; only the Shortcut route imports these natively.timeoutSeconds(1–120) oncreate-note,update-note,append-to-note,delete-note, andmove-notesets the timeout of each Notes.app automation step for that call. A timed-out write is uncertain: read the note by id before retrying.- Notes with large images stay readable and deletable. A body embeds its inline images as base64, so a 40 MB image makes a body of about 110 MB.
get-note-contentaccepts bodies up to 512 MB, anddelete-notestill compares the whole body before deleting. An error saying Notes.app "returned more than … of output" is a size limit, not a timeout; retrying will not help. delete-notechecks placement. If Notes.app accepts the delete but the note is still in its original folder, the call reports that nothing was deleted.delete-noteandbatch-delete-notesrefuse a note already in Recently Deleted, where a delete is permanent. The folder is read live from Notes.app; the database only identifies which folder is Recently Deleted.- Copy-then-retire with
delete-note: after copying note A to note B and verifying B, read both withget-note-content, then calldelete-noteon A withguardNoteId= B andexpectedGuardContentHash= B'scontentHash. The delete stops if B changed, was locked, moved to Recently Deleted, or is a Quick Note. It needs Full Disk Access (the Quick Note flag is only in the database); a B the database has not saved yet still passes on Notes.app's live checks. It is a guard, not a transaction.requireActiveNoteIdonly requires the other note to stay active; it does not fingerprint its content. - Do not hand-roll read-modify-write from
get-note-content. That body is lossy for image-heavy notes: inline base64 images overAPPLE_NOTES_MCP_MAX_INLINE_IMAGE_BYTES(default 256 KB) come back as[inline image omitted: …]placeholders, flagged asstrippedImages/truncatedinstructuredContent. Writing it back withupdate-notereplaces the real images with that text. - Both
append-to-noteandupdate-noterewrite the full body, so runlist-attachmentsfirst when a note may hold embedded files.
insert-link
- Adds one URL to an exact note as its own paragraph:
mode: "raw"(default) shows the URL,mode: "hyperlink"showslabel.positionis"end"(default) or"after-title";blankLine(defaulttrue) controls the blank line before it. - Needs the same
expectedContentHashasappend-to-note. Notes with native objects route to native end-append and needscopeText; onlyposition: "end"withblankLine: trueworks there. - Verified from the note's stored link runs, not the HTML sent: the result carries
linkStoredandstoredUrl(a bare origin comes back with a trailing/). - A bare URL written as plain text is not linked by Notes.
linked: falsewrites it that way on purpose and reportslinkStored: false. - Rich URL preview cards cannot be created, and a link cannot be placed inside an existing paragraph. For a link to another note by id, use
insert-note-link.
Checklist Creation Is Not Supported
You cannot create an Apple Notes checklist (the interactive ☐ / ☑ items) via this MCP server. This is an Apple Notes limitation, not a server bug.
The exception is the Background Operations Shortcut bridge: when get-capabilities reports create-checklist-item available, create-checklist-item appends one real unchecked item and create-checklist-items appends several in order (1–20, one bridge run of a few seconds each; a client-side timeout does not stop the server, so read the note before any retry). If create-checklist-items returns ok: false (an error result with a code), only the items in landed are verified; read the note before retrying, and retry only items that are not present.
When you send checklist HTML or markdown to create-note or update-note:
| You send | What Notes.app renders |
<input type="checkbox"> Buy milk | Buy milk (the <input> is stripped) |
<ul class="checklist"><li>Buy milk</li></ul> | A plain bulleted list (the class is dropped) |
- [ ] Buy milk in plaintext mode | Literal text - [ ] Buy milk |
Apple Notes stores checklists as a paragraph style inside a gzipped protobuf blob. AppleScript's body interface does not expose paragraph styles, so there is no HTML or markdown input that produces a real checklist.
What to do when a user asks for a checklist note:
- Create the note with
<ul><li>…</li></ul>items (HTML) or-bullet lines (plaintext) — the list structure is preserved. - Tell the user to open the note in Notes.app, select the list items, and press ⇧⌘L (or Format → Checklist) to convert them.
- Once converted,
get-checklist-stateandget-note-markdowncan read the done/undone state correctly.
Do not try alternative HTML class names, data attributes, or Unicode characters like ☐ — none of them produce a real checklist. The interface to set paragraph styles simply isn't exposed.
Exception — Notes' own Markdown importer. create-note with format: "markdown" runs the Create Markdown Note Shortcut, and Notes' importer turns - [ ] item / - [x] item into real checklist items with that done state, > text into a block quote, a bare ``` fence into Monospaced paragraphs, a --- line (after a blank line) into a divider, and `inline code` into highlighted text (not monospace). The server verifies each construct by exact-ID readback. These constructs are gated separately as create-note-markdown-blocks in get-capabilities. append-native's Markdown refuses them, because its converter flattens them to plain text. markdownRoute: "html" does not map them either: it renders - [ ]/- [x] as ☐ / ☑ glyph rows, keeps --- as literal text, and refuses the rest.
Whitespace Accumulation on Iterative Updates
Important: When repeatedly updating a note (especially with HTML content), Apple Notes can accumulate whitespace artifacts - specifically <div><br></div> tags that persist between sections even after removing them from your content.
Symptoms:
- Large gaps appear between sections that weren't in your content
- Reading the note back shows multiple blank
<div><br></div>lines - The whitespace persists even when you update with clean content
Cause: Apple Notes' internal HTML processing preserves empty divs from previous edits. Each update can leave behind formatting artifacts.
Solution: If a note has accumulated unwanted whitespace:
- Delete the note with
delete-note - Create a fresh note with
create-note
This is more reliable than trying to fix the whitespace through updates, as the artifacts are baked into the note's internal representation.
Folder Paths (Nested Folder Support)
All folder operations support hierarchical paths using / as a separator:
"Work"— simple folder name"Work/Clients"— nested path (folder "Clients" inside "Work")"Work/Clients/Omnia"— deeply nested path"Travel/Spain\/Portugal 2023"— literal slash in folder name escaped as\/
This works in: create-note (folder param), create-folder, search-notes, list-notes, move-note, batch-move-notes, delete-folder.
create-folder is the one that creates a hierarchy: pass it a whole path and every missing segment is created, existing ones skipped. It is idempotent — an already-existing folder is not an error — so call it before any create-note / move-note / batch-move-notes that targets a folder you have not confirmed exists.
list-folders returns full hierarchical paths, so duplicate folder names (e.g., multiple "Archive" folders) are disambiguated.
delete-folder-by-id
- Prefer it over
delete-folderwhen you have an exact folder id. Read the folder withget-folder-by-id(it returnsname,parentId,accountId, andisRoot), call withdryRun: true, then apply with the same guards,dryRun: false, andexpectedRevisionset to the returnedrevision. - Pass
expectedRoot: truefor a top-level folder, otherwiseexpectedParentId; exactly one is required. - It refuses Recently Deleted, smart folders, default and system folders, shared folders, and non-empty folders, with no override. Move or delete the contents first.
- It is not atomic: the guard is a pre-check followed by an AppleScript delete. Messages starting
Conflict:mean something changed; read and plan again. It needs Full Disk Access.
Folder scope guards
update-note,append-to-note,delete-note, andmove-noteaccept optionalifFolderId,ifAncestorFolderId, andforbiddenAncestorFolderIds(exact folder ids fromlist-folders).- Use them when a write should only happen while the note is still where you reviewed it, or must never touch a protected subtree (for
move-note, the destination is checked against the forbidden list too). - They are re-checked inside the write's own AppleScript. A failure reads
Scope guard failed: …and nothing is changed; re-read the note before retrying. - A forbidden id that matches no folder fails the guard (
a forbidden folder id does not match any folder) rather than being ignored; take ids fromlist-folders.
list-smart-folders
- Read-only; reads the NoteStore database, so it needs Full Disk Access
- Each smart folder's rules come back as
match(all/any/none) plusfilters; each filter has a readabledescription, andexcluded: truemarks an Exclude rule. Nested rule groups are filters of typegroup queryis the stored query without Notes' outer{"deleted": false}wrapper;rawQueryis the stored JSON verbatim- Check
fullyDecoded. When false, at least one rule is a filter of typeunknown; report it fromvaluerather than guessing its meaning includeMatchingNotes: trueasks Notes.app which notes each smart folder currently shows (matchingNoteCount,matchingNotes, capped bylimit, default 50). This is Notes' own evaluation, not a re-implementation of the rules
search-notes
- Set
searchContent: trueto search note bodies instead of titles, not in addition to them. The two modes are exclusive, so no single call matches titles or bodies. A title-only search that finds nothing says so in the response; treat that as "no title matched", not "no such note exists", and retry withsearchContent: true. - Searches are case-insensitive
- Results include note IDs for reliable subsequent operations
- Use
modifiedSince(ISO 8601 date) to filter to recently modified notes — useful for large collections - Use
limitto cap the number of results returned.limitdefaults to 50 — a broad query (e.g. a single common letter) reads several properties per match via AppleScript, so an unbounded search over hundreds of matches times out; the default keeps it useful. The response discloses the applied limit and warns when results were truncated — pass a higherlimit, or narrow withfolder/modifiedSince, to see more. - Use
folderto restrict search to a specific folder (supports nested paths) - With Full Disk Access,
searchContent: truereads the Notes database instead of asking Notes.app (source: "database"in the response): it matches the full plain text, title line included, scans the 5000 most recently modified notes, and excludes Recently Deleted. Without Full Disk Access it falls back to AppleScript (source: "applescript"), which scans every body beforelimitapplies and can time out on a broad term; the timeout error then says how to fix it matchedIn(["title"],["body"], or both; body = text after the first line) appears when the note text came from the database: always on a database body search, and on any search withincludeWordCount. It is absent for locked notes and for AppleScript searches withoutincludeWordCount; its absence is not evidence either wayincludeWordCount: trueaddswordCount(null = locked or unreadable). An AppleScript search reads the bodies in one batched read-only database query, never per note; without Full Disk Access the results stay unchanged andwordCountUnavailablesays why
query-notes
- Boolean search read straight from the NoteStore database (read-only, needs Full Disk Access). Prefer it over
search-noteswhen Full Disk Access is available: one call matches title or body, and it returns in well under a second instead of ~200ms per result - Syntax: bare words /
"phrases";title:,body:,text:,folder:,account:,tag:;has:link|attachment|checklist|drawing|image|video|audio|pdf|table|scan|url|map|tag(has:urlis a link preview card and also counts ashas:link);checklist:open|done;pinned,locked,shared,quicknote;words:>250;created:>=2026-07-01,modified:<2026-09-01. AND is implicit;OR,NOT, leading-, and parentheses work. Quote an operator word to search it literally - Scans the 500 most recently modified notes by default (
scanLimitup to 10000). WhenscanTruncatedis true, older notes were not examined — raisescanLimitbefore concluding a note does not exist - Excludes Recently Deleted and folderless notes unless
includeDeleted: true - Locked notes match on title and metadata only; body predicates never match them, negated or not (
-body:xdoes not match a locked or undecodable note) - Each hit has
matchedIn(where the positive text terms occur:title,body, or both) when the query has a text term and the body is readable; atitle:term only counts toward the title and abody:term only toward the body. An empty list means the note matched through a non-text branch (pinned OR x) includeWordCount: trueaddswordCount, the same countwords:filters on (null = locked or unreadable). Chinese, Japanese and Thai text is counted by word boundaries, not by spaces. A metadata-only query reads just the returned notes' bodies in one extra query- Result ids chain directly into
get-note-contentand every other id-based tool
list-notes
- Returns each note's
{title, id}— not content. Changed in 2.7.0:noteswasstring[] - Prefer the returned
idover the title for any follow-up read/update/move/delete — titles are not unique, and a by-title lookup collapses duplicates onto one note (thesearch-notes/export-notes-jsonidentity trap) - Use
get-note-contentto retrieve full content - Use
modifiedSince(ISO 8601 date) to filter to recently modified notes - Use
limitto cap the number of notes returned - Excludes notes in Recently Deleted (counted in
excludedRecentlyDeleted);includeRecentlyDeleted: truelists them flaggedinRecentlyDeleted
list-special-notes
- Lists
kind: "pinned" | "quick-notes" | "recently-deleted" | "locked"from the NoteStore database (read-only, needs Full Disk Access). AppleScript cannot enumerate any of these sets - Rows are metadata only, newest first, with the usual
x-coredataid;totalis the match count beforelimit(default 100, max 1000) lockeddeliberately includes trashed and folderless locked notes; checkinRecentlyDeleted,markedForDeletion, andfolderbefore acting on a rowsupported: falsemeans this macOS version's database cannot answer that kind; it is not an error
list-native-tags
- Pass
folderfor the per-folder tag → note-id map; omitfolderfor an account-wide inventory withnoteCountper tag (all accounts unlessaccountis given) complete: falsewithunverifiedNotesmeans some tagged notes (usually locked ones) were counted without confirming the tag in their body
list-recent-notes (incremental sync)
- Database-backed (read-only, needs Full Disk Access).
sincetakes amodifiedCheckpointcursor, or an ISO date or date-time (strictly after that moment) - With
since, rows come oldest first andnextSinceis the last row's cursor. Store it and call again with it; every call advances.saturated: true(count equals limit) means more changes may follow, so call again right away;falsemeans you are caught up - For a first full sync, start with
since: "1970-01-01"and page the same way; the maximumlimitis 1000, and paging reaches every note exactly once - Without
since, rows come newest first (a browse view).nextSinceis then set only when the call returned every matching note - A modification-date cursor can miss an edit that iCloud delivers later from another device with an older timestamp; run a full pass from the start now and then
- Deletions are invisible unless
includeDeleted: true, which adds Recently Deleted, notes awaiting deletion, and folderless rows; checkinRecentlyDeleted/markedForDeletionbefore acting on them. A purged note leaves no row at all modifiedCheckpointis exact; the ISOmodifiedstring is not. Two notes can share the samemodifiedtext and still differwordCounts: trueaddswordCount/charCount(null = locked or unavailable, 0 = known empty).bodyPreview: trueadds a 180-character preview
list-folder-tree
- One read for the whole hierarchy with
noteCount(direct) andtotalNoteCount(with subfolders), grouped by account;kinddistinguishes regular, smart, and trash folders
move-note
- Native move — the note is relocated in place via Notes.app's
move, so its id, creation date, and embedded attachments are preserved - The destination folder must already exist (create it first with
create-folder) - Smart folders are refused as destinations by
move-note,batch-move-notes,create-note,create-note-with-attachment, andcreate-folder(any path segment):code: "unsupported",committed: false,reason: "smart_folder_destination", nothing written. Notes.app would otherwise move the note to Recently Deleted. Pick an ordinary folder fromlist-folders. Needs Full Disk Access to detect; without it the guard is off - Prefer using
idparameter to avoid issues with duplicate titles
add-attachment / create-note-with-attachment
pathfollows the same read scope ascreate-note'scontentPath: a regular file in home, temp, or/Volumes; hidden paths (~/.ssh,~/.config, a project.env) and~/Libraryother than iCloud Drive and~/Library/CloudStorageare refused unless the server setsAPPLE_NOTES_MCP_ALLOW_PRIVATE_CONTENT_PATHS=1. Do not try to work around a refusal by copying the file; ask the user.filenamesets the name the attachment shows in Notes. It must keep the source file's extension and be a single path component.- macOS 27: Notes' AppleScript never lists PDF attachments. When AppleScript shows no new attachment, the tool verifies through the read-only NoteStore rows (needs Full Disk Access): one new row, a type that fits the file extension, a note body that references it (when the body lists attachments), and matching bytes, polled for about two seconds, with
contentHashre-read afterward. It returnsverifiedBy: "database"; without FDA a PDF attach reports "outcome uncertain", and the PDF was probably created, so read the note before retrying. create-note-with-attachmentcreates the note, then attaches. If the attach step fails before the file is inserted, the error names the new note's id: calladd-attachmenton that id rather than repeating the tool, which would create a second note. If the error says the attachment outcome is uncertain (indeterminate: true), the file may already be attached: runlist-attachmentson that id before attaching again.
add-attachment-from-pasteboard
- Use when the user says "attach what I copied" or "put this screenshot in the note". Same
id,expectedContentHash, andfilenameasadd-attachment; afilenamewithout an extension gets the pasted type's extension. - It reads the pasteboard once, freezes the bytes into a private temporary file, and never writes to the pasteboard. A copied file wins over image data; text-only contents are refused (use
append-to-notefor text). sourcein the result says what was attached (kind, pasteboardtype, defaultfilename). An "unreachable" error means the MCP host is not running in the user's GUI session.- The note and revision are checked before the pasteboard is read. Errors carry
pasteboardCode.pasteboard_access_denied(macOS 15.4+ paste privacy): nothing was read because macOS would show its paste alert; ask the user before retrying withallowPasteAlert: true, which makes macOS show the alert.alwaysDenycannot be overridden.multiple_files: several copied files are refused; useadd-attachmentper file.multiple_items: several copied images or PDFs are refused the same way. When a copy offers a PDF and a raster preview of it, the PDF is attached. - A pasted PDF is inserted but reported as "insertion outcome uncertain" on macOS 27 (issue #236: AppleScript does not list PDF attachments, so neither this tool nor
add-attachmentcan verify them). Read the note withlist-attachments includePathsor in Notes.app before any retry; never retry blindly.
create-table
- Omit
rowsfor an empty 2 × 2 table (the size Notes inserts from Format > Table).
get-checklist-state
- Requires note ID (not title) — use
search-notesto find the ID first - Reads directly from the NoteStore SQLite database (not via AppleScript)
- Requires Full Disk Access for the MCP host process
- There is no
nullresult. A successful call returnsitems/checked/total; every other outcome is an MCP error response (isError: true), including the routine "this note simply has no checklist". Distinguish them by the message text:"This note does not contain any checklist items."— the note parsed fine and has none. Not a failure; report it as an empty checklist."No data found for this note in the database."— no row for that note (e.g. not yet synced to the local store)."Full Disk Access is required to read checklist state. …"— permission, not data."Invalid note ID format: …"— the id isn't anx-coredata://…/ICNote/pNNNURL."Failed to decompress note data."— the stored blob wasn't parseable.- Plus note-not-found and password-protected errors raised before the database is touched.
- Works independently of
get-note-content— use both for full picture
get-audio-transcripts
- Reads the transcript (and summary, if any) that Notes already computed for each audio recording in a note, by note id. It never transcribes audio itself
- Requires Full Disk Access; reads the NoteStore database read-only. Password-protected notes are refused
- One entry per top-level audio attachment, in body order. Check each entry's
status:okhastext;nonemeans Notes stored no transcript (not a failure);undecodablecarries areason includeSegments: trueadds word-levelsegments(text, start, duration, speaker), capped per attachment bymaxSegments(default 2000). Leave it off unless word timings matter; it multiplies the response size- The
attachmentIdworks withsave-attachmentif the user also wants the audio file
get-note-tables
- Requires the note ID; reads the NoteStore database read-only (Full Disk Access)
- Returns every native table in body order as GitHub-flavored Markdown (
markdown, first row as header) and as JSON (tables[].rows,rowIds,columnIds) - A note with no tables succeeds with an empty
tableslist; it is not an error - Check
tableCellsComplete. When false, an undecodable cell isnullinrows, listed inincompleteCells, and shown as[undecoded cell]in Markdown; a table that cannot be decoded at all hascomplete: false, areason, and no rows. Never fill those cells in - Cell text only: links and styling inside cells are not rendered
- Password-protected notes are refused
get-note-blocks
- Read-only structure of one note by exact id: paragraph styles, indent, alignment, block quote, checklist state, inline formatting, links, and attachment positions
- Requires Full Disk Access; password-protected notes are refused with
[encrypted] - Paged: while
page.hasMoreis true, call again withoffset: page.nextOffset - Offsets count UTF-16 code units, like
linksinget-note-content paragraphUuidis not unique per paragraph. Do not use it as a keylinkis the stored URL; checklinkSafebefore emitting it into HTML- Read-only view: do not build a full-body update from it
list-note-paragraphs / get-paragraph-link
- Paragraph links have the form
applenotes://showNote?identifier=<note>¶graphID=<paragraph>and open Notes at that paragraph - A link is given only when the paragraph's stored ID is
uniquein the note. Notes copies IDs when a paragraph is split, so body paragraphs often share one;reason: "paragraph-id-shared"is an expected answer, not a failure. Headings and titles usually link - Do not build a paragraph link yourself from
get-note-blocksparagraphUuid: it skips the uniqueness check and can open the wrong paragraph - To link a paragraph, call
list-note-paragraphs(optionallylinkableOnly: true) and pick one with aurl, or callget-paragraph-linkwithcontains; onreason: "ambiguous-paragraph"passoccurrenceor a longer snippet - Select the note by
id(a Notes UUID works too) or exacttitle;foldernarrows a title using list-folders paths. Title lookups never match a note in Recently Deleted - Neither tool creates or changes a paragraph ID. A later edit in Notes can replace the ID and break a link
- Both tools can write the local anchor registry (
recordAnchors,recordAnchor), so they are not annotated read-only; without those flags they write nothing - Requires Full Disk Access; password-protected notes are refused
Paragraph anchors (create / resolve / list / get / prune-paragraph-anchor(s))
- When a paragraph link must keep working after edits, record an anchor:
get-paragraph-linkwithrecordAnchor: true,list-note-paragraphswithrecordAnchors: true, orcreate-paragraph-anchor(which also accepts a paragraph whose ID is shared or missing). Store theanchorId, not only the url - Later, call
resolve-paragraph-anchorand use itsurlonly whenstatusisresolved. Never build a link frommatchyourself ambiguousandlow-confidenceare deliberate refusals, not errors to work around: report them and let the user pick the paragraph (for example withlist-note-paragraphs), then record a new anchorneeds-remintingmeans the paragraph was found but has no safe ID. Reportmatch.blockIndexandmatch.text; there is no public way to give it a new ID, and the result has nourlrefresh: trueupdates the stored anchor after a confident match (0.8 or more) so later edits are tracked from the current state; it never touches Notesprune-paragraph-anchorsis a dry run unlessdryRun: false. Show the user thestalelist before removing.note-deleted(the note is in Recently Deleted) is not pruned by default- The registry (
APPLE_NOTES_MCP_ANCHOR_FILE, default under~/Library/Application Support/apple-notes-mcp/) holds the anchored paragraphs' text; treat it as private - The HTTP resolver (
apple-notes-mcp anchors serve) is a command the user runs; never suggest--tailnetunless they ask to open links from other devices
get-note-structure
- One read-only call for a note's overview by exact id: text, block summary, links with
kind(inline,card,note,section), tags, attachments, and metadata (deepLink,isShared,isLocked,inRecentlyDeleted,lastViewed, word/char counts,attachmentCount, checklist counts,hasDrawing,firstImage) - Attachments use the same
kind, body order,previewPathandfirstImageaslist-attachments, so the two tools agree about the same attachment - Requires Full Disk Access. A locked note still returns metadata and attachments;
bodyDecodedis false and body-derived fields are null, so do not read null counts as zero lastViewed: nullis normal: checklastViewedStatus(never-viewedfor most notes)attachmentCountcounts top-level attachments; gallery items and recording parts are underchildrenpreviewPathis Notes' cached rendition (a thumbnail), not the attachment file itself; it is null when Notes has not rendered one- Check
linkSafebefore emitting a link into HTML
list-note-links
- Lists links with
kind(inline,card,note,section) in one note (id), afolder(subfolders included unlessincludeSubfolders: false), anaccount, or the whole library, each with its source note id, title, folder path (aslist-foldersprints it) and account - Requires Full Disk Access. Folder, account and library scans skip inline links unless
includeInline: true(it decodes every body in scope);counts.inlineis 0 then, which does not mean there are none accountresolves like the other tools (exact name, then a unique prefix). A bare folder name must be unique; when it is ambiguous, retry with one of the paths the error listspreviewPathon a card is Notes' cached preview image; it is null when Notes has not rendered one- Page with
offset: page.nextOffsetwhilepage.hasMoreis true - Check
linkSafebefore emitting a link into HTML
get-capabilities / doctor feature matrix
- Both return
runtimeOSand afeaturesobject keyed by feature group (applescriptCore,fullDiskAccessReads,backgroundOperationsBridge,nativeTagsBridge,markdownNoteBridge, ...). Check a feature'savailablebefore relying on it, and branch on its machinereason(full_disk_access_missing,shortcut_not_installed,requires_macos_26,not_implemented, ...) rather than on prose. unverified: ["notes_automation"]means the probe did not contact Notes.app, not that Automation is denied. Rundoctorto confirm it.- Placeholder features (
checklistToggle, andsmartFoldersfor creating or editing smart folders) always reportnot_implemented; do not attempt them through other tools.paragraphLinksandaudioTranscriptionare real features gated on Full Disk Access.
export-notes-markdown
- Exactly one of
id(exact note ID) orfolder(path, optionalaccount,limitdefault 100).truncated: truemeans the folder holds more notes thanlimit - An
assetsDir(or template assets directory) that cannot be created fails the export with[invalid-path]instead of marking every attachment unavailable - Renders from the decoded body, so checklist state, tables and attachment positions are exact;
get-note-markdownis unchanged - A folder document joins notes with
---. It is a presentation format: never split it back into notes or use it as a backup outputPathis create-only;[output_exists]means choose a new path, never delete the old file on the user's behalf- Pass
assetsDirto copy attachment files; without it attachments are placeholders like\[Image: name\] - Password-protected notes are listed in
skipped; Full Disk Access is required template(standard-markdown,obsidian) ortemplateFile(JSON, exclusive; same private-location refusal ascontentPath) renders through a Markdown template; the schema is in docs/markdown-templates.md.standard-markdownoutput equals the default export[invalid-template]lists one$.json.path: problemper line: fix those fields, do not guess a new template- Templated
warnings(for examplemissing_asset,assets_dir_required) do not fail the export; report them
Markdown template library
list-markdown-templates,show-markdown-template,validate-markdown-template,save-markdown-template,delete-markdown-templatemanage JSON templates forexport-notes-markdown(template: "<name>")- Library:
~/Library/Application Support/apple-notes-mcp/templatesorAPPLE_NOTES_MCP_TEMPLATE_DIR; names are lowercase slugs;standard-markdownandobsidianare built in and reserved - Save is create-only:
[template-exists]means ask before passingforce: true - Start a new template from
show-markdown-templateoutput and validate before saving - A user who wants to edit templates visually can run
apple-notes-mcp templates edit [name]in a terminal (a local, token-gated web editor with live validation and preview on sample notes). It is not an MCP tool: suggest it, do not start it for them.--tailnetexposes it to their tailnet (and--notewith it shows a full note body to anyone with the URL), so mention it only when they ask to edit from another device
export-notes-html
- Same selection as
export-notes-markdown;outputPathis required (the HTML is never returned inline) and create-only - Assets are embedded as data URLs by default. Use
embedAssets: false(optionally withassetsDir) for large media: embedded assets over 10 MiB render as an unavailable marker - A sidecar directory defaults to
<output stem>.assets; keep it next to the HTML when moving the file - Drawings keep Notes' PNG by default.
vectorDrawings: true(opt-in, defaultfalse) renders classic PencilKit drawings as SVG through the public native helper; Paper drawings keep Notes' PNG. A drawing that cannot be decoded falls back to the PNG and is counted invectorDrawings.fallbackReasons; reporthelper_not_installedas "runapple-notes-mcp setup --public-helperfor vector drawings", not as a failed export. WithoutvectorDrawings: truethe helper is never run - Presentation format only: not a backup and not something to import back
Batch operations
batch-delete-notesandbatch-move-notesaccept at most 500 ids per request (the limit is enforced at the schema boundary, so an over-long array is rejected before anything runs). Chunk larger sets.batch-move-notes' destination folder must already exist — create it withcreate-folderfirst.
Paper and drawings
list-paper-attachments(noteid, Full Disk Access) reports each Paper (com.apple.paper) or classic drawing withraster(format and size of Notes' own rendering) andhandwritingSummarywhen Notes stored recognized text.export-paper-imagecopies that rendering to a new file. ThesavePathextension must match the format (.pngfor Paper). PassattachmentIdwhen a note has more than one drawing. It never overwrites.- Strokes are not decoded; there is no public reader for Notes' Paper bundles. Do not describe the export as vector data.
analyze-svg
- Standalone, read-only analysis of one local SVG file (absolute path in home, temp, or
/Volumes; at most 1 MiB). It opens no Notes data. pathfollowscontentPath's read scope: hidden paths and~/Libraryother than iCloud Drive and~/Library/CloudStorageare refused unless the server setsAPPLE_NOTES_MCP_ALLOW_PRIVATE_CONTENT_PATHS=1. Do not copy the file elsewhere to get around a refusal; ask the user.- Branch on
classificationandrequiredLosses, not on the issue text.safeneeds no approximation;lossyneedsgeometry-approximationorpaint-approximation;unsupporteddrops visible content or has nothing drawable (importable: false). - Refusals are errors with
svgCode(svg_unsafe,svg_invalid,svg_reference_invalid,svg_complexity_limit,svg_geometry_invalid,svg_file_invalid). An unsafe file cannot be analyzed with any option; do not try to strip parts of it on the user's behalf. includeDrawing: truereturns the normalized strokes; leave it off unless you need them, since it can be large.
Attachment paths, first image, and batch export
list-attachmentswithincludePaths: true(needs the noteidand Full Disk Access) addsassetPaths(the attachment's own files),previewPath(Notes' largest rendered thumbnail, always an image file), andpaths. UseassetPathswhen you need the original; apreviewPathalone means the asset has not downloaded.list-attachmentswithfirstImage: truereturns only the lead visual in body order: the first image even whenpathisnull, else the first scan or drawing, elsenull.export-attachmentscopies files intoexportDir(same allowlist assave-attachment, never the Notes data folder). CheckexportedKind:"preview"means you got a thumbnail, not the original, and"fallback"means Notes' own rendering (a drawing's PNG, a scan's PDF).inBody: falsemarks an attachment the body no longer shows.stale: trueon a fallback (andfallbackStaleinlist-attachmentspaths,stats.staleRenderingsin Markdown/HTML exports) means the rendering Notes recorded is missing and an older one was used. It never overwrites; collisions become-2,-3.- Do not hand raw Notes paths to a browser or another tool. Export first.
get-note-link
- Returns the shareable
notes://showNote?identifier=<uuid>deep link — use this, not thex-coredata://id, whenever a link is meant to be handed to a person, stored in a Reminders task, or opened on iOS - Primary path reads
ZIDENTIFIERfrom the NoteStore database, so it needs Full Disk Access; on macOS 12–15 it can fall back to the AppleScriptnote linkproperty, which macOS 26+ no longer exposes - Password-protected notes cannot be linked
get-note-markdown (checklist enrichment)
- Automatically annotates checklist items with
[x]/[ ]when database is accessible - Falls back to plain list items if Full Disk Access is not granted (no error)
- No action needed — enrichment happens transparently
get-note-drawings (classic PencilKit drawings)
- Decodes
com.apple.drawing.2/com.apple.drawingattachments into strokes (inkType, sRGBcolor,width,points) and/or SVG (format: "json" | "svg" | "both"). Modern Paper sketches (com.apple.paper) are not decoded. - Needs Full Disk Access and the public native helper, built once by the user with
apple-notes-mcp setup --public-helper. An error mentioningsetup --public-helpermeans it is not built or is stale after an upgrade; tell the user to run that command rather than retrying. - Overall
statusisnonewhen the note has no classic drawing. A per-drawingstatus: "error"carries acode(no_data,undecodable,timeout, ...) and does not fail the call. - For large drawings pass
includePoints: falseorformat: "svg"; the server also drops points (pointsOmitted) and then SVG (svgOmitted) itself past the response size limit, and fails if even that is too large. - Pixel-erased ink is not returned:
masked: truemarks a visible piece of a partly erased stroke (one stroke can give several), andhiddenStrokeCountcounts fully erased strokes.
transcribe-note-audio (on-device transcription)
- Transcribes a note's voice recordings and audio attachments on this Mac with the Speech framework (never a server). Same prerequisites as
get-note-drawings: Full Disk Access andapple-notes-mcp setup --public-helper. - Pass
locale(BCP-47, defaulten-US) when the speech is not US English. Transcribe long recordings one at a time withattachmentId; clients may stop waiting after a fixed time. - Per-recording
status:ok,partial(some text;code: "incomplete"or a failed take),error(withcode), orindeterminate(the helper timed out; the outcome is unknown, so a retry may work). Overallnonemeans the note has no audio. asset_unavailablecan mean the audio file has not downloaded from iCloud, or that the language's on-device speech model is not installed. The server never downloads a model on its own: ask the user before retrying withdownloadAssets: true.- The server never shows a permission prompt.
permission_requiredmeans the app hosting this server lacks Speech Recognition access; tell the user to allow it under System Settings > Privacy & Security > Speech Recognition rather than retrying.permission_not_requested(before macOS 26 only) means the host app has never asked for that access, so it is not in that list yet; the user needs macOS 26 or a host app that already has the access. responseOversized: truemeans the transcripts were dropped to fit the response size limit; transcribe one recording at a time withattachmentId.maxSeconds(30 to 3600, default 900) caps the whole call; takes not started in time reporttime_limit, so transcribe the rest byattachmentId. Cancelling the request stops the helper.- Use
includeText: falsewhen only statuses and word counts are needed.
Private helper tools (opt-in)
native-helper-statusandnative-note-stateuse Apple's private NotesShared framework through a read-only helper the user builds withapple-notes-mcp setup --native-helper. They are off unlessAPPLE_NOTES_MCP_ENABLE_PRIVATE=1; each refusal carries the shared errorcodeplus ahelperCode(disabled,helper_not_installed,helper_stale,helper_modified,private_api_unavailable,store_unavailable).- Always call
native-helper-statusfirst. Do not suggest enabling the helper unprompted: it is unsupported API and can break on any macOS update. - The helper cannot write. Write support was deliberately deferred by the maintainer (#204): a second writer beside a running Notes.app, CRDT replica identity, and the iCloud upload lag are unresolved. Use the AppleScript or Shortcuts-bridge tools for edits.
cloudSync.uploadPendinginnative-note-stateshows whether Notes has an upload queued.
Multi-account
- Omitting
accounttargets whatever Notes.app reports as itsdefault account— which is often, but not necessarily, iCloud. Since 2.7.1 the server resolves that name at runtime instead of assuming the literal"iCloud", so it is also correct for a localized account name, a non-iCloud default, or a name carrying a trailing U+F8FF () - Use
list-accountsto see available accounts - Pass
accountparameter to target specific account - When using
id, account is not needed (IDs are globally unique)
Sync and Collaboration Awareness
iCloud Sync
- Use
get-sync-statusto check if sync is in progress search-notes,list-notes, andlist-folderswill warn if sync is active- If you get incomplete results, wait a moment and retry
Shared Notes
- Use
list-shared-notesto find notes shared with collaborators update-noteanddelete-notewill warn when modifying shared notes- Changes to shared notes are immediately visible to all collaborators
Error Handling
| Error | Likely Cause |
| "Notes.app not responding" | Notes.app frozen or not running |
| "Note not found" | Title doesn't match exactly (case-sensitive) |
| Silent failure | Backslash not escaped in content |
| "Permission denied" | macOS automation permission needed |
| "iCloud sync in progress" | Wait and retry - results may be incomplete |
| "No checklist items found" | Note has no checklists, or Full Disk Access not granted |
Every error result (isError: true) also carries structuredContent.code: not_found, ambiguous, permission_denied, full_disk_access_missing, shortcut_not_installed, timeout_indeterminate, verification_failed, revision_conflict, validation_error, unsupported, notes_unavailable, or operation_failed. Prefer it over matching message text. When indeterminate is true, the write may or may not have happened: read the note by exact id before any retry. committed: false means nothing was written, so re-reading and retrying is safe. Input-schema rejections carry validation_error with committed: false; a Notes UUID or numeric key that could not be resolved carries not_found or full_disk_access_missing instead.
Every result that has structuredContent also ends with a text block structuredContent: {…} holding the same JSON on one line (#264), because some clients (Claude Desktop) give the model only text. Read contentHash, ids, code/committed/indeterminate and page.nextOffset from there when structuredContent is not visible. A value the text already shows in full is "[shown in full above]"; fields dropped for size are named in _omitted. The wrapper is src/utils/structuredText.ts, installed on the server before any tool registers, so new tools get it automatically.
Guided permissions check (CLI, for the user)
When a user is setting up the server or reports permission errors, you can suggest they run apple-notes-mcp setup --permissions in their terminal. It reports Full Disk Access, Automation of Notes.app, the Shortcut bridges, and Speech Recognition for the app that launched it, names the System Settings pane for each missing grant, opens panes only with --open, and re-checks when they press Enter. It sends no Apple event unless they add --probe-automation (never under --check or over SSH), so Automation reads unknown until then. setup --permissions --window shows the same checklist in a small window, once built with setup --permissions-window. It is a user-run command, not an MCP tool: the grants it sees belong to the app it runs in, which may differ from your MCP host. Inside the host, use doctor. Never tell the user a grant was changed; only they can change it in System Settings.
Recurring macOS permission prompts → offer the official-Node fix
If a user reports being repeatedly prompted for Full Disk Access or
Automation for "node" (especially after a brew upgrade), or that this MCP
loses its permissions every so often, the cause is almost always an ad-hoc
signed Node (typically Homebrew's) whose cdhash changes on every update, so
macOS TCC keeps treating it as a brand-new binary.
Detect it:
codesign -dvvv "$(which node)" 2>&1 | grep -E 'Signature=adhoc|TeamIdentifier=not set'If that matches (ad-hoc / no Team ID), offer to migrate this MCP to the
official Developer-ID-signed Node per
docs/NODE-RUNTIME-AND-TCC-PERMISSIONS.md:
install an official LTS Node to a stable path (e.g. ~/mcp-runtime/node-current),
repoint this server's command at it, and have the user grant the permission
once — it then persists across Node updates. Do not repoint npx-launched
servers that don't need Full Disk Access.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

