增强版 Gmail MCP 服务器是一个强大且功能丰富的模型上下文协议(MCP)服务器,由 Python 编写,可与 Gmail 集成。它能让 AI 助手(如 Claude)通过自然语言与 Gmail 交互,提供全面的电子邮件管理功能。
# 克隆仓库
git clone https://github.com/theposch/gmail-mcp.git
cd gmail-mcp
# 设置虚拟环境
python -m venv .venv
source .venv/bin/activate # 在 Windows 上:.venv\Scripts\activate
# 安装包
pip install -e .
编辑配置文件 config.py:
# 配置 Gmail 帐户信息
GMAIL_ACCOUNT = 'your_email@gmail.com'
GMAIL_PASSWORD = 'your_password'
# 配置 OAuth 2.0 凭证路径
CREDENTIALS_FILE = 'path/to/credentials.json'
运行以下命令启动 MCP 服务器:
python server.py
欢迎贡献!请随意提交 Pull Request。
git checkout -b feature/amazing-feature)git commit -m '添加一些神奇的功能')git push origin feature/amazing-feature)本项目根据 GPL-3.0 许可证发布 - 请查看 LICENSE 文件了解详细信息。