Google Chat MCP

io.github.A1-x-TechPublished by GitHub account A1-x-Techv1.1.2Updated Nov 7, 2026

MCP server for the Google Chat API: spaces, messages, threads, reactions and memberships.

Overview

AI-generated overview

Local MCP server for the Google Chat API that lets an assistant read spaces and messages, reply in threads, react, and manage members as the signed-in user.

What you can do
  • Discover spaces and existing direct messages, and read space details, threading model and membership
  • Read messages, single messages, threads and attachment metadata
  • Send, edit and delete the user's own messages, including replies into threads
  • Add, list and remove emoji reactions on messages
  • List space members and add, re-role or remove them when the user is a space manager
  • Connect from the chat via OAuth, check auth status, log out, or call any Chat API v1 path through a raw request escape hatch
When to use it
Useful when you want an assistant to catch up on Google Chat conversations, summarize decisions, draft and post replies under your own name, or handle space membership without leaving the chat client. It is not a fit for Gmail, Meet or Drive, or for searching message text, which the Chat API does not support.
Requirements
Runs locally as an npm stdio package and needs Node.js 20+ and a Google account with Google Chat access. OAuth 2.0 is required; an API key is not enough. Either connect from the chat (Google Cloud project with the Chat API enabled, a Desktop-app OAuth client JSON, browser consent on the same machine) or set GOOGLE_CHAT_CLIENT_ID, GOOGLE_CHAT_CLIENT_SECRET and GOOGLE_CHAT_REFRESH_TOKEN, or a short-lived GOOGLE_CHAT_ACCESS_TOKEN. Optional: GOOGLE_CHAT_OAUTH_PORT, GOOGLE_CHAT_API_BASE…
Before you install
It acts as your Google account: sends appear under your name, and delete_message and membership removal are final. Writes are never retried after an uncertain failure, so check before re-sending. GOOGLE_CHAT_CLIENT_SECRET and GOOGLE_CHAT_REFRESH_TOKEN are passwords; the client JSON should be passed by file path, not pasted into chat. search_spaces needs a Workspace admin scope and reaches spaces you are not a member of. raw_request can call any Chat API method. Anonymous telemetry is on by…

Installation

In SourceWeft

  1. Open Google Chat MCP in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

[A1] Google Chat MCP

English | Русский

[npm] [Glama] [CI] [License: MIT]

A1 Google Chat MCP lets an AI app work in Google Chat in plain language. Find the right space or direct message, catch up on a conversation, reply in a thread, react with an emoji and manage who is in a space.

It uses the Google Chat API with your Google account and acts as the signed-in user: messages send under your name, and only your own messages and reactions can be edited or deleted. It makes the limits of the Chat API explicit instead of implying that every chat task is possible.

  • 20 tools. Connect from the chat, discover spaces and direct messages, read and send messages with thread control, manage emoji reactions, read attachment metadata and manage membership.
  • Connects from the conversation. Say "connect Google Chat": the server walks you through the OAuth client, catches Google's redirect on 127.0.0.1 with PKCE and keeps the tokens itself — no config files, no restart.
  • You act as yourself. Sends appear under your name; edits and deletes stop at your own messages and reactions.
  • A send is never replayed. After an ambiguous failure the server does not retry a write — a replayed send would be a duplicate message in a real room.
  • Minimal Google scopes. The server sends whatever token you minted; grant scopes per task — read-only ones are enough for browsing spaces and messages.

Start with a read-only question:

Show today’s messages in the team space and summarize what was decided.

Connect the server · Explore use cases · Open technical documentation


See it work in a minute

You: What was discussed in the release space today?

Assistant: Lists today’s messages with senders and threads. Nothing changes.

You: Reply in the deploy thread that the rollout is finished.

Assistant: Shows the target space, the thread and the drafted text, then asks for confirmation before sending.

You: Confirm.

Assistant: Sends the reply under your name in that thread. It does not touch any other message.

Contents

Quick start

