Skip to main content
Glama

google-chat-mcp

用于 Google Chat 的 MCP 服务器。让 Claude(Code / Desktop)或任何 MCP 客户端列出你的空间、读取和搜索消息、拉取线程和成员,并且——可选——以你的身份发送消息。

默认只读。通过 stdio 在本地运行。刷新令牌以 0600 权限存储在 ~/.google-chat-mcp/ 下。

工具

工具

输入

说明

list_spaces

type(all/space/group/dm)、queryresolveDmNameslimit

按最近活动排序。除非 resolveDmNames(最多 40 次查找),否则 DM 没有名称。

list_messages

spacesinceuntillimit ≤100、pageToken

最新优先。since/until 在服务端过滤。

search_messages

query(子字符串或 /regex/)、spaces?sinceuntillimit

客户端扫描;Chat API 没有全文搜索。默认窗口 14 天,每个空间 ≤500 条消息。

get_thread

thread

所有回复,最旧优先。

list_members

space

用户 + 角色,通过 People API 获取姓名/邮箱。

send_message

spacetextthread?

仅在 SEND_ENABLED=true 时注册。

发送者姓名来自 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 分钟)

  1. console.cloud.google.com → 创建/选择项目。

  2. APIs & Services → Library → 启用 Google Chat APIPeople API

  3. Google Chat API → Configuration 标签页 → 填写 App nameAvatar URLDescription;交互功能 关闭;对您的域可见。保存。

    注意:在保存此表单之前,Chat API 会拒绝所有 OAuth 调用并返回 403,即使对于只读用户认证也是如此。

  4. OAuth consent screenInternal → 添加范围:

    • https://www.googleapis.com/auth/chat.spaces.readonly

    • https://www.googleapis.com/auth/chat.messages.readonly

    • https://www.googleapis.com/auth/chat.memberships.readonly

    • https://www.googleapis.com/auth/directory.readonly

    • https://www.googleapis.com/auth/chat.messages.create(仅当您想要 send_message 时)

  5. 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 check

3. 使用 Claude Code 注册

claude mcp add google-chat \
  -e GOOGLE_CHAT_CLIENT_SECRET_PATH=/path/to/client_secret.json \
  -- npx -y google-chat-mcp

Claude 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" }
    }
  }
}

环境

变量

默认值

用途

GOOGLE_CHAT_CLIENT_SECRET_PATH

桌面 OAuth 客户端 JSON。在 macOS 上回退到 Keychain 项 jay-google-oauth/client

GOOGLE_CHAT_TOKEN_PATH

~/.google-chat-mcp/token.json

刷新令牌缓存。

SEND_ENABLED

false

true 注册 send_message 并请求创建范围。更改后重新运行 login

配额说明

Chat API:约 60 次请求/分钟/用户。空间和成员列表在进程内缓存 5 分钟;解析的用户名在磁盘上缓存于 ~/.google-chat-mcp/users.jsonsearch_messages 是开销最大的操作——使用 spacessince 限制范围。

开发

pnpm install
pnpm dev login
pnpm typecheck && pnpm lint && pnpm build

Node ≥ 22。TypeScript 严格模式,ESM,tsup 构建。

许可证

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    A
    quality
    A
    maintenance
    Enables 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.
    13
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables interaction with Google Chat through MCP, allowing listing spaces and messages, searching messages, and sending messages. Supports local and remote transports.
    52
    Apache 2.0

View all related MCP servers

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…

View all MCP Connectors

Latest Blog Posts

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