Skip to main content
Glama
Dan8Oren

mcp-apple-notes

by Dan8Oren

MCP Apple Notes

MCP Apple Notes

mcp-apple-notes MCP server

一个 Model Context Protocol (MCP) 服务器,支持对你的 Apple Notes 进行语义搜索和 RAG(检索增强生成)。适用于任何兼容 MCP 的客户端,如 Claude Desktop、Cursor、Windsurf、Cline 等。

MCP Apple Notes Demo

功能特性

  • 🔍 使用 all-MiniLM-L6-v2 本地嵌入模型对 Apple Notes 进行语义搜索

  • 📝 全文搜索能力

  • 📂 文件夹支持 — 列出文件夹、按文件夹浏览、按文件夹过滤搜索

  • 📊 使用 LanceDB 进行向量存储

  • 🤖 适用于任何兼容 MCP 的客户端(Claude、Cursor、Windsurf、Cline 等)

  • 🍎 通过 JXA 原生集成 Apple Notes

  • 🔒 可选的 只读模式,安全探索

  • 🏃♂️ 完全本地执行 — 无需 API 密钥

Related MCP server: MCP Apple Notes

安全与透明度

由于此服务器会与你的私有 Apple Notes 交互,因此其设计核心是绝对的透明度。它 100% 在你的 Mac 本地运行。

  • 无云端,无遥测 — 无需 API 密钥,数据不会离开你的机器。

  • 原生 Apple JXA — 使用 Apple 官方的 JavaScript for Automation 脚本桥。

  • 本地嵌入all-MiniLM-L6-v2 模型通过 @huggingface/transformers 在本地运行。

  • 可验证 — 强烈建议你在使用前阅读每一行代码(特别是 index.ts)。

  • GitHub 发布版本 包含 SHA-256 校验和,以便你验证下载的制品。

安装与设置

选择适合你工作流的安装方法。


方法 1:从源码安装(推荐)

通过在本地克隆仓库,你可以检查源代码并确切了解机器上正在执行的操作。

先决条件: Node.js (v18+) 或 Bun

git clone https://github.com/Dan8Oren/mcp-apple-notes && cd mcp-apple-notes && bun install
{
  "mcpServers": {
    "apple-notes": {
      "command": "bun",
      "args": ["run", "/path/to/mcp-apple-notes/index.ts"]
    }
  }
}

使用 NPM:

git clone https://github.com/Dan8Oren/mcp-apple-notes && cd mcp-apple-notes && npm install

然后将服务器添加到你的 MCP 客户端配置中。将 /path/to/mcp-apple-notes 替换为你克隆仓库的路径:

{
  "mcpServers": {
    "apple-notes": {
      "command": "npx",
      "args": ["tsx", "/path/to/mcp-apple-notes/index.ts"]
    }
  }
}

提示: 想无风险尝试?启用 只读模式 以在探索时阻止所有写入操作。 "env": { "MCP_APPLE_NOTES_READ_ONLY": "1" }


方法 2:通过 npx 快速启动

如果你更喜欢零配置方式并信任已发布的 npm 包,可以直接将其添加到你的 MCP 配置中:

{
  "mcpServers": {
    "apple-notes": {
      "command": "npx",
      "args": ["-y", "@dan8oren/mcp-apple-notes"]
    }
  }
}

设置完成后,重启你的客户端并让 AI 助手 "index my notes"(索引我的笔记)即可开始。

各客户端说明

  1. 打开 Settings → Developer → Edit Config

  2. 将你选择的 JSON 配置粘贴到 claude_desktop_config.json

  3. 重启 Claude Desktop

日志:

tail -n 50 -f ~/Library/Logs/Claude/mcp-server-apple-notes.log
# npm version:
claude mcp add apple-notes npx -- -y @dan8oren/mcp-apple-notes
# or from source:
claude mcp add apple-notes npx -- tsx /path/to/mcp-apple-notes/index.ts

将 JSON 配置添加到 ~/.cursor/mcp.json(全局)或项目根目录下的 .cursor/mcp.json