You need Node.js 20+ and a Google account with access to Google Chat. Credentials are not required at install time — the server connects from the conversation.

  1. Add the server to your AI app.
  2. Say "connect Google Chat": the assistant walks you through creating the OAuth client and approving access without editing config files or restarting.
  3. Ask the read-only question above.
Codex

In the app: open Settings → MCP servers, select Add server, choose STDIO, enter the command npx -y mcp-google-chat@latest, then select Save. No environment variables are needed — connect from the chat afterwards.

From the command line:

bash
codex mcp add google-chat \  -- npx -y mcp-google-chat@latest
bash
codex mcp list

Codex MCP documentation

Claude Code
bash
claude mcp add \  --transport stdio --scope user google-chat \  -- npx -y mcp-google-chat@latest
bash
claude mcp list

Claude Code MCP documentation

Claude Desktop

The current official path is Settings → Extensions. For a custom desktop extension, open Advanced settings → Extension Developer → Install Extension…, select a .mcpb file and follow the prompts.

This repository currently publishes an npm stdio package and does not contain a .mcpb bundle. For Claude Desktop builds that still support local configuration, use the following JSON stdio configuration as a fallback:

json
{  "mcpServers": {    "google-chat": {      "command": "npx",      "args": ["-y", "mcp-google-chat@latest"]    }  }}

In those builds, save it to ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows.

Claude Desktop MCP documentation

Cursor

Add this to ~/.cursor/mcp.json on macOS/Linux or %USERPROFILE%\.cursor\mcp.json on Windows:

json
{  "mcpServers": {    "google-chat": {      "type": "stdio",      "command": "npx",      "args": ["-y", "mcp-google-chat@latest"]    }  }}

Cursor MCP documentation

VS Code

Run MCP: Open User Configuration and add:

json
{  "servers": {    "google-chat": {      "type": "stdio",      "command": "npx",      "args": ["-y", "mcp-google-chat@latest"]    }  }}

Check it with MCP: List Servers.

VS Code MCP documentation

What you can ask it to do

Catch up on a conversation

  • Show my spaces and find the direct message with [email protected].
  • What was posted in the release space today? Summarize the decisions.
  • Show the whole thread this message belongs to.

Post and maintain messages

  • Send a status update to the team space.
  • Reply in the deploy thread that the rollout is finished.
  • Fix the typo in my last message, or delete it entirely.

React and check attachments

  • Add a 👍 to the announcement and show who else reacted with what.
  • Remove my reaction from that message.
  • What files are attached to this message? Show their names and types.

Manage who is in a space

  • Who is in this space, and who are its managers?
  • Add [email protected] to the space and make them a manager.
  • Remove a former teammate from the space.

How the server acts in Chat

  1. With the OAuth refresh credentials the server acts as the signed-in user: messages send under your name, and edits and deletes reach only your own messages and reactions. Membership changes additionally require you to be a space manager.
  2. Spaces accept a bare id, but messages, threads, members, reactions and attachments are addressed by the full resource names the API returns — list first, then act on an exact name.
  3. A reply targets a thread by its name or by a thread key. By default a send falls back to starting a new thread when the target cannot be threaded; you can ask it to fail instead.
  4. Acting as a Chat app — cards, app direct messages, the dedicated attachment endpoint, forced deletes — is a separate Google Cloud configuration; the only bridge here is a service-account access token supplied as GOOGLE_CHAT_ACCESS_TOKEN.

The Chat API cannot search message text — the only message filters are creation time and thread. find_direct_message finds an existing DM but never creates one, and file bytes are not downloaded or uploaded through this server. Space creation and the other uncovered API methods go through raw_request.

What can change

OperationWhat happensConfirmation boundary
Read spaces, messages, members, reactions and attachment metadataReads conversations and metadataNo change
Send a messagePosts in a real space under your nameChanges a conversation
Update a messageReplaces the text of your own messageChanges a conversation
Add or remove a reactionChanges your own reaction on a messageChanges a conversation
Delete a messagePermanently removes a messageDestructive
Manage membershipAdds, re-roles or removes a space memberPotentially destructive
Raw API requestCan call API methods without a dedicated toolPotentially destructive

