A1 Google Chat MCP
A1 Google Chat MCP lets an AI assistant work inside Google Chat as you — connecting from the conversation, catching up on spaces, posting in threads, reacting, and managing membership — within the Chat API's real limits.
Connect without config files:
setup_instructions,set_client,start_login,finish_loginwalk through the OAuth client and PKCE loopback login;auth_statusandlogoutreport and revoke it — no restart needed.Discover conversations:
list_spaces(filter by space/group/DM),get_space(threading model, details),find_direct_message(existing DMs only), and admin-onlysearch_spaces.Read messages:
list_messageswithcreated_after/thread_namefilters and pagination,get_messagefor full content, threads, attachments and reaction summaries (no text search — match client-side).Write messages:
send_messageas yourself with Chat markup, thread control (thread_name,thread_key,reply_option), and a deduplicablemessage_id;update_message(own messages only, replaces text);delete_message(own messages, or others' if you manage the space;forceneeds app auth).React:
manage_reactionsto add a unicode emoji, list who reacted with what, or remove your own reaction.Attachments:
get_attachmentreturns metadata only (name, MIME, refs) — no bytes uploaded or downloaded; user flows read the same data fromget_message.Membership:
list_members(roles, invited, groups) andmanage_membersto get, add, re-role, or remove people — requires you to be a space manager.Escape hatch:
raw_requestcalls any Chat API v1 path for uncovered cases (space creation, DM setup, custom emoji, space events, Groups).
Boundaries: acts only as the signed-in user, requires full resource names for messages/threads/members, writes are never replayed after ambiguous failures, and no background polling or media transfer.
Allows an AI assistant to work with Google Chat as the signed-in user: discover spaces and direct messages, read and summarize conversations, send and reply in threads, manage emoji reactions, read attachment metadata, and manage space membership.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@A1 Google Chat MCP What was discussed in the release space today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Chat MCP
English | Русский
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.1with 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.
Related MCP server: google-chat-mcp
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.
Add the server to your AI app.
Say "connect Google Chat": the assistant walks you through creating the OAuth client and approving access without editing config files or restarting.
Ask the read-only question above.
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:
codex mcp add google-chat \
-- npx -y mcp-google-chat@latestcodex mcp listclaude mcp add \
--transport stdio --scope user google-chat \
-- npx -y mcp-google-chat@latestclaude mcp listThe 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:
{
"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
Add this to ~/.cursor/mcp.json on macOS/Linux or %USERPROFILE%\.cursor\mcp.json on Windows:
{
"mcpServers": {
"google-chat": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-google-chat@latest"]
}
}
}Run MCP: Open User Configuration and add:
{
"servers": {
"google-chat": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-google-chat@latest"]
}
}
}Check it with MCP: List Servers.
What you can ask it to do
Catch up on a conversation
Show my spaces and find the direct message with alex@example.com.
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 alex@example.com to the space and make them a manager.
Remove a former teammate from the space.
How the server acts in Chat
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.
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.
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.
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
Operation | What happens | Confirmation boundary |
Read spaces, messages, members, reactions and attachment metadata | Reads conversations and metadata | No change |
Send a message | Posts in a real space under your name | Changes a conversation |
Update a message | Replaces the text of your own message | Changes a conversation |
Add or remove a reaction | Changes your own reaction on a message | Changes a conversation |
Delete a message | Permanently removes a message | Destructive |
Manage membership | Adds, re-roles or removes a space member | Potentially destructive |
Raw API request | Can call API methods without a dedicated tool | Potentially 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:
setup_instructionsprints 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.Download that client's JSON ("Download JSON") and give the assistant its path —
set_clientstores it owner-only. The secret never goes through the conversation.start_loginreturns a Google consent link. Open it on this machine and approve; the code comes back to a one-shot listener on127.0.0.1(PKCE), never through the chat.finish_loginexchanges 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)
Create or select a Google Cloud project and enable Google Chat API.
Configure the OAuth consent screen and create a Desktop app OAuth client.
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.
Request only the scopes your sessions need. For reading and sending, this is enough:
https://www.googleapis.com/auth/chat.spaces.readonly https://www.googleapis.com/auth/chat.messages.readonly https://www.googleapis.com/auth/chat.messages.createThe 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.
Variable | Required | Description |
| No* | OAuth client ID. |
| No* | OAuth client secret. |
| No* | OAuth refresh token. |
| No* | Short-lived alternative to the OAuth trio; can be a service-account or Chat-app token. |
| No | Fixed loopback port for the in-chat login; useful over SSH port forwarding. |
| No | Google Chat API base URL override. |
| No | Per-request timeout; default |
| No | Temporary-error retries; default |
* 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. SetASKADS_TELEMETRY=0to opt out.Google applies per-project and per-user quotas. On
429, the server uses backoff; reads also retry after network and5xxerrors, while writes are never replayed after an uncertain failure — a replayed send would be a duplicate message in a real room.send_messageaccepts a custom message id that makes a send addressable and deduplicable.There is no background polling. The server runs only when called.
list_messagescan poll a space incrementally by creation time if your AI app supports scheduled tasks; space event subscriptions go throughraw_request.
Technical documentation
MCP capability catalog — task-oriented pages for every tool.
Support
Found a bug or need a scenario? Create an issue or write in Telegram.
Available Tools
20 toolsauth_statusGoogle connection statusARead-onlyIdempotent
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.
Inputs: no named parameters.
delete_messageDelete a messageADestructive
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.
Inputs: message (required), force.
find_direct_messageFind a direct-message spaceARead-onlyIdempotent
Finds the EXISTING direct-message space between the authenticated user and another user, returning the space (name spaces/) 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.
Inputs: user (required).
finish_loginFinish the Google loginAIdempotent
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.
Inputs: no named parameters.
get_attachmentGet attachment metadataARead-onlyIdempotent
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/?alt=media) and uploading new attachments through the upload endpoint — both outside this server's tools.
Inputs: attachment (required).
get_messageGet a messageARead-onlyIdempotent
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//messages/client-) for messages sent with message_id. Deleted messages return deletionMetadata instead of content.
Inputs: message (required).
get_spaceGet a spaceARead-onlyIdempotent
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.
Inputs: space (required).
list_membersList space membersARead-onlyIdempotent
Lists memberships in a space: each membership's name (spaces//members/ — the handle manage_members needs), member (users/, 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.
Inputs: space (required), role, page_size, page_token, +2 more.
list_messagesList messagesARead-onlyIdempotent
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.
Inputs: space (required), order, page_size, page_token, +3 more.
list_spacesList spacesARead-onlyIdempotent
Lists the spaces the authenticated user is a member of: name (spaces/), 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.
Inputs: page_size, page_token, space_type.
logoutDisconnect from GoogleADestructive
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.
Inputs: no named parameters.
manage_membersManage space membershipADestructive
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.
Inputs: action (required), role, user, space, +1 more.
manage_reactionsManage message reactionsADestructive
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/), 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).
Inputs: action (required), emoji, message, page_size, +2 more.
raw_requestRaw Google Chat API callADestructive
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//spaceEvents"), or updating a space ("v1/spaces/" 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.
Inputs: path (required), body, method.
search_spacesSearch spaces (admin)ARead-onlyIdempotent
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.
Inputs: query (required), order_by, page_size, page_token.
send_messageSend a messageA
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.
Inputs: text (required), space (required), message_id, thread_key, +2 more.
set_clientSave the OAuth clientAIdempotent
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.
Inputs: path (required).
setup_instructionsSetup instructionsARead-onlyIdempotent
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.
Inputs: no named parameters.
start_loginStart the Google loginAIdempotent
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.
Inputs: no named parameters.
update_messageUpdate a messageADestructiveIdempotent
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.
Inputs: text (required), message (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Most tools are cleanly separated by resource and action, and the descriptions actively draw boundaries (e.g. search_spaces is admin-only vs list_spaces membership-only vs find_direct_message for existing DMs). A few near-neighbors remain — get_attachment overlaps with get_message's embedded attachment[] metadata, and list_spaces/search_spaces/find_direct_message all resolve space ids — but each is explained well enough to pick correctly.
Strongly consistent snake_case verb_noun pattern (list_spaces, get_message, send_message, update_message, delete_message, manage_members, raw_request). A handful of deviations exist: auth_status is a noun phrase, logout is a bare verb, and setup_instructions is noun-first, but the overall convention is predictable.
20 tools is on the heavier side but maps to a genuinely broad surface: six auth-lifecycle steps plus spaces, messages, members, reactions, attachments, and a raw escape hatch. Every tool has a concrete job; nothing looks like filler, though the auth flow alone consuming six tools inflates the count.
Core lifecycle is covered: space read/list, message CRUD, reactions, memberships, and message-level auth. Real gaps exist (no typed create_space, no DM creation via spaces.setup, no attachment upload/download, no update_space), but the raw_request tool is explicitly documented as the workaround for each, so agents are not dead-ended.
Maintenance
Related MCP Connectors
Chat where AI agents are first-class members, with their own identity and permissions.
Read, summarize and send your own WhatsApp messages from AI assistants (OAuth 2.1).
Connect an AI assistant to your Google Sheets, Drive, Docs, PDFs, BigQuery and Gmail.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceConnects Claude to Google Chat for searching messages, spaces, and DMs, automatically resolving user IDs to real display names.MIT
- -licenseNot gradedqualityDmaintenanceEnables AI assistants to read and send messages in Google Chat spaces using service account authentication.-
- AlicenseNot gradedqualityDmaintenanceEnables reading and searching Google Chat spaces, messages, threads, and members, with optional message sending.54 npmMIT
- FlicenseAqualityCmaintenanceEnables LLM clients to send messages to Google Chat spaces, list spaces, and search message history.4-