
Google Chat MCP Server

2025.04.03
0
JavaScriptGoogle Chat 集成消息发送交流协作
Google Chat MCP Server 是一个基于 Model Context Protocol (MCP) 的服务实现,用于通过 webhooks 与 Google Chat API 进行交互。该服务提供了一个简单的工具,用于向 Google Chat 空间发送文本消息。
View on GitHub
Overview
基本能力
产品定位
Google Chat MCP Server 主要用于通过 webhooks 与 Google Chat API 进行交互,实现向 Google Chat 空间发送文本消息的功能。
核心功能
- 通过 webhooks 向 Google Chat 空间发送文本消息
- 简单且安全的基于 webhook 的集成
- 无需 OAuth 设置
- 易于与 MCP 兼容工具一起使用
适用场景
- 团队协作中需要向 Google Chat 空间发送通知或消息
- 自动化工作流中集成 Google Chat 消息发送功能
工具列表
post_text_message
: 用于向 Google Chat 空间发送文本消息的工具
常见问题解答
- 如何设置环境变量?
可以通过 Docker 运行时的环境变量设置,或者在本地创建
.env
文件进行配置。 - 是否需要 OAuth 设置? 不需要,该服务通过 webhooks 和 API 密钥进行交互。
使用教程
使用依赖
- Node.js 环境
- npm 包管理器
安装教程
使用 Smithery (推荐)
npx spinai-mcp install @KaranThink41/gchat_post_text_message --provider smithery
本地开发
- 克隆仓库:
git clone https://github.com/KaranThink41/google_chat_mcp_server.git
cd google_chat_mcp_server
- 安装依赖:
npm install
- 构建项目:
npm run build
- 运行服务:
node build/index.js
Docker 设置
- 构建 Docker 镜像:
docker build -t google-chat-mcp-server .
- 运行 Docker 容器:
docker run -e GOOGLE_CHAT_SPACE_ID=your_space_id \
-e GOOGLE_CHAT_API_KEY=your_api_key \
-e GOOGLE_CHAT_TOKEN=your_token \
google-chat-mcp-server
调试方式
- 确保环境变量已正确设置
- 使用以下 JSON 请求测试消息发送功能:
{
"method": "tools/call",
"params": {
"name": "post_text_message",
"arguments": {
"space_id": "your_space_id",
"key": "your_api_key",
"token": "your_token",
"text": "Hello, this is a test message!"
}
}
}