The AI client controls confirmation prompts. The server marks reads, writes and destructive tools so the client can distinguish catching up from posting.

Getting access

Google Chat requires OAuth 2.0; an API key is not enough. There are two ways in, and the first one needs no configuration files.

Connect from the chat (recommended)

Say "connect Google Chat" and the assistant runs the flow with you:

  1. setup_instructions prints the checklist: create or select a Google Cloud project, enable the Google Chat API, configure the consent screen and create a Desktop app OAuth client.
  2. Download that client's JSON ("Download JSON") and give the assistant its path — set_client stores it owner-only. The secret never goes through the conversation.
  3. start_login returns a Google consent link. Open it on this machine and approve; the code comes back to a one-shot listener on 127.0.0.1 (PKCE), never through the chat.
  4. finish_login exchanges the code, saves the tokens to ~/.config/mcp-google-chat/credentials.json (mode 0600) and verifies them with a real Chat API call — so a Chat API that is still switched off is caught right there, not on your first real question.

The tokens are re-read on every call, so the connection works immediately — no restart of the AI app. auth_status shows what is connected, logout revokes and deletes it. The login asks for chat.spaces.readonly, chat.messages, chat.messages.reactions and chat.memberships.readonly; the admin scope behind search_spaces is not requested — use the environment path if you need it.

Environment variables (CI, unattended installs)

  1. Create or select a Google Cloud project and enable Google Chat API.

  2. Configure the OAuth consent screen and create a Desktop app OAuth client.

  3. Authorize the Google account you chat as. The OAuth 2.0 Playground can obtain the refresh token when Use your own OAuth credentials is enabled.

  4. Request only the scopes your sessions need. For reading and sending, this is enough:

    text
    https://www.googleapis.com/auth/chat.spaces.readonlyhttps://www.googleapis.com/auth/chat.messages.readonlyhttps://www.googleapis.com/auth/chat.messages.create

    The full per-task table — editing and deleting your own messages, reactions, memberships, admin search — is in docs/TOOLS.md.

Testing-mode OAuth refresh tokens can expire after seven days. Publish the OAuth app, or use an Internal app in a Workspace domain, when you need long-lived access. Treat the client secret and refresh token as passwords.

For a quick session, a short-lived token in GOOGLE_CHAT_ACCESS_TOKEN also works — for example from gcloud auth print-access-token with Chat scopes granted. The same variable is how a service-account Chat-app token reaches the server when you need app-only features.

Configuration

Every variable is optional — with none of them the server connects from the chat.

VariableRequiredDescription
GOOGLE_CHAT_CLIENT_IDNo*OAuth client ID.
GOOGLE_CHAT_CLIENT_SECRETNo*OAuth client secret.
GOOGLE_CHAT_REFRESH_TOKENNo*OAuth refresh token.
GOOGLE_CHAT_ACCESS_TOKENNo*Short-lived alternative to the OAuth trio; can be a service-account or Chat-app token.
GOOGLE_CHAT_OAUTH_PORTNoFixed loopback port for the in-chat login; useful over SSH port forwarding.
GOOGLE_CHAT_API_BASENoGoogle Chat API base URL override.
GOOGLE_CHAT_TIMEOUT_MSNoPer-request timeout; default 60000 ms.
GOOGLE_CHAT_MAX_RETRIESNoTemporary-error retries; default 3.

* For the environment path, provide either the OAuth trio or an access token. When set, they win over a stored in-chat login and the server never refreshes or deletes them.

Started without any credentials, the server still completes the MCP handshake; the instructions and the first tool call then name both fixes — the in-chat login (no restart) and the environment variables (restart).

