Google Chat Integration
STDIOPython-based MCP server providing Google Chat integration and interaction tools.
Python-based MCP server providing Google Chat integration and interaction tools.
This project provides a Google Chat integration for MCP (Model Control Protocol) servers written by Python with FastMCP. It allows you to access and interact with Google Chat spaces and messages through MCP tools.
The project consists of two main components:
MCP Server with Google Chat Tools: Provides tools for interacting with Google Chat through the Model Control Protocol.
server.py
: Main MCP server implementation with Google Chat toolsgoogle_chat.py
: Google Chat API integration and authentication handlingAuthentication Server: Standalone component for Google account authentication
server_auth.py
: Authentication server implementationThe authentication flow allows you to obtain and refresh Google API tokens, which are then used by the MCP tools to access Google Chat data. (Your spaces and messages)
git clone https://github.com/chy168/google-chat-mcp-server.git
cd google-chat-mcp-server
http://localhost:8000
Authorized redirect URIs: http://localhost:8000/auth/callback
.json
file. Save as credentials.json
at top level of project.python server.py -local-auth --port 8000
token.json
{
"mcpServers": {
"google_chat": {
"command": "uv",
"args": [
"--directory",
"<YOUR_REPO_PATH>/google-chat-mcp-server",
"run",
"server.py",
"--token-path",
"<YOUR_REPO_PATH>/google-chat-mcp-server/token.json"
]
}
}
The MCP server provides the following tools:
get_chat_spaces()
- List all Google Chat spaces the bot has access toget_space_messages(space_name: str, start_date: str, end_date: str = None)
- List messages from a specific Google Chat space with optional time filteringfastmcp dev server.py --with-editable .