google-chat-mcp
google-chat-mcp
用于 Google Chat 的 MCP 服务器。让 Claude(Code / Desktop)或任何 MCP 客户端列出你的空间、读取和搜索消息、拉取线程和成员,并且——可选——以你的身份发送消息。
默认只读。通过 stdio 在本地运行。刷新令牌以 0600 权限存储在 ~/.google-chat-mcp/ 下。
工具
工具 | 输入 | 说明 |
|
| 按最近活动排序。除非 |
|
| 最新优先。 |
|
| 客户端扫描;Chat API 没有全文搜索。默认窗口 14 天,每个空间 ≤500 条消息。 |
|
| 所有回复,最旧优先。 |
|
| 用户 + 角色,通过 People API 获取姓名/邮箱。 |
|
| 仅在 |
发送者姓名来自 People API 目录(directory.readonly)。如果该 API 被禁用或用户是外部用户,你会得到 users/<id>——其他一切仍然正常工作。
Related MCP server: Google Chat MCP Server
设置
需要 Google Workspace 账户。消费者 @gmail.com 账户无法调用 Chat API(403)。
1. Google Cloud 项目(一次性,约 10 分钟)
console.cloud.google.com → 创建/选择项目。
APIs & Services → Library → 启用 Google Chat API 和 People API。
Google Chat API → Configuration 标签页 → 填写 App name、Avatar URL、Description;交互功能 关闭;对您的域可见。保存。
注意:在保存此表单之前,Chat API 会拒绝所有 OAuth 调用并返回
403,即使对于只读用户认证也是如此。OAuth consent screen → Internal → 添加范围:
https://www.googleapis.com/auth/chat.spaces.readonlyhttps://www.googleapis.com/auth/chat.messages.readonlyhttps://www.googleapis.com/auth/chat.memberships.readonlyhttps://www.googleapis.com/auth/directory.readonlyhttps://www.googleapis.com/auth/chat.messages.create(仅当您想要send_message时)
Credentials → Create credentials → OAuth client ID → Desktop app → 下载 JSON。将其保存在任何仓库之外。
2. 登录
export GOOGLE_CHAT_CLIENT_SECRET_PATH=/path/to/client_secret.json
npx google-chat-mcp login # browser opens → sign in with your Workspace account
npx google-chat-mcp whoami # sanity check3. 使用 Claude Code 注册
claude mcp add google-chat \
-e GOOGLE_CHAT_CLIENT_SECRET_PATH=/path/to/client_secret.json \
-- npx -y google-chat-mcpClaude Desktop(claude_desktop_config.json):
{
"mcpServers": {
"google-chat": {
"command": "npx",
"args": ["-y", "google-chat-mcp"],
"env": { "GOOGLE_CHAT_CLIENT_SECRET_PATH": "/path/to/client_secret.json" }
}
}
}环境
变量 | 默认值 | 用途 |
| — | 桌面 OAuth 客户端 JSON。在 macOS 上回退到 Keychain 项 |
|
| 刷新令牌缓存。 |
|
|
|
配额说明
Chat API:约 60 次请求/分钟/用户。空间和成员列表在进程内缓存 5 分钟;解析的用户名在磁盘上缓存于 ~/.google-chat-mcp/users.json。search_messages 是开销最大的操作——使用 spaces 和 since 限制范围。
开发
pnpm install
pnpm dev login
pnpm typecheck && pnpm lint && pnpm buildNode ≥ 22。TypeScript 严格模式,ESM,tsup 构建。
许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityCmaintenanceProvides MCP (Model Control Protocol) tools for accessing and interacting with Google Chat spaces and messages through OAuth2 authentication.523MIT
- AlicenseAqualityAmaintenanceEnables interaction with Google Chat via MCP using the internal Dynamite API, allowing listing spaces, reading and sending messages, and managing DMs. No Google Cloud Console setup required.13MIT
- AlicenseNot gradedqualityDmaintenanceConnects Claude to Google Chat for searching messages, spaces, and DMs, automatically resolving user IDs to real display names.MIT
- AlicenseNot gradedqualityCmaintenanceEnables interaction with Google Chat through MCP, allowing listing spaces and messages, searching messages, and sending messages. Supports local and remote transports.52Apache 2.0
Related MCP Connectors
Manage Gmail messages, threads, labels, drafts, and settings from your workflows. Send and organiz…
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Schedule and manage Google Calendar events directly from your workspace. Check availability, view…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jawaidgadiwala/google-chat-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server