google-chat-mcp
Provides tools to manage Google Chat spaces, messages, members, reactions, attachments, and GIFs through the Google Chat API.
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., "@google-chat-mcplist my spaces"
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
MCP server for Google Chat — manage spaces, messages, members, reactions, attachments, and GIFs through the Model Context Protocol.
Features
19 MCP tools covering the full Google Chat API
Spaces — list, get, create, update, delete
Messages — list (newest first), get, send, reply to threads, update, delete
Members — list, add, remove, get user info
Reactions — add, remove
Attachments — get metadata, upload files with messages
Two transports — stdio and HTTP/SSE
Automatic OAuth — browser-based flow, token caching + auto-refresh
Smart formatting — concise human-readable responses, automatic user name resolution
Related MCP server: google-workspace-unlimited
Setup
1. Google Cloud Project & Chat API Setup
Create Project & Enable API
Go to Google Cloud Console
Create a new project (or select existing)
Go to APIs & Services > Library
Search for "Google Chat API" and click Enable
Configure the Chat App
This step is required — without it, the Chat API won't work.
After enabling the Google Chat API, click on it to open its settings
Go to the Configuration tab
Fill in the following:
App name — give it a name (e.g. "Chat MCP Assistant")
Avatar URL — optional, any image URL for the app icon
Description — a short description (e.g. "MCP server for Google Chat")
Enable Interactive features — toggle ON
Functionality — check "Receive 1:1 messages" and "Join spaces and group conversations"
Connection settings — select "Apps Script project" (this won't actually be used, but a selection is required)
Visibility — choose who can use the app:
For personal use: select your own account
For team use: select your Google Workspace domain
Click Save
Create OAuth Credentials
Go to APIs & Services > Credentials
Click Create Credentials > OAuth client ID
If prompted, configure the OAuth consent screen first:
Choose Internal (for Workspace) or External (for personal Gmail)
Fill in app name and your email
Add these scopes:
chat.spaces,chat.messages,chat.memberships,chat.messages.reactions,userinfo.profile,directory.readonlySave and continue through the remaining steps
Back on Credentials, click Create Credentials > OAuth client ID
Choose Desktop app or Web application
If Web application: add
http://localhost:18273/auth/callbackas an authorized redirect URI (or anyhttp://localhost:{port}/{path}— the server reads it from your credentials file)If Desktop app: no redirect URI needed
Download the JSON and save it as
credentials.json
2. Install & Run
# Run directly with npx (no install needed)
npx google-chat-mcp --credentials-path ./credentials.json
# Or install globally
npm install -g google-chat-mcp
google-chat-mcp --credentials-path ./credentials.json
# HTTP/SSE transport
npx google-chat-mcp --transport http --port 3000 --credentials-path ./credentials.jsonOn first run, your browser will open for Google authentication. Approve access and the token is cached automatically.
3. Connect to AI Agents
Claude Code (CLI)
claude mcp add google-chat -- npx google-chat-mcp --credentials-path /absolute/path/to/credentials.jsonAdd -s user to make it available across all projects:
claude mcp add google-chat -s user -- npx google-chat-mcp --credentials-path /absolute/path/to/credentials.jsonClaude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"google-chat": {
"command": "npx",
"args": [
"google-chat-mcp",
"--credentials-path",
"/absolute/path/to/credentials.json"
]
}
}
}Cursor
Add to Cursor's MCP settings (Settings > MCP Servers):
{
"google-chat": {
"command": "npx",
"args": [
"google-chat-mcp",
"--credentials-path",
"/absolute/path/to/credentials.json"
]
}
}Windsurf / Continue / Other MCP Clients
Any MCP client that supports stdio transport can connect. Use:
Command:
npxArgs:
google-chat-mcp --credentials-path /absolute/path/to/credentials.json
For HTTP/SSE clients, run with --transport http --port 3000 and connect to http://localhost:3000/sse.
CLI Options
Flag | Default | Description |
|
| Transport mode: |
|
| Port for HTTP transport |
|
| Path to OAuth credentials file |
|
| Path to stored token |
|
| Don't persist tokens to disk |
Tools
Spaces
Tool | Description |
| List all accessible spaces (concise format, configurable pageSize) |
| Get full details of a specific space |
| Create a new space |
| Update space display name or description |
| Delete a space |
Messages
Tool | Description |
| List messages newest-first with sender names resolved. Supports date filtering (local timezone) and pageSize |
| Get a specific message with sender name resolved |
| Send a text message to a space |
| Reply to an existing thread |
| Update a message's text |
| Delete a message |
Members
Tool | Description |
| List members with display names resolved |
| Add a user to a space |
| Remove a member from a space |
| Look up a user's display name, email, and photo |
Reactions
Tool | Description |
| Add an emoji reaction to a message |
| Remove a reaction |
Attachments
Tool | Description |
| Get attachment metadata and download URL |
| Upload a file and send it as a message |
OAuth Scopes
The server requests these Google OAuth scopes:
chat.spaces— read/write spaceschat.messages— read/write messageschat.memberships— read/write membershipschat.messages.reactions— read/write reactionsuserinfo.profile— authenticated user profiledirectory.readonly— workspace user directory (for name resolution)
Troubleshooting
redirect_uri_mismatch error
Your OAuth credentials have a registered redirect URI that doesn't match. The server reads the redirect URI from your credentials.json automatically. Make sure the URI registered in Google Cloud Console matches what's in the file.
User names showing as users/123456...
The People API may not resolve names depending on your Google Workspace privacy settings. The server caches display names from Chat API responses (members, message senders) as a fallback.
Token expired
Delete your token.json file and restart — the browser auth flow will re-trigger.
Development
npm install
npm run build
npm testLicense
MIT
Related MCP Connectors
MCP server for Sendbird — chat users, channels, members, and messages from your AI client.
A MCP server that works with Google Calendar to manage event listing, reading, and updates.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Related MCP Servers
- AlicenseCqualityDmaintenanceProvides MCP (Model Control Protocol) tools for accessing and interacting with Google Chat spaces and messages through OAuth2 authentication.523MIT
- AlicenseAqualityAmaintenanceThis MCP server provides comprehensive Google Workspace integration (Gmail, Drive, etc.) with multi-user OAuth. Unique features include RAG-powered natural language to Chat card rendering, runtime Jinja2 macro creation, and dynamic tool management.746 PyPI25Apache 2.0
- AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that connects AI agents to Google Workspace (Gmail, Calendar, Drive, Docs, Sheets, and Slides).302MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that connects Claude to your Google Chat workspace, enabling search of messages, spaces, and DMs with automatic resolution of real display names.MIT