Data, limits and background work

  • Requests go to Google Chat. The local server refreshes Google OAuth tokens and calls the Chat API; the token is never sent to any other host. Its anonymous telemetry contains an installation ID, package version, AI client and platform versions, and tool names — never OAuth tokens, message content, tool arguments or prompts. For each tool call it also sends the outcome and, on failure, an excerpt of the error text with e-mails, addresses, tokens, numbers of 4+ digits and quoted text replaced by #; a value from your request can appear in it if the error text contains it. Set ASKADS_TELEMETRY=0 to opt out.
  • Google applies per-project and per-user quotas. On 429, the server uses backoff; reads also retry after network and 5xx errors, while writes are never replayed after an uncertain failure — a replayed send would be a duplicate message in a real room. send_message accepts a custom message id that makes a send addressable and deduplicable.
  • There is no background polling. The server runs only when called. list_messages can poll a space incrementally by creation time if your AI app supports scheduled tasks; space event subscriptions go through raw_request.

Technical documentation

Support

Found a bug or need a scenario? Create an issue or write in Telegram.


[Две Моны дают пять]

You made it to the end!

Source: README.md at commit c6c071e

Tools

20

auth_status

Google connection status

Shows whether this server is connected to Google: token presence and source (env variables or a stored in-chat login), expiry, the Google account email, granted vs missing OAuth scopes, where the credentials file lives and where the OAuth client comes from. Makes no network calls and never returns the token itself. Call it first when other tools report the server is not connected.

Takes no parameters.

setup_instructions

Setup instructions

Step-by-step checklist for connecting this server to Google: creating a Google Cloud project and a Desktop-app OAuth client, publishing the consent screen (mandatory — Testing-mode refresh tokens die after 7 days), downloading the client JSON and handing its PATH to set_client. Works without any credentials; the checklist shortens to 'enable the API + log in' when an OAuth client is already configured (one client serves the whole mcp-google-* line). Never asks the user to paste secrets into the chat.

Takes no parameters.

set_client

Save the OAuth client

Saves the OAuth client credentials from the JSON file downloaded from Google Cloud Console ('Download JSON' on a Desktop-app client). Pass the file PATH — the secret must never be pasted into the chat. The client is stored once in the shared ~/.config/mcp-google-auth/client.json (owner-only) and reused by every mcp-google-* server; tokens stay per-server. After this, call start_login.

Parameterspathrequired

start_login

Start the Google login

First step of connecting from the chat, without editing config files or restarting the client. Returns authorizeUrl — show it to the user as a clickable link and ask them to open it in the browser ON THIS MACHINE, pick the Google account and approve access. A one-shot listener on 127.0.0.1 catches Google's redirect; the code is exchanged locally and never passes through the chat. Does not open the browser itself. The attempt lives 10 minutes; when the browser shows the success page, call finish_login.

Takes no parameters.

finish_login

Finish the Google login

Second step: waits up to 20 s for the browser consent to finish, saves the tokens to an owner-only file and verifies the login with a read-only identity call, returning the account email and the granted scopes. After success every tool works immediately — no client restart. If the user granted only part of the requested permissions, the login is still saved and missingScopes lists what will not work. Logging in under a different Google account replaces the previous login (its refresh token is revoked best-effort) and the response carries previousAccountEmail so the change never goes unnoticed.

Takes no parameters.

logout

Disconnect from Google

Revokes the stored token at Google (oauth2.googleapis.com/revoke) and deletes the local credentials file. Tokens supplied via env variables are NOT touched — remove them from the MCP client config manually; envTokenStillSet in the response says whether any are still in effect.

Takes no parameters.

list_spaces

List spaces

Lists the spaces the authenticated user is a member of: name (spaces/<id>), displayName (empty for direct messages), spaceType (SPACE = named room, GROUP_CHAT, DIRECT_MESSAGE), spaceThreadingState and timestamps. This is the discovery entry point — space names from here feed every other tool. space_type narrows the listing server-side; there is no text search here — match displayName client-side, or use search_spaces (Workspace admin only). Paginate with page_token from nextPageToken; results are unordered.

Parameterspage_sizepage_tokenspace_type

get_space

Get a space

Returns one space's details: displayName, spaceType, spaceDetails (description/guidelines), spaceThreadingState (THREADED_MESSAGES = replies go into threads, otherwise the space is flat), membershipCount, createTime and settings. Use it to check the threading model before send_message with a thread, or to confirm a space id before writing into it.

