nguyenvanduocit/google-chat-mcp
3.2
If you are the rightful owner of google-chat-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A Model Context Protocol (MCP) server for Google Chat, enabling AI assistants to interact with Google Chat spaces, messages, and members.
Tools
8
Resources
0
Prompts
0
Google Chat MCP
A Model Context Protocol (MCP) server for Google Chat, enabling AI assistants to interact with Google Chat spaces, messages, and members.
Features
- Spaces: List and get details of Google Chat spaces
- Messages: List, get, send, and delete messages
- Members: List and get members of spaces
- Attachments: Upload file attachments to messages
Prerequisites
- A Google Cloud project with the Google Chat API enabled
- OAuth 2.0 Client ID credentials (Desktop app type)
Setup
1. Create OAuth 2.0 Credentials
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Chat API
- Go to APIs & Services > Credentials
- Click Create Credentials > OAuth client ID
- Select Desktop app as the application type
- Download the JSON file and save it as
google-credentials.json
2. Generate OAuth Token
Use the included token generation tool:
# Build the token generator
go build -o get-google-token ./scripts/get-google-token
# Run it with your credentials file
./get-google-token \
-credentials /path/to/google-credentials.json \
-token /path/to/google-token.json
This will:
- Open your browser for Google authentication
- Ask you to authorize the required Chat API scopes
- Save the OAuth token to the specified path
3. Set Environment Variables
export GOOGLE_CREDENTIALS_FILE=/path/to/google-credentials.json
export GOOGLE_TOKEN_FILE=/path/to/google-token.json
Or create a .env file:
GOOGLE_CREDENTIALS_FILE=/path/to/google-credentials.json
GOOGLE_TOKEN_FILE=/path/to/google-token.json
Usage
Install
go install github.com/nguyenvanduocit/google-chat-mcp@latest
Build from source
go build -o google-chat-mcp .
Run (STDIO mode)
./google-chat-mcp --env .env
Run (HTTP mode)
./google-chat-mcp --env .env --http_port 3003
MCP Configuration
Add to your MCP settings:
STDIO mode
{
"mcpServers": {
"google-chat": {
"command": "/path/to/google-chat-mcp",
"args": ["--env", "/path/to/.env"]
}
}
}
HTTP mode
{
"mcpServers": {
"google-chat": {
"url": "http://localhost:3003/mcp"
}
}
}
Available Tools
Spaces
google_chat_list_spaces- List all accessible Google Chat spacesgoogle_chat_get_space- Get details of a specific space
Messages
google_chat_list_messages- List messages in a spacegoogle_chat_get_message- Get a specific messagegoogle_chat_send_message- Send a message to a spacegoogle_chat_delete_message- Delete a messagegoogle_chat_upload_attachment- Upload a file attachment to a space
Members
google_chat_list_members- List members of a spacegoogle_chat_get_member- Get details of a specific member
License
MIT