apple-notes-mcp

by sirmews
Verified

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Allows reading from and interacting with Apple Notes database, including retrieving all notes, reading specific note content, and searching through notes

  • Integrates with the macOS file system to access Apple Notes database, requiring Full Disk Access permissions

适用于 Claude Desktop 的 Apple Notes 模型上下文协议服务器。

读取您本地的 Apple Notes 数据库并将其提供给 Claude Desktop。

现在,克劳德可以搜索您最容易忘记的笔记,并对您有更多的了解。

没有什么会出错。

成分

资源

该服务器实现了读取和写入您的 Apple Notes 的功能。

工具

服务器提供了多个提示:

  • get-all-notes :获取所有笔记。
  • read-note :获取特定注释的完整内容。
  • search-notes :搜索笔记。

缺少的功能:

  • 不处理加密笔记(ZISPASSWORDPROTECTED)
  • 不支持固定笔记过滤
  • 不处理云同步状态
  • 缺少附件内容检索
  • 不支持清单状态(ZHASCHECKLIST)
  • 无法创建或编辑笔记

快速入门

安装服务器

建议使用uv为 Claude 本地安装服务器。

uvx apple-notes-mcp

或者

uv pip install apple-notes-mcp

按照如下所述添加您的配置。

克劳德桌面

在 MacOS 上: ~/Library/Application\ Support/Claude/claude_desktop_config.json在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json

注意:您可能需要使用uv的直接路径。使用which uv来查找路径。

开发/未发布的服务器配置

"mcpServers": { "apple-notes-mcp": { "command": "uv", "args": [ "--directory", "{project_dir}", "run", "apple-notes-mcp" ] } }

已发布的服务器配置

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

Mac OS 磁盘权限

您需要授予服务器“完全磁盘访问权限”。这是因为 Apple Notes SQLite 数据库嵌套在 MacOS 文件系统的深处。

如果这让我更加烦恼或者我想开始添加/附加到 Apple Notes,我可能会在将来寻找 AppleScript 解决方案。

发展

构建和发布

准备分发包:

  1. 同步依赖项并更新锁文件:
uv sync
  1. 构建软件包分发版:
uv build

这将在dist/目录中创建源和轮子分布。

  1. 发布到 PyPI:
uv publish

注意:您需要通过环境变量或命令标志设置 PyPI 凭据:

  • 令牌: --tokenUV_PUBLISH_TOKEN
  • 或用户名/密码: --username / UV_PUBLISH_USERNAME--password / UV_PUBLISH_PASSWORD

调试

由于 MCP 服务器通过 stdio 运行,调试起来可能比较困难。为了获得最佳调试体验,我们强烈建议使用MCP Inspector

您可以使用以下命令通过npm启动 MCP Inspector:

npx @modelcontextprotocol/inspector uv --directory {project_dir} run apple-notes-mcp

启动后,检查器将显示一个 URL,您可以在浏览器中访问该 URL 以开始调试。

执照

本项目遵循 MIT 许可证。详情请参阅LICENSE文件。

源代码

源代码可在GitHub上找到。

贡献

通过Bluesky或打开问题向我发送您的想法和反馈。

-
security - not tested
A
license - permissive license
-
quality - not tested

允许 AI 从您的本地 Apple Notes 数据库读取(仅限 macOS)

  1. Components
    1. Resources
    2. Tools
    3. Missing Features:
  2. Quickstart
    1. Install the server
  3. Mac OS Disk Permissions
    1. Development
      1. Building and Publishing
      2. Debugging
    2. License
      1. Source Code
        1. Contributing
          ID: qjae8xanry