Token导航 LogoToken导航TokenDH.com
Enhanced MCP Server logo
日程管理stdio官方级别未说明来源级核验

Enhanced MCP Server

MCP Server

一个集成谷歌服务(如Gmail、日历、Drive、Sheets和Docs)并提供80多种操作工具的服务,适用于需要高效管理谷歌工作空间的用户。

工具数

26

提示词数

0

GitHub Stars

0

资源数

0
办公自动化PythonClaudeClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

pbulbule13

提供方

pbulbule13

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -r requirements.txt

详细介绍

Google服务的MCP服务器

一种模型上下文协议(MCP)服务器,将谷歌服务与克劳德桌面集成在一起。为Gmail、日历、驱动器、表格和文档操作提供80多种工具。

特性

  • Gmail:搜索、阅读、发送、回复、标记和组织电子邮件
  • 谷歌日历:创建、更新、删除事件;查找空闲插槽
  • Google 云端硬盘:搜索、列出、读取文件和文件夹
  • 谷歌表格:读取、写入、附加数据;管理电子表格
  • 谷歌文档:创建和阅读文档
  • 存储器系统:上下文和偏好的持久存储
  • 数据库支持:可选的PostgreSQL和MongoDB集成

项目结构

mcpwithgoogle/
├── src/
│   ├── mcp_server.py      # Main MCP server (80+ tools)
│   ├── google_auth.py     # OAuth authentication
│   ├── google_gmail.py    # Gmail operations
│   ├── google_calendar.py # Calendar operations
│   ├── google_drive.py    # Drive operations
│   ├── google_sheets.py   # Sheets operations
│   ├── google_docs.py     # Docs operations
│   ├── memory_system.py   # Persistent memory
│   ├── local_storage.py   # Local data storage
│   └── setup.py           # OAuth setup script
├── config/
│   └── claude_desktop_config.json  # Example Claude config
├── scripts/
│   └── setup_my_profile.py
├── config.example.json    # Google OAuth config template
├── authenticate.py        # Authentication script
├── requirements.txt
├── .env.example
└── README.md

先决条件

  • Python 3.8+
  • 克劳德桌面版
  • 启用API的谷歌云项目:

- Gmail API - 谷歌日历API - Google Drive API - 谷歌网页API

安装

步骤1:克隆存储库

git clone https://github.com/pbulbule13/mcpwithgoogle.git
cd mcpwithgoogle

步骤2:安装依赖项

pip install -r requirements.txt

步骤3:谷歌云设置

  1. 首选 谷歌云控制台
  2. 创建新项目或选择现有项目
  3. 启用以下API:

- Gmail API - 谷歌日历API - Google Drive API - 谷歌网页API

  1. 首选 凭证 > 创建凭据 > OAuth 2.0客户端ID
  2. 选择 桌面应用 作为应用程序类型
  3. 下载凭据并另存为 credentials.json 在项目根中

步骤4:配置

# Copy example config
cp config.example.json config.json

# Edit with your Google OAuth credentials

config.json:

{
  "google": {
    "clientId": "YOUR_CLIENT_ID.apps.googleusercontent.com",
    "clientSecret": "YOUR_CLIENT_SECRET",
    "redirectUri": "http://localhost",
    "calendarId": "primary"
  }
}

步骤5:使用Google进行身份验证

python authenticate.py

这将打开Google OAuth浏览器。授权后,令牌将保存在本地。

步骤6:配置Claude桌面

编辑您的Claude Desktop配置文件:

操作系统路径
窗户%APPDATA%\Claude\claude_desktop_config.json
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Linux~/.config/Claude/claude_desktop_config.json

添加:

{
  "mcpServers": {
    "google-workspace": {
      "command": "python",
      "args": [
        "C:\\path\\to\\mcpwithgoogle\\src\\mcp_server.py"
      ],
      "env": {},
      "cwd": "C:\\path\\to\\mcpwithgoogle"
    }
  }
}

重要提示: 替换 C:\\path\\to\\ 你的实际绝对路径。

步骤7:重新启动克劳德桌面

  1. 完全退出Claude Desktop(检查系统托盘)
  2. 重新启动克劳德桌面
  3. 工具将自动可用

验证安装

在Claude Desktop中,键入:

Show me available tools

您应该看到列出了80多种工具。

可用工具

电子邮件工具

  • search_emails -使用查询搜索Gmail
  • get_email -通过ID获取电子邮件
  • send_email -发送新电子邮件
  • reply_to_email -回复电子邮件
  • list_labels -列出Gmail标签
  • create_label -创建新标签
  • move_to_label -将电子邮件移动到标签

日历工具

  • get_calendar_events -列出事件
  • create_calendar_event -创建事件
  • update_calendar_event -更新事件
  • delete_calendar_event -删除事件
  • find_free_slots -查找可用时间

驱动工具

  • search_drive -搜索文件
  • list_drive_files -列出文件夹中的文件
  • get_file_content -读取文件内容
  • create_folder -创建文件夹

图纸工具

  • read_sheet -读取电子表格数据
  • write_sheet -写入电子表格
  • append_sheet -添加行
  • create_sheet -创建新的电子表格

文档工具

  • create_doc -创建文档
  • read_doc -读取文档内容

内存工具

  • remember -店铺信息
  • recall -检索信息
  • forget -删除信息
  • list_memories -列出所有存储的项目

示例用法

在克劳德桌面中:

"Show my unread emails from today"
"Schedule a meeting tomorrow at 2 PM with john@example.com"
"Find documents about 'project proposal' in my Drive"
"What meetings do I have this week?"
"Remember that my favorite color is blue"

故障排除

MCP服务器未出现

  1. 验证中的路径 claude_desktop_config.json 绝对正确
  2. 确保Python在您的系统PATH中
  3. 完全重新启动克劳德桌面
  4. 检查Claude Desktop日志是否有错误

身份验证错误

  1. 删除 tokens.json 并重新运行 python authenticate.py
  2. 验证 credentials.json 存在于项目根目录中
  3. 查看Google云控制台以了解API配额问题

导入错误

pip install --upgrade -r requirements.txt

安全须知

  • 永不承诺 credentials.json, tokens.json,或 config.json 转git
  • .gitignore 默认情况下,文件不包括敏感文件
  • 尽可能将API密钥存储在环境变量中

许可证

MIT许可证

目录标签

目录标签

办公自动化PythonClaude谷歌服务集成本地部署电子邮件管理日历管理文件管理

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

oauth

部署方式(deploymentType,部署类型)

remote-capable

工具数量(toolCount,工具数)

26

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiooauthremote-capable

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP