Retrieved article excerpt
Open article ยท Retrieved 2026-10-23T01:28:21.534081+00:00
# Apple Notes MCP
**English** | [็ฎไฝไธญๆ](https://github.com/xiaofeng-han/apple-notes-mcp/blob/main/README.zh-CN.md)
An MCP server that lets AI agents (Claude Code, Codex, Grok Build, OpenCode, Gemini CLI, pi, โฆ) read and edit Apple Notes on macOS, with native formatting. Every tool is also a command-line command, so an agent can use a skill instead of the server. Its settings window finds the agents on your Mac and sets each one up either way with one click, installing the ones you are missing.
- **Reading** goes through Notes' own data model, with its database opened read-only: titles, headings, lists, checklists (ticked or not), tables, links, highlights (with their colors), tags, links to other notes, divider lines and attachments all come out as Markdown. Search also finds the text Notes recognized in images, scans and handwriting, and the transcripts of recordings.
- **Editing** happens in place, through Notes' private NotesShared framework, the way Notes itself edits: only what changed is written, character by character, so everything Markdown cannot show (colors, fonts, alignment) stays as it was, and edits made on other devices merge. Every change is rehearsed on a copy first and read back afterwards.
- **Syncing**: Notes does not upload changes made this way by itself, so after each change the server asks Notes (through AppleScript) to save and upload the note, and waits until iCloud has it. Notes never comes to the front.
Requires macOS 26 or later on Apple silicon; developed and tested on macOS 27.0.1. All code is written for this project, with no third-party dependencies. The permissions it needs are Full Disk Access (to read the Notes database) and Automation โ Notes (to upload, move and delete).
## Tools
| Tool | What it does |
| --- | --- |
| `overview` | The folders with note counts, the smart folders and the tags; or the notes one per line (id, version, title, date, size, attachments, description) of a folder, a smart folder or Recently Deleted, narrowed by dates, tags, groups (`only`: pinned, shared, locked, quick-notes, math-notes, calls, checklists, unchecked, tagged, untagged, mentions) and attachment kinds, sorted by modified, created, last opened or title. `undescribed: true` lists notes that still need a description, with their opening text |
| `search` | Full-text search of titles, text and the text Notes found in attachments (recognized in images and scans, handwriting, recording transcripts), best matches first, with the text around each match; with the same narrowing as `overview` |
| `read_note` | A note as Markdown with its version: by id, several ids, or exact title; one section, or an outline with each section's size. The header says whether it is pinned or shared, and which notes link to it |
| `read_attachment` | An attachment from a `` placeholder: images (scaled), scan pages, drawings, PDFs (text and file), audio (recordings with Notes' transcript and summary), a frame of a video, tables, links and files, with any text Notes recognized in it |
| `describe_note` | Saves one-line descriptions that `overview` shows, many notes per call |
| `create_note` | A new note from Markdown, in any folder, attaching files and link cards; or a copy of a note with everything in it (`copy_of`) |
| `edit_note` | Several changes in one call: exact replacements, Markdown inserted at the start, the end or under a heading (list items join that section's list), or a whole rewrite; ticking or unticking checklist items by their text, ticking or unticking them all, moving ticked items to the bottom or deleting them; pinning |
| `move_note` | Moves a note, or several, to another folder of its account, or back out of Recently Deleted |
| `delete_note` | Moves a note, or several, to Recently Deleted |
| `manage_folder` | Creates, renames, moves (into another folder, or to the top level) or deletes a folder (an empty one, or with `recursive` and `expected_notes` everything in it); creates, renames or deletes a smart folder of the notes with some tags; exports a folder and its folders as Markdown with the original attachments, to a new folder or a `.zip` |
| `manage_tag` | Renames a tag in every note that has it, or takes it out of every note (with `expected_notes`) |
### Markdown
One note paragraph is one Markdown line, so a model can change a line without anything else moving.
| In Notes | In Markdown |
| --- | --- |
| Title, heading, subheading | `#` , `##` , `###` |
| Bulleted, dashed, numbered list | `*` , `-` , `1.` (two spaces per indent level) |
| Checklist | `- [ ]` / `- [x]` |
| Block quote | `>` per level |
| Monospaced | lines between ```` ``` ```` |
| Bold, italic, strikethrough | `**โฆ**`, `*โฆ*`, `~~โฆ~~` |
| Underline, highlight | `<u>โฆ</u>`, `<mark>โฆ</mark>` (purple); `<mark class="pink">โฆ</mark>` for pink, orange, mint, blue |
| Link | `[text](url)` |
| Tag | `#name` (a real Notes tag; literal text that would read as one is written `\#name`) |
| Link to a note | `[text](note:1A2B3C4D)`; empty text takes the note's title |
| Divider line | `---` alone on a line |
| Table | `| a | b |` rows; `<br>` for a line break in a cell |
| Attachment | `` (a placeholder to keep in place) |
| New file, new link card | `` (also `~/โฆ` or `file://โฆ`); `` |
### Rules
- Every change to a note (`edit_note`, `move_note`, `delete_note`) needs the `version` that `read_note`, `overview` or `search` gave, a hash of the note as Markdown. If the note changed since it was read (on another device, or by another agent), the change is refused instead of overwriting that change; each write answers with the new version. Before every edit the note's stored body is saved under `~/Library/Application Support/AppleNotesMCP/backups/<note id>/` (the last 20).
- Attachments stay where they are: an edit that would drop a placeholder, or add one that is not in the note, is refused. Tables, tags, links to notes and divider lines are the exception: they can be added and removed, like text. New files and link cards come from `` and ``; a file is taken only from the home folder (not `~/Library` or a hidden folder), a temporary folder or an external drive, because this app can read every file.
- A smart folder holds no notes of its own: `overview` and `search` take it to list or search the notes its rule picks, and no note can be moved into it.
- Locked notes cannot be read or changed. Shared notes can be edited (the edits merge with the other people's), but are not deleted here, and a move into or out of a shared folder needs `allow_shared` (after asking the user).
- `delete_note` and a recursive folder delete only move notes to Recently Deleted, and refuse a note already there (deleting it again would erase it for good). A recursive delete needs `expected_notes`, the number of notes the caller saw, and checks everything before it changes anything.
- An export goes only to a path that does not exist yet, outside `~/Library`.
- Any tool can be turned off for all AI assistants in the settings window (see [Choosing the tools](https://github.com/xiaofeng-han/apple-notes-mcp#choosing-the-tools)).
## Command line
Every tool is also a command, so the app works from a terminal and from an agent's shell, which is what the [skill](https://github.com/xiaofeng-han/apple-notes-mcp#server-or-skill) uses. A command is a noun and a verb. Its flags come from the tool's input fields, so they are the fields of the tools above. `apple-notes-mcp help` prints the whole tree:
```
apple-notes-mcp
โโโ --stdio Serve MCP on stdin and stdout (what agents start)
โโโ --settings Open the settings window (also what opening the app does)
โโโ --self-check Print a diagnosis
โโโ --version Print the version
โโโ help [COMMANDโฆ] This tree, or a command's flags (also --help, -h)
โโโ setup Ask to control Notes, and show where to give Full Disk Access
โโโ skill Print the SKILL.md that teaches an agent this command line
โโโ agents
โ โโโ list Which agents are here and set up (the default)
โ โ [--skill] [--folder DIR]
โ โโโ set-up (IDโฆ | --all) Register the server with them, or install the skill
โ โ [--restart] [--skill] [--folder DIR]
โ โโโ install IDโฆ Install them, then set them up
โ [--dry-run] [--restart] [--skill] [--folder DIR]
โโโ notes
โ โโโ list List notes, newest first, one line each (id | version | title | date | size | description) (the default)
โ โ --folder string --tag stringโฆ --only stringโฆ --attachment stringโฆ --modified-after string
โ โ --modified-before string --created-after string --created-before string
โ โ --sort modified|created|title|opened --[no-]undescribed --limit int
โ โโโ search QUERY Full-text search of titles, text and the text Notes found in attachments, best matches first
โ โ --match all|any --folder string --tag stringโฆ --only stringโฆ --attachment stringโฆ
โ โ --modified-after string --modified-before string --created-after string --created-before string
โ โ --sort modified|created|title|opened --limit int
โ โโโ read [ID] Print notes as Markdown, each with the version that notes edit takes
โ โ --id stringโฆ --title string --section string --[no-]outline
โ โโโ create MARKDOWN Create a note from Markdown; its first line is the title
โ โ --folder string
โ โโโ copy ID Copy a note with everything in it, into its own folder or --folder
โ โ --folder string
โ โโโ edit ID --version string Change a note in one go: --replace pairs, --insert Markdown, or --rewrite the whole note; --[no-]pinned
โ โ --replace json --insert string --at string --rewrite string --check stringโฆ --uncheck stringโฆ
โ โ --checklist check_all|uncheck_all|move_checked_down|delete_checked --[no-]pinned
โ โโโ delete [ID] Move a note to Recently Deleted (notes move brings it back; notes list --folder "Recently Deleted" lists them)
โ โ --notes json --version string
โ โโโ move [ID] FOLDER Move a note to another folder, or back from Recently Deleted
โ โ --[no-]allow-shared --notes json --version string
โ โโโ describe --descriptions json Save one-line descriptions of notes, which notes list shows; many notes at once
โโโ tags
โ โโโ rename TAG NAME Rename a tag in every note that has it
โ โโโ delete TAG --expected-notes int Take a tag out of every note that has it (ask the user first); the notes stay
โโโ attachments
โ โโโ read ID Open an attachment from a  placeholder: print its text, save its images, audio and files
โ --[no-]text-only --output-dir string
โโโ folders
โ โโโ list The folders, with how many notes each holds (the default)
โ โ --depth int
โ โโโ create PATH Create a folder; a path such as Projects/Ideas makes it inside another
โ โ --tag stringโฆ --match any|all
โ โโโ rename FOLDER NAME Rename a folder
โ โ --[no-]allow-shared
โ โโโ move FOLDER INTO Move a folder into another, or to the top level with ""
โ โ --[no-]allow-shared
โ โโโ delete FOLDER Delete an empty folder, or with --recursive --expected-notes N everything in it (ask the user first)
โ โ --[no-]recursive --expected-notes int
โ โโโ export FOLDER TO Write a folder and its folders as Markdown with the original attachments, to a new folder or .zip
โโโ call TOOL [JSON | -] Run any tool on a JSON object of its arguments; call alone lists the tools
```
- **Flag names:** a field's flag has dashes for underscores, so `modified_after` is `--modified-after`.
- **True-or-false fields:** `--outline` tur