Google Chat

by chy168

5 213 downloads Not rated yet MIT
GitHub

About

Lightweight Google Chat integration server enabling OAuth2-authenticated access to chat spaces and messages with flexible date-based filtering for developers.

Details

Repository
chy168/google-chat-mcp-server
License
MIT

Explore

- OAuth2 authentication with Google Chat API
- List available Google Chat spaces
- Retrieve messages from specific spaces with date filtering
- Local authentication server for easy setup

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Google Chat
    Command (node, npx, python, etc.) uv
    Arguments
    • Argument 1 --directory
    • Argument 2 <YOUR_REPO_PATH>/google-chat-mcp-server
    • Argument 3 run
    • Argument 4 server.py
    • Argument 5 --token-path
    • Argument 6 <YOUR_REPO_PATH>/google-chat-mcp-server/token.json

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Python 3.13+
- Google Cloud project with the following APIs enabled:
- Google Chat API
- People API (for user display names)
- OAuth2 credentials from Google Cloud Console

get_chat_spaces

List all Google Chat spaces the bot has access to.

get_space_messages

List messages from a specific Google Chat space with optional time filtering. Parameters: space_name (string), start_date (string), end_date (optional string)

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "google chat": {
            "env": {},
            "args": [
                "--directory",
                "<YOUR_REPO_PATH>/google-chat-mcp-server",
                "run",
                "server.py",
                "--token-path",
                "<YOUR_REPO_PATH>/google-chat-mcp-server/token.json"
            ],
            "shell": false,
            "command": "uv"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "--directory",
        "<YOUR_REPO_PATH>/google-chat-mcp-server",
        "run",
        "server.py",
        "--token-path",
        "<YOUR_REPO_PATH>/google-chat-mcp-server/token.json"
    ],
    "shell": false,
    "command": "uv"
}

Macos

{
    "env": [],
    "args": [
        "--directory",
        "<YOUR_REPO_PATH>/google-chat-mcp-server",
        "run",
        "server.py",
        "--token-path",
        "<YOUR_REPO_PATH>/google-chat-mcp-server/token.json"
    ],
    "shell": false,
    "command": "uv"
}

Windows

{
    "env": [],
    "args": [
        "--directory",
        "<YOUR_REPO_PATH>/google-chat-mcp-server",
        "run",
        "server.py",
        "--token-path",
        "<YOUR_REPO_PATH>/google-chat-mcp-server/token.json"
    ],
    "shell": false,
    "command": "uv"
}

Introduction

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.

Structure

The project consists of two main components:

1. MCP Server with Google Chat Tools: Provides tools for interacting with Google Chat through the Model Control Protocol.
- Written by FastMCP
- server.py: Main MCP server implementation with Google Chat tools
- google_chat.py: Google Chat API integration and authentication handling

2. Authentication Server: Standalone component for Google account authentication
- Written by FastAPI
- Handles OAuth2 flow with Google
- Stores and manages access tokens
- Can be run independently or as part of the MCP server
- server_auth.py: Authentication server implementation

The 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)

Features

- OAuth2 authentication with Google Chat API
- List available Google Chat spaces
- Retrieve messages from specific spaces with date filtering
- Local authentication server for easy setup

Requirements

- Python 3.13+
- Google Cloud project with the following APIs enabled:
- Google Chat API
- People API (for user display names)
- OAuth2 credentials from Google Cloud Console

How to use?

Prepare Google Oauth Login

1. Clone this project
   git clone https://github.com/chy168/google-chat-mcp-server.git
   cd google-chat-mcp-server
   
2. Prepare a Google Cloud Project (GCP) 3. Google Cloud Conolse (https://console.cloud.google.com/auth/overview?project=<YOUR_PROJECT_NAME>) 4. Google Auth Platform > Clients > (+) Create client > Web application
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.