Back to MCP directory
publicPublicdnsLocal runtime

mcp-apple-notes

一个基于MCP协议的本地服务器,实现Apple Notes的语义搜索和RAG功能,供Claude等AI助手调用

article

README

🚀 MCP 苹果笔记服务器

MCP 苹果笔记服务器是一个支持语义搜索和 RAG(增强检索生成)的 模型上下文协议 (MCP) 服务器。借助它,AI 助手(如Claude)能够在对话中搜索并引用您的苹果笔记,为您带来更智能、便捷的笔记使用体验。

MCP Apple Notes MCP Apple Notes

✨ 主要特性

  • 🔍 使用 all-MiniLM-L6-v2 在设备上的嵌入模型进行语义搜索。
  • 📝 具备全文搜索功能。
  • 📊 向量存储采用 LanceDB
  • 🤖 是与 AI 助手集成的 MCP 兼容服务器。
  • 🍎 通过 JXA 实现原生苹果笔记整合。
  • 🏃♂️ 完全本地执行,无需 API 密钥。

📦 安装指南

先决条件

安装步骤

  1. 克隆仓库:
git clone https://github.com/RafalWilinski/mcp-apple-notes
cd mcp-apple-notes
  1. 安装依赖项:
bun install

💻 使用示例

基础用法

  1. 打开 Claude 桌面应用,转到设置 -> 开发者 -> 编辑配置。 Claude Desktop Settings
  2. 打开 claude_desktop_config.json 并添加以下条目:
{
  "mcpServers": {
    "local-machine": {
      "command": "/Users/<YOUR_USER_NAME>/.bun/bin/bun",
      "args": ["/Users/<YOUR_USER_NAME>/apple-notes-mcp/index.ts"]
    }
  }
}

⚠️ 重要提示

需将 <YOUR_USER_NAME> 替换为您实际的用户名。

  1. 重启 Claude 桌面应用。您应该看到如下界面: Claude MCP Connection Status
  2. 开始索引您的笔记。通过告诉 Claude“索引我的笔记”或“索引我的苹果笔记”来开始索引。

📚 详细文档

故障排除

查看日志:

tail -n 50 -f ~/Library/Logs/Claude/mcp-server-local-machine.log
# 或者
tail -n 50 -f ~/Library/Logs/Claude/mcp.log

待办事项

  • [ ] 苹果笔记以 HTML 格式返回。我们应将其转换为 Markdown 并嵌入。
  • [ ] 使用递归文本分割器或 Markdown 文本分割器对源内容进行分块。
  • [ ] 添加使用自定义嵌入模型的选项。
  • [ ] 更多数据库控制 - purge、自定义查询等。
  • [x] 通过 Claude 存储笔记。
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client