systemprompt-mcp-google
一个专用的模型上下文协议 (MCP) 服务器,可将 Google 服务(Gmail、Google 日历等)集成到您的 AI 工作流程中。该服务器支持通过 MCP 无缝访问 Google 服务,从而使 AI 代理能够与 Gmail、Google 日历和其他 Google 服务进行交互。
演示
先决条件
在使用此服务器之前,您需要:
Systemprompt API 密钥(免费):
创建新的 API 密钥
运行服务器所需
与 MCP 兼容的客户端,例如:
克劳德桌面
或任何其他兼容 MCP 的客户端
Google Cloud 项目设置:
Google Cloud 帐户
为所需服务(Gmail、日历等)启用 API 访问
OAuth2 凭据已配置
设置
1. Google Cloud 设置
在Google Cloud Console中创建项目
启用您需要的 API:
Gmail API(阅读、发送、撰写、修改、标签)
Google 日历 API(读取事件)
Google Drive API(只读)
创建 OAuth2 凭证:
前往“API 和服务”>“凭证”
创建 OAuth 2.0 客户端 ID
设置授权重定向 URI(包括
http://localhost:3333/oauth2callback
)下载凭据 JSON 文件并将其保存为
credentials/google-credentials.json
2.服务器配置
安装软件包:
创建凭证目录:
运行身份验证脚本:
这将:
打开默认浏览器进行 Google OAuth 身份验证
在端口 3333 上启动本地服务器来处理 OAuth 回调
生成令牌并将其保存到
credentials/google-token.json
身份验证完成后自动关闭
该脚本将请求以下权限:
Gmail:阅读、发送、撰写、修改和管理标签
日历:读取事件和日历
驱动器:只读访问
3. MCP 客户端设置
选择您首选的 MCP 客户端:
使用 Systemprompt MCP 客户端
按照安装说明安装并配置客户端
在客户端的 MCP 配置中,添加此服务器:
注意:将your_api_key
替换为来自systemprompt.io/console的实际 Systemprompt API 密钥。
使用 Claude Desktop
安装 Claude Desktop
使用 API 密钥在 Claude 的 MCP 配置部分中添加此服务器:
{ "command": "SYSTEMPROMPT_API_KEY=your_api_key npx systemprompt-mcp-google" }配置连接以使用 stdio 模式
特征
Google 服务集成
Gmail 集成
通过 MCP 命令阅读和发送电子邮件
管理草稿和附件
搜索和过滤电子邮件
处理电子邮件线程
日历集成
通过 MCP 命令创建和管理事件
处理活动邀请
搜索和过滤日历事件
管理多个日历
MCP 集成
标准 MCP 接口
与任何符合 MCP 标准的客户端兼容
结构化命令响应
错误处理和状态报告
会话管理
安全与身份验证
安全 OAuth2 身份验证流程
自动令牌刷新
不同服务的范围访问
基于环境的配置
开发特性
全面支持 TypeScript
全面的错误处理
广泛的测试覆盖范围
MCP兼容接口
配置
设置 Google Cloud 项目和 OAuth2 凭据:
在Google Cloud Console中创建项目
启用 Gmail 和日历 API
创建 OAuth2 凭据
下载凭证文件
配置环境变量:
运行身份验证脚本:
用法
通过 MCP 客户端
配置完成后,您可以使用任何 MCP 客户端向此服务器发送命令。示例交互:
Gmail操作
日历操作
测试
该项目包括针对 MCP 协议处理和 Google 服务集成的全面测试:
调试 MCP 通信
由于 MCP 服务器通过 stdio 进行通信,因此调试需要特别注意:
使用 MCP 检查器:
启用调试日志记录:
使用提供的测试客户端:
执照
麻省理工学院
相关项目
发展
本地开发设置
克隆存储库:
安装依赖项:
设置环境变量:
设置 Google 凭据:
将您的 Google OAuth 凭据保存为
credentials/google-credentials.json
运行
npm run auth-google
来通过 Google 进行身份验证
启动开发服务器:
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
一个专用的模型上下文协议 (MCP) 服务器,可将 Google 服务(Gmail、Google 日历等)集成到您的 AI 工作流程中。该服务器支持通过 MCP 无缝访问 Google 服务,从而使 AI 代理能够与 Gmail、Google 日历和其他 Google 服务进行交互。
Related Resources
Related MCP Servers
- -securityAlicense-qualityEnables interaction with Gmail and Google Calendar using the MCP protocol, supporting multiple Google accounts, email management, and calendar operations through natural language.Last updated -13MIT License
- AsecurityFlicenseAqualityAn MCP (Model Context Protocol) server that provides Google search capabilities and webpage content analysis tools. This server enables AI models to perform Google searches and analyze webpage content programmatically.Last updated -11139
- -securityAlicense-qualityA secure MCP (Model Context Protocol) server hosted on Google Cloud Run that enables team collaboration by providing authenticated access via Google Cloud IAM, allowing teams to share custom MCP servers over the internet before official MCP authentication is implemented.Last updated -22MIT License
- -securityFlicense-qualityA Model Context Protocol server that enables AI assistants to interact with Gmail services, supporting email operations, draft management, and calendar functionality through Google API integration.Last updated -541