Apple Notes MCP

MCP-сервер для Apple Notes с семантическим поиском и CRUD-операциями. Claude ищет, читает, создаёт, обновляет и управляет вашими заметками Apple Notes через естественный язык.

Документация

apple-notes-mcp

npm version npm downloads License: MIT macOS Bun Claude

MCP server for Apple Notes with semantic search and CRUD operations. An MCP client such as Claude Code can search, read, create, update, and organise your Apple Notes.

  • Hybrid search (vector + full-text, Reciprocal Rank Fusion) over chunked notes
  • Incremental and background indexing
  • Knowledge graph from #tags and [[wiki links]]
  • Create, update, delete, move, batch operations, and table cell edits
  • Local (HuggingFace Transformers) or OpenRouter embeddings
  • Read-only mode

Release notes: CHANGELOG.md. Some upgrades require running index-notes with mode: "full"; the changelog says when.

Requirements

  • macOS on Apple Silicon (LanceDB has no native build for Intel Macs)
  • Bun >= 1.1.0. The executables run with Bun, so npm installs need Bun on PATH too.
  • Apple Notes, with automation permission granted when macOS asks

Installation

npm install -g @disco_trooper/apple-notes-mcp
apple-notes-mcp

The first run in a terminal starts the setup wizard: embedding provider, read-only mode, auto-indexing, Claude Code integration, and an initial index. Run apple-notes-mcp-setup later to change settings.

From source:

git clone https://github.com/disco-trooper/apple-notes-mcp.git
cd apple-notes-mcp
bun install
bun run setup

Claude Code setup

The setup wizard adds the server to ~/.claude.json (the existing file is backed up to ~/.claude.json.bak). To add it by hand:

{
  "mcpServers": {
    "apple-notes": {
      "command": "apple-notes-mcp",
      "args": [],
      "env": {}
    }
  }
}

For a source checkout, use "command": "bun" and "args": ["run", "/path/to/apple-notes-mcp/src/index.ts"]. Run the setup wizard once first; the server needs ~/.apple-notes-mcp/.env. Restart Claude Code after setup.

Configuration

Settings live in ~/.apple-notes-mcp/.env. Variables in the MCP client's env block take precedence. Invalid values stop the server at startup.

VariableDescriptionDefault
OPENROUTER_API_KEYUse OpenRouter for embeddings (sk-or-...)-
EMBEDDING_MODELEmbedding modellocal Xenova/multilingual-e5-small, OpenRouter qwen/qwen3-embedding-8b
EMBEDDING_DIMSOpenRouter only; sent as dimensions only when set (4096 expected otherwise)-
READONLY_MODEHide and block tools that write to Apple Notes (true/false/1/0)false
INDEX_TTLSeconds after which a search first runs an incremental index; unset or 0 disables-
SEARCH_REFRESH_TIMEOUT_MSMax wait for that refresh before searching the current index2000
INDEX_JOB_RETENTION_SECONDSHow long finished index jobs stay queryable3600
EMBEDDING_BATCH_SIZETexts per embedding batch50
NOTES_FETCH_BATCH_SIZENotes per Apple Notes fetch batch100
JXA_TIMEOUT_MSTimeout for a single Apple Notes script120000
NOTES_TRASH_FOLDERName of the "Recently Deleted" folder when Apple Notes uses a localized name the server does not recognise-
DEBUGDebug logging to stderr (true/false/1/0)false

See docs/models.md for embedding models.

Tools

Notes are addressed as Title, Folder/Title, Account/Folder/Title, or id:xxx. When several notes match, the tool returns an error listing id: values to use.

CategoryToolPurpose
Searchsearch-notesHybrid, keyword, or semantic search with optional folder filter
Readlist-notesList notes sorted by date or title; without parameters, show index statistics
Readget-noteFull note content as Markdown (optionally HTML)
Readget-tablesTables in a note as rows of cells
Readlist-foldersAll folders
Indexindex-notesIncremental or full index run, optionally in the background
Indexstart-index-jobStart a background index job
Indexget-index-jobStatus and progress of a job
Indexlist-index-jobsRecent jobs
Indexcancel-index-jobCancel a running job
Indexreindex-noteRe-index one note
Indexpurge-indexDelete the local index (requires confirm: true)
Graphlist-tagsTags with occurrence counts
Graphsearch-by-tagNotes with a tag
Graphrelated-notesNotes related by tags, links, or similarity
Graphexport-graphExport the graph as JSON or GraphML
Writecreate-noteCreate a note from Markdown
Writeupdate-noteReplace a note's content
Writedelete-noteDelete a note (requires confirm: true)
Writemove-noteMove a note to another folder
Writeedit-tableEdit table cells without rewriting the note
Writebatch-deleteDelete several notes or a whole folder (requires confirm: true)
Writebatch-moveMove several notes or a whole folder

Write tools are not registered when READONLY_MODE is on. After each write the index is updated for the affected notes; if that fails, the response includes an index sync warning. While an index run is in progress, the update is queued and the write returns right away.

For large libraries, run index-notes with background: true and follow the job with get-index-job. A foreground run sends progress notifications to clients that request them.

Troubleshooting

  • JXA errors or timeouts: make sure Apple Notes is running and the terminal or MCP client has automation permission (System Settings → Privacy & Security → Automation). For very large folders, lower NOTES_FETCH_BATCH_SIZE or raise JXA_TIMEOUT_MS.
  • "Embedding model changed": the index was built with another model or dimensions. Run purge-index, then index-notes with mode: "full".
  • Skipped notes: locked or still-syncing notes cannot be read. Unlock them or wait for iCloud sync, then reindex.
  • Slow first search: the local model is downloaded and loaded on first use.
  • Write tools missing or "tool not found": READONLY_MODE is on. Set READONLY_MODE=false and restart the client.

Development

bun run check          # type check
bun run test           # tests (vitest; do not use `bun test`)
bun run test:coverage  # tests with coverage
bun run dev            # watch mode
DEBUG=true bun run start

License

MIT