Google Keep笔记管理服务

一个连接Google Keep和Claude的Model Context Protocol (MCP)服务器,提供完整的笔记管理功能。

  • by anmolsahu2k
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 anmolsahu2k/Google-Keep-MCP

使用说明

谷歌保留MCP服务器

一个模型上下文协议(MCP)服务器,将Google Keep连接到Claude,为其提供完整的笔记管理功能。

使用非官方 gkeepapi 库——以编程方式访问Google Keep的唯一可行方法。

特性

20工具 分为5类:

类别 工具
搜索与检索 find, get_note, list_note_media
注意CRUD create_note, create_list, update_note, set_note_color, delete_note, restore_note
注释状态 pin_note, archive_note, trash_note
检查表 add_list_item, update_list_item, delete_list_item
标签 list_labels, create_label, delete_label, add_label_to_note, remove_label_from_note

设置

1.安装

make install

2.获取Google Master Token

谷歌不再允许程序化登录。您需要从浏览器会话中提取令牌:

  1. 打开Chrome浏览器并转到 https://accounts.google.com/EmbeddedSetup
  2. 使用您的Google帐户登录,然后单击“我同意” (页面可能会永远显示加载屏幕——没关系)
  3. 打开DevTools(Cmd+Option+I 在Mac上, F12 在Windows/Linux上)
  4. 首选 应用程序>Cookie>accounts.google.com
  5. 查找名为的cookie oauth_token 并复制其值(以开头 oauth2_4/...)
  6. 运行辅助脚本 立即 (该代币为一次性使用,寿命较短):
uv run python scripts/get_token.py

它返回的主令牌 不会过期你只需要做一次。

3.配置克劳德桌面

添加 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "google-keep": {
      "command": "/path/to/uv",
      "args": ["--directory", "/path/to/Google Keep MCP", "run", "keep-mcp"],
      "env": {
        "GOOGLE_EMAIL": "you@gmail.com",
        "GOOGLE_MASTER_TOKEN": "aas_et/..."
      }
    }
  }
}

使用完整路径 uv (奔跑 which uv 找到它)。Claude Desktop不继承您的shell PATH。

保存后重新启动Claude Desktop。

安全

默认情况下,写入操作仅适用于具有 keep-mcp 标签。通过服务器创建的笔记会自动获得此标签。

这可以防止克劳德意外修改您现有的笔记。

允许修改 全部 注意,添加到env中:

"UNSAFE_MODE": "true"

附加安全门:

  • delete_note (永久删除)需要 UNSAFE_MODE=true
  • delete_label (全球破坏性)要求 UNSAFE_MODE=true
  • trash_note 始终可用作安全、可逆的替代方案

发展

make install      # install dependencies
make start        # run server (stdio)
make start-sse    # run server (SSE for remote use)
make test         # run unit tests
make smoke        # run integration tests (needs credentials)
make lint         # check code style
make format       # auto-fix code style

环境变量

变量 必填 描述
GOOGLE_EMAIL 是 您的Google帐户电子邮件
GOOGLE_MASTER_TOKEN 是 设置步骤2中的主令牌
UNSAFE_MODE 否 设置为 true 允许修改所有笔记