google-chat-mcp-local
Provides tools to list spaces and direct messages, read messages and threads, send messages and threaded replies with @mentions and file attachments, download attachments, add emoji reactions, and edit or delete the user's own messages via the Google Chat API.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
google-chat-mcp-local
What it is
google-chat-mcp-local is a small MCP server that lets an AI assistant (such as Claude) work with your Google Chat: list your spaces and direct messages, read messages and threads, send replies with real @mentions and file attachments, react to messages, and edit or delete your own messages. It runs as a program on your own computer and signs in with your own Google account.
Related MCP server: google-chat-mcp
Why local is safer
It runs only on your machine and talks to your MCP client over stdio (no network port is opened for the server).
It calls Google's official Google Chat API (
googleapis.com) directly, using a Google OAuth client that you create.There is no third-party server and no hosted service. Nobody else stores your messages or your tokens.
Your sign-in token stays on your disk in
~/.google-chat-mcp/.You choose exactly two permissions (scopes):
chat.spaces.readonlyandchat.messages.You can revoke access at any time at https://myaccount.google.com/permissions.
It is open source. The whole thing is about 300 lines of code that anyone can read.
Advantages over hosted or cloud Google Chat connectors
Compared with many hosted connectors:
No repeated sign-in prompts. The refresh token is stored locally and refreshed automatically.
Full feature set. List spaces and DMs, read messages and threads, send in threads, real @mentions, upload file attachments, read and download attachments, react, edit and delete your messages.
Works in any MCP client. Claude Desktop, Claude Code and others.
No extra cost or third-party account. You only need a Google account and a free Google Cloud project.
Quick start with npx
You need Node.js 18 or newer. There is nothing to install or build: npx downloads and runs the package.
1. Google Cloud setup (one time)
Go to https://console.cloud.google.com and create a project (or pick an existing one).
Enable the Google Chat API (APIs & Services > Library > "Google Chat API" > Enable). Also open its Configuration tab and give the Chat app a name (required by Google, it is not published).
Set up the OAuth consent screen (APIs & Services > OAuth consent screen). Choose Internal if you use Google Workspace and want only your organization, otherwise External and add your own Google account under Test users.
Create credentials: APIs & Services > Credentials > Create credentials > OAuth client ID > Application type Desktop app.
Download the JSON file and save it as:
Windows:
C:\Users\<you>\.google-chat-mcp\credentials.jsonmacOS / Linux:
~/.google-chat-mcp/credentials.json
Create the
.google-chat-mcpfolder if it does not exist.
2. Sign in
npx -y google-chat-mcp-local@1.0.1 authOpen the printed link, sign in, and approve the two permissions. The token is saved to ~/.google-chat-mcp/token.json.
3. Add it to your MCP client
Claude Desktop: add this to claude_desktop_config.json and restart Claude Desktop.
{
"mcpServers": {
"google-chat": {
"command": "npx",
"args": ["-y", "google-chat-mcp-local@1.0.1"]
}
}
}Claude Code:
claude mcp add google-chat -- npx -y google-chat-mcp-local@1.0.1Install from GitHub source
To run the latest code without npm, npx -y github:iammuhammadasimofficial/google-chat-mcp-local (and ... auth) works too. To work on the code:
git clone https://github.com/iammuhammadasimofficial/google-chat-mcp-local.git
cd google-chat-mcp-local
npm install
npm run auth # sign in
npm start # run the serverFor clients, point the command at node with the full path to cli.js, for example "command": "node", "args": ["/path/to/google-chat-mcp-local/cli.js"].
Settings:
Variable | Meaning | Default |
| Path to the OAuth client JSON |
|
| Path to the saved token |
|
| Local port for the sign-in redirect |
|
For backward compatibility, if credentials.json or token.json exist in the current folder and the variables are not set, they are used and a note is printed on stderr.
CLI: google-chat-mcp-local [start], google-chat-mcp-local auth, --help, --version.
Tools reference
Tool | What it does |
| List your spaces and DMs. |
| List recent messages in a space, optionally only one thread ( |
| Send a message, optionally inside a thread. |
| Save a message attachment to a folder (default |
| Add an emoji reaction to a message. |
| Edit a message you sent. |
| Delete a message you sent. |
Scopes: only chat.spaces.readonly and chat.messages. The chat.messages scope already covers downloading attachments, so no extra scope is needed.
Safety notes and permissions
Running locally on Google's official APIs removes the third-party server, but no tool is 100% secure. Know these points and follow the recommendations below.
Recommended setup
Pin a version. Use
google-chat-mcp-local@1.0.1(as in the examples above) instead of the bare name, so a new release never runs on your machine until you choose to upgrade. Read the release notes before you change the version.Keep approval prompts on for
send_message,update_messageanddelete_messagein your MCP client, so you see every message before it goes out under your name. A message or document the assistant reads could try to trick it into sending or deleting something (prompt injection).Protect the token.
token.jsonis saved with owner-only permissions (file 600, folder 700) on macOS and Linux. On Windows it relies on your user profile's permissions, so do not run untrusted software under your account.Revoke when you stop using it: https://myaccount.google.com/permissions, then delete
~/.google-chat-mcp/token.json.
For maintainers
Enable two-factor authentication on the npm account that publishes this package, and publish only from a clean clone of the reviewed
mainbranch.Keep dependencies to the official ones (
googleapis,@modelcontextprotocol/sdk,zod) and update them regularly (npm audit).
What the permissions allow
token.jsonlets whoever holds it read and send Google Chat messages as you, within the two scopes above. Keep it private and never commit or share it. The folder is created owner-only where the OS supports it.Everything the assistant sends is sent as you, under your name. Review what it plans to send, especially messages to many people.
delete_messageis permanent.download_attachmentwrites files to your disk. Treat downloaded files like any file from the internet.To stop all access, remove the app at https://myaccount.google.com/permissions and delete
~/.google-chat-mcp/token.json.
Troubleshooting
"Missing credentials file": save your Desktop app OAuth client JSON as
~/.google-chat-mcp/credentials.json(the error message prints the exact path)."Missing token file": run the
authcommand again."Access blocked" or "app not verified": on an External consent screen, add your account under Test users.
403 or "Chat app not found": enable the Google Chat API and fill in its Configuration tab.
Port 8091 in use during sign-in: set
GOOGLE_CHAT_AUTH_PORTto another port and add that redirect if your client requires it.Token expired every week: External apps in Testing mode expire refresh tokens after 7 days. Publish the consent screen or use Internal, then sign in again.
Nothing shows in the client: restart the client and check its MCP logs. The server writes diagnostics to stderr only.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read, summarize and send your own WhatsApp messages from AI assistants (OAuth 2.1).
Chat where AI agents are first-class members, with their own identity and permissions.
Persistent memory and shared context across compatible AI assistants, with account-scoped OAuth.
Permissioned access to Gmail, Drive and Calendar via the user's own Google account
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Gmail (list, search, send, label emails) and Google Calendar (list, create, update, delete events) via OAuth 2.0.-
- -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.MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to work in Google Chat through natural language: find spaces and direct messages, read and send messages, manage threads, reactions, attachments, and memberships while acting as the signed-in user.20136 npmMIT