谷歌聊天MCP服务器
](https://smithery.ai/server/@rishipradeep-think41/gchat-mcp)
模型上下文协议(MCP)服务器实现,用于通过webhook与Google Chat API交互。该服务器提供了一个简单的工具,用于向谷歌聊天空间发布短信。
特性
- 使用webhooks将短信发布到Google聊天空间
- 基于webhook的简单安全集成
- 无需OAuth设置
- 易于使用MCP兼容工具
安装
通过Smithery安装
通过以下方式自动安装gchat mcp for Claude Desktop 史密瑟里:
npx -y @smithery/cli install @rishipradeep-think41/gchat-mcp --client claude使用Smithery(推荐)
使用Smithery的CLI安装服务器:
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.jsDocker设置
您可以使用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用法示例
要在Google Chat上发布消息,请发送以下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!"
}
}
}配置
服务器需要以下环境变量才能运行:
GOOGLE_CHAT_SPACE_ID:您的Google聊天空间的空间IDGOOGLE_CHAT_API_KEY:您的Google Cloud项目的API密钥GOOGLE_CHAT_TOKEN:谷歌聊天的身份验证令牌
这些变量可以在您的环境中设置,也可以通过Docker设置(如Docker设置部分所示)。
要在没有Docker的情况下在本地运行,请创建一个 .env 包含以下内容的文件:
GOOGLE_CHAT_SPACE_ID=your_space_id
GOOGLE_CHAT_API_KEY=your_api_key
GOOGLE_CHAT_TOKEN=your_token安全
- Webhook URL直接在请求负载中传递
- 代码中没有存储敏感凭据
- 所有请求在执行前都经过验证
贡献
- 分叉存储库
- 创建功能分支(
git checkout -b feature/amazing-feature) - 提交您的更改(
git commit -m 'Add some amazing feature') - 推到分支(
git push origin feature/amazing-feature) - 打开拉取请求
许可证
此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。