将 JSON 配置添加到 ~/.windsurf/mcp.json

可用工具

工具

描述

index-notes

索引所有笔记以进行语义搜索。请先运行此项

list-folders

列出所有 Apple Notes 文件夹及其路径和笔记数量

list-notes

列出带有元数据的笔记。可选 path 过滤器和 includeContent 标志

search-notes

语义 + 全文搜索,带有可选的路径过滤器和限制

get-note

通过 noteId 或标题获取完整内容。存在歧义时返回候选列表

create-note

创建带有 Markdown 内容的新笔记,可选择放入文件夹

edit-note

编辑现有笔记的标题和/或内容(Markdown)

append-to-note

将 Markdown 内容追加到现有笔记

move-note

将笔记移动到其他文件夹

delete-note

删除笔记(移至“最近删除”)

验证机制

每一个 Apple Notes 操作都是一个 JXA 调用,你可以在 index.ts 中检查。没有网络请求,没有后台同步 — 只有本地脚本桥调用。

只读模式

需要安全保障?启用只读模式以阻止所有写入操作 — 仅可使用搜索、列表和读取工具:

{
  "mcpServers": {
    "apple-notes": {
      "command": "npx",
      "args": ["-y", "@dan8oren/mcp-apple-notes"],
      "env": { "MCP_APPLE_NOTES_READ_ONLY": "1" }
    }
  }
}

启用后,仅以下工具可用:index-noteslist-folderslist-notessearch-notesget-note

详细模式

启用详细日志记录以在执行前查看每个 JXA 调用(记录到 stderr):

CLI 标志 — 在你的 MCP 客户端配置参数中添加 --verbose

{
  "mcpServers": {
    "apple-notes": {
      "command": "npx",
      "args": ["--verbose", "-y", "@dan8oren/mcp-apple-notes"]
    }
  }
}

环境变量 — 针对支持 env 的客户端:

{
  "mcpServers": {
    "apple-notes": {
      "command": "npx",
      "args": ["-y", "@dan8oren/mcp-apple-notes"],
      "env": { "MCP_APPLE_NOTES_VERBOSE": "1" }
    }
  }
}

JXA 操作参考

操作

类型

作用

getNotes

读取

列出所有笔记(id、标题、文件夹路径)

getFolders

读取

列出所有文件夹及其路径和笔记数量

getNotesByPath

读取

获取特定文件夹中的笔记

getNoteDetailsById

读取

通过 ID 获取单条笔记的完整内容

createNote

写入

创建带有标题和内容的新笔记

appendToNote

写入

将 HTML 内容追加到现有笔记

editNote

写入

更新笔记的标题和/或内容

moveNote

写入

将笔记移动到其他文件夹

deleteNote

破坏性

将笔记移至“最近删除”

所有操作均通过 Apple 的 JXA 脚本桥 (Application('Notes')) 进行。没有直接的文件系统访问,没有网络调用。delete 操作并非永久删除 — 笔记会进入“最近删除”,可在 30 天内恢复。

响应格式

工具响应是具有统一结构的 JSON 对象:

  • 成功:{ "ok": true, "data": ... }

  • 错误:{ "ok": false, "error": { "type": "...", "message": "..." } }

大多数面向笔记的响应现在都包含稳定的 Apple Notes id,以便客户端可以在重命名和移动操作后安全地跟踪笔记。

致谢

最初基于 RafalWilinski/mcp-apple-notes

Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
2Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    C
    maintenance
    A Model Context Protocol server that enables semantic search and retrieval of Apple Notes content, allowing AI assistants to access, search, and create notes using on-device embeddings.
    2,673
    2
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    A local-only server that enables AI agents to create, read, search, and organize Apple Notes directly on macOS. It supports folder management, note formatting, and checklists using native automation to ensure data remains private and local.
    24
    10

View all related MCP servers

Related MCP Connectors

  • Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.

  • Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.

  • Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dan8Oren/mcp-apple-notes'

If you have feedback or need assistance with the MCP directory API, please join our Discord server