mcp-server-pypi

mcp-server-pypi

site icon
2025.04.30 0
Python邮件管理日程自动化交流协作日程管理
Gmail MCP Server 是一个 Python 包,用于将 Gmail 和 Google Calendar 与 Claude Desktop 集成。它允许用户总结电子邮件、发送电子邮件,并为重要电子邮件自动创建日历事件。
View on GitHub

Overview

基本能力

产品定位

Gmail MCP Server 是一个用于集成 Gmail 和 Google Calendar 的工具,旨在提升电子邮件和日程管理的效率。

核心功能

  • 总结 Gmail 收件箱中的最近邮件。
  • 直接从 Claude Desktop 发送电子邮件。
  • 手动或自动为标记为“重要”的电子邮件创建 Google Calendar 事件。
  • 作为后台服务器运行,每 10 分钟自动检查并创建日历事件。

适用场景

  • 需要自动化处理重要邮件的用户。
  • 需要快速总结邮件的用户。
  • 需要将邮件内容直接转换为日历事件的用户。

工具列表

  • gmail-mcp-server: 主服务工具,用于启动 Gmail 和 Google Calendar 的集成服务。

常见问题解答

  • 问题:如何配置 Gmail 和 Google Calendar API? 解答:需要在 Google Cloud Console 中启用相关 API,并下载 credentials.json 文件到指定目录。
  • 问题:如何与 Claude Desktop 集成? 解答:需要在 claude_desktop_config.json 中配置 gmail-mcp-server 的相关参数。

使用教程

使用依赖

安装前需要以下依赖:

pip install google-api-python-client google-auth-oauthlib mcp schedule

安装教程

  1. 安装包:
pip install gmail-mcp-server
  1. 配置 Google API:
  2. 在 Google Cloud Console 中启用 Gmail 和 Google Calendar API。
  3. 下载 credentials.json 并放置到 ~/.gmail_mcp_server/(Windows:C:\Users\<Username>\.gmail_mcp_server\)。
  4. 启动服务:
gmail-mcp-server

调试方式

  1. 检查服务是否正常运行:
ps aux | grep gmail-mcp-server
  1. 查看日志文件(如果有)以排查问题。
  2. 测试功能:
  3. 总结邮件:Summarize the last 3 emails in my inbox.
  4. 发送邮件:Send an email to [email protected] with subject "Test" and body "Hello".
  5. 创建日历事件:Create a calendar event for the last important email.

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。