Parametersspacerequired

search_spaces

Search spaces (admin)

Server-side search over ALL named spaces in the Workspace organization — including ones the caller is not a member of. ADMIN-ONLY: the call runs with useAdminAccess=true and requires a Google Workspace administrator authorized with the chat.admin.spaces or chat.admin.spaces.readonly scope; anyone else gets PERMISSION_DENIED — fall back to list_spaces and match displayName client-side. query uses the API's search syntax and MUST contain customer = "customers/my_customer" AND spaceType = "SPACE"; add displayName:"text" for name search, e.g. customer = "customers/my_customer" AND spaceType = "SPACE" AND displayName:"onboarding". order_by accepts membership_count.joined_direct_human_user_count, last_active_time or create_time with ASC/DESC.

Parametersqueryrequiredorder_bypage_sizepage_token

find_direct_message

Find a direct-message space

Finds the EXISTING direct-message space between the authenticated user and another user, returning the space (name spaces/<id>) to send_message into. Returns HTTP 404 when no DM with that user exists yet — this tool cannot create one (creating DMs needs spaces.setup via raw_request). The user can be a Google user id (users/123...) or an email address.

Parametersuserrequired

list_messages

List messages

Lists messages in a space (including messages from blocked members and spaces): name, text, sender, createTime, thread.name, attachment metadata and emoji reaction summaries. Filters are the API's only two: created_after (createTime) and thread_name (one thread's messages) — there is no text search, match client-side. order defaults to ascending by createTime; show_deleted includes tombstones of deleted messages. Poll incrementally with created_after + page_token instead of re-listing history. Requires the chat.messages.readonly (or chat.messages) scope and works only with user authentication.

Parametersorderspacerequiredpage_sizepage_tokenthread_nameshow_deletedcreated_after

get_message

Get a message

Fetches one message by its full resource name: text, formattedText, sender, createTime/lastUpdateTime, thread.name (reply target for send_message), attachment[] metadata (name, contentName, contentType, downloadUri, attachmentDataRef) and emojiReactionSummaries. Also resolves custom-id names (spaces/<space>/messages/client-<id>) for messages sent with message_id. Deleted messages return deletionMetadata instead of content.

Parametersmessagerequired

send_message

Send a message

Sends a text message to a space AS THE AUTHENTICATED USER (their name and avatar; needs the chat.messages.create or chat.messages scope, and the user must be a member of the space). Text supports Chat markup: *bold*, _italic_, ~strike~, `code`, <https://url|link>, <users/123> mentions. Threads: pass thread_name (from a message's thread.name) or a stable thread_key of your choosing to reply in a thread; by default a missing thread falls back to starting a new one — set reply_option="or_fail" to error instead. In non-threaded spaces the thread params are ignored by the API. message_id (must start with "client-") makes the send addressable later without storing the returned name — reuse of an id fails with ALREADY_EXISTS, which also makes accidental duplicate sends detectable. Returns the created message with name, thread.name and createTime. A send is NEVER retried after a 5xx/timeout: check with list_messages before re-sending. Cards (cardsV2) are app-auth-only — out of scope; use raw_request with a Chat-app token.

Parameterstextrequiredspacerequiredmessage_idthread_keythread_namereply_option

update_message

Update a message

Replaces the text of an existing message (updateMask=text; the previous text is overwritten, not appended). With user authentication only the authenticated user's OWN messages can be edited — editing someone else's returns PERMISSION_DENIED, a Chat rule, not a missing scope. The message keeps its name and thread; lastUpdateTime is set and clients show an Edited marker. Updating cards or accessory widgets needs app auth via raw_request.

Parameterstextrequiredmessagerequired

delete_message

Delete a message

Permanently deletes a message. With user authentication the user can delete their OWN messages; space managers can also delete others' messages in spaces they manage — otherwise PERMISSION_DENIED (a Chat permission rule, not a missing scope). If the message started a thread that has replies, the delete fails with FAILED_PRECONDITION; force=true deletes the replies too but works only with app (service-account) authentication. Deletion cannot be undone — read the message with get_message first if its content matters. Returns an empty object on success.

