Google Chat MCP Server

Google Chat MCP Server

site icon
2025.04.07 0
JavaScriptGoogle Chat 集成消息通知交流协作
gchat-mcp 是一个基于 Model Context Protocol (MCP) 的服务器实现,用于通过 webhooks 与 Google Chat API 进行交互。该服务器提供了一个简单的工具,用于向 Google Chat 空间发布文本消息。
View on GitHub

Overview

基本能力

产品定位

gchat-mcp 是一个专注于与 Google Chat API 交互的 MCP 服务器,旨在简化通过 webhooks 向 Google Chat 空间发送消息的过程。

核心功能

  • 通过 webhooks 向 Google Chat 空间发布文本消息
  • 简单且安全的基于 webhook 的集成
  • 无需 OAuth 设置
  • 易于与 MCP 兼容工具一起使用

适用场景

  • 团队协作中自动发送通知消息
  • 集成到自动化工作流中发送 Google Chat 消息
  • 开发需要与 Google Chat 交互的应用程序

工具列表

  • post_text_message: 向指定的 Google Chat 空间发送文本消息

常见问题解答

  • 如何获取 Google Chat 的 Space ID 和 API Key? 需要从 Google Cloud 项目中获取 API Key,并从 Google Chat 中获取 Space ID。
  • 是否需要 OAuth 认证? 不需要,该服务使用 webhook 和 API Key 进行认证。

使用教程

使用依赖

  • Node.js 环境
  • npm 包管理器

安装教程

通过 Smithery 安装

npx -y @smithery/cli install @rishipradeep-think41/gchat-mcp --client claude

使用 Smithery CLI 安装

npx spinai-mcp install @KaranThink41/gchat_post_text_message --provider smithery

本地开发安装

  1. 克隆仓库:
git clone https://github.com/KaranThink41/google_chat_mcp_server.git
cd google_chat_mcp_server
  1. 安装依赖:
npm install
  1. 构建项目:
npm run build
  1. 运行服务器:
node build/index.js

Docker 安装

  1. 构建 Docker 镜像:
docker build -t google-chat-mcp-server .
  1. 运行 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

调试方式

  1. 确保环境变量已正确设置
  2. 使用示例请求测试消息发送功能:
{
  "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!"
    }
  }
}
  1. 检查服务器日志以查看请求处理情况

许可证

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