Parametersforcemessagerequired

manage_reactions

Manage message reactions

Emoji reactions on a message, as the authenticated user. action=add puts a unicode emoji (the emoji character itself, e.g. "👍" or "🎉" — not :shortcode:) on the message; adding the same emoji twice fails with ALREADY_EXISTS. action=list returns who reacted with what — each reaction's name (spaces/.../reactions/<id>), emoji and user; filter with emoji to one emoji's reactions. action=remove deletes ONE reaction by its full reaction_name from list — only the authenticated user's own reactions can be removed (someone else's returns PERMISSION_DENIED). Custom (workspace) emoji need raw_request with emoji.customEmoji. Scopes: chat.messages.reactions (add/remove; .create suffices for add-only) or chat.messages.reactions.readonly (list).

Parametersemojiactionrequiredmessagepage_sizepage_tokenreaction_name

get_attachment

Get attachment metadata

Fetches metadata of one message attachment by its resource name (from a message's attachment[].name): contentName (filename), contentType (MIME), source (DRIVE_FILE or UPLOADED_CONTENT), downloadUri/thumbnailUri (short-lived, for a signed-in browser user — not for server-side download) and attachmentDataRef. NOTE the auth split: this dedicated endpoint accepts only APP (service-account) authentication — with user credentials it returns an error, but the SAME metadata is already embedded in get_message's attachment[] field, so user-auth flows should read it there. Downloading raw bytes goes through the media endpoint (v1/media/<resourceName>?alt=media) and uploading new attachments through the upload endpoint — both outside this server's tools.

Parametersattachmentrequired

list_members

List space members

Lists memberships in a space: each membership's name (spaces/<space>/members/<member> — the handle manage_members needs), member (users/<id>, displayName, type HUMAN|BOT), role (ROLE_MEMBER or ROLE_MANAGER) and state (JOINED, INVITED, NOT_A_MEMBER). role filters to managers or members; show_invited includes invited-but-not-joined users, show_groups includes Google Groups. Requires the chat.memberships.readonly (or chat.memberships) scope and membership in the space.

Parametersrolespacerequiredpage_sizepage_tokenshow_groupsshow_invited

manage_members

Manage space membership

Membership management in a space — WORKS ONLY WITH SUFFICIENT ACCESS: the authenticated user needs the chat.memberships scope, and add/update_role/remove additionally require them to be a space MANAGER (otherwise PERMISSION_DENIED — a Chat role rule, not a network problem; check their role via list_members). action=get reads one membership by member_name. action=add invites/adds a human user (space + user, optional role=manager); in DMs and group chats members cannot be added. action=update_role switches a membership between member and manager (member_name + role). action=remove deletes the membership — the user is kicked from the space immediately and this is not undoable from here (re-add creates a fresh invitation). Google Groups and Chat-app memberships are managed via raw_request.

Parametersroleuserspaceactionrequiredmember_name

raw_request

Raw Google Chat API call

Escape hatch to call any Google Chat API v1 path directly, for requests the typed tools don't cover — e.g. creating a space (path "v1/spaces", method POST, body {"spaceType":"SPACE","displayName":"..."}), setting up a DM ("v1/spaces:setup"), custom-emoji reactions, Google Group memberships, space events ("v1/spaces/<id>/spaceEvents"), or updating a space ("v1/spaces/<id>" PATCH with a query updateMask). The path may carry a query string (e.g. "v1/spaces/AAA/members?showInvited=true"). The Bearer token is added automatically; the method defaults to GET. Not for media: attachment upload/download use different endpoints (upload/v1, media/v1) that this server does not proxy.

Parametersbodypathrequiredmethod

Version history

6
  1. v1.1.2LatestNov 5, 2026
  2. v1.1.1Oct 31, 2026
  3. v1.1.0Oct 31, 2026
  4. v1.0.0Sep 23, 2026
  5. v0.2.0Sep 21, 2026
  6. v0.1.0Sep 16, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts