google-mcp

google-mcp

Enables interaction with Google Chat through MCP, allowing listing spaces and messages, searching messages, and sending messages. Supports local and remote transports.

Category
Visit Server

README

google-mcp

A Model Context Protocol server for Google Workspace with pluggable transports — run it locally over stdio or remotely over HTTP (so you can reach it from a phone). It ships with Google Chat today and is structured so Gmail, Drive, and Calendar can be added as additional modules.

You bring your own Google Cloud OAuth client and authorize once. The server then exposes Chat tools to any MCP client (Claude, Claude Code, etc.).

Transports

The server selects a transport at startup — by CLI arg or the GOOGLE_MCP_TRANSPORT env var. Adding a transport means implementing one TransportRunner and registering it; nothing else changes (Open/Closed).

Transport Command Use
stdio google-mcp serve stdio (default) Local MCP client on the same machine
http google-mcp serve http Remote / phone access over HTTP

The HTTP transport listens on PORT (default 8080) at GOOGLE_MCP_HTTP_PATH (default /mcp). Set GOOGLE_MCP_BEARER_TOKEN to require an Authorization: Bearer <token> header.

Tools

Tool Description
chat_list_spaces List spaces and direct messages the user belongs to.
chat_list_messages List messages in a space.
chat_find_messages Find messages in a space by case-insensitive text match.
chat_send_message Post a text message to a space.

Why not the official Google Chat MCP server?

Google offers a hosted Chat MCP server at chatmcp.googleapis.com, but it is in Developer Preview and gated behind program enrollment. google-mcp runs locally, uses scopes you control, and is easy to extend to other Workspace APIs.

Prerequisites

  • Node.js >= 20
  • A Google Cloud project with the Google Chat API enabled
  • An OAuth client (type: Desktop app) for the loopback authorization flow

Setup

1. Create an OAuth client

  1. In Google Cloud Console, enable the Google Chat API.
  2. Configure the OAuth consent screen (External or Internal).
  3. Create credentials → OAuth client ID → Desktop app.
  4. Note the client ID and client secret.

2. Install and build

git clone https://github.com/thehellmaker/google-mcp.git
cd google-mcp
npm install
npm run build

3. Provide credentials

Copy .env.example to .env (or export the variables in your shell):

export GOOGLE_OAUTH_CLIENT_ID="your-client-id.apps.googleusercontent.com"
export GOOGLE_OAUTH_CLIENT_SECRET="your-client-secret"

4. Authorize once

npm run auth

This opens a loopback authorization flow. Approve access in your browser. A refresh token is stored at ~/.config/google-mcp/token.json (mode 0600).

Use with Claude / Claude Code

Add to your MCP client config (paths and env are illustrative):

{
  "mcpServers": {
    "google": {
      "command": "node",
      "args": ["/absolute/path/to/google-mcp/dist/index.js"],
      "env": {
        "GOOGLE_OAUTH_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
        "GOOGLE_OAUTH_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Remote access (phone)

A local stdio server can only be reached from the same machine. To trigger tools from a phone, run the HTTP transport on a host the Claude app can reach over HTTPS, and add it as a custom connector.

GOOGLE_MCP_TRANSPORT=http PORT=8080 GOOGLE_MCP_BEARER_TOKEN="$(openssl rand -hex 32)" npm run start:http

Then put it behind HTTPS. Options, simplest first:

  • Tunnel (quick test): cloudflared tunnel --url http://localhost:8080 or ngrok http 8080 gives a public HTTPS URL.
  • Single small host: Fly.io, Railway, Render, or a cheap VPS running the container/process behind a TLS reverse proxy (Caddy/Traefik).
  • Behind an MCP gateway: put it behind an existing open-source MCP gateway (Pomerium, Obot, Microsoft mcp-gateway, Docker MCP Gateway) when you want OAuth, per-tool policy, and audit logging without writing them yourself.

Note on auth: the built-in bearer token is the minimal guard. Claude's custom-connector UI expects either an open server or full OAuth — a fronting gateway is the clean way to add OAuth to a remote deployment.

OAuth scopes

https://www.googleapis.com/auth/chat.spaces.readonly
https://www.googleapis.com/auth/chat.messages.readonly
https://www.googleapis.com/auth/chat.messages.create
https://www.googleapis.com/auth/chat.memberships.readonly

Security

  • No credentials are committed. .env, token.json, and credentials.json are gitignored.
  • The refresh token lives only on your machine under ~/.config/google-mcp/.
  • The server inherits exactly the permissions your OAuth consent grants — nothing more.

Adding a new Workspace module

  1. Create src/modules/<name>/index.ts exporting a ToolModule (name, scopes, register).
  2. Add it to the array in src/modules/registry.ts.

Scopes are aggregated automatically for the auth flow.

License

Apache License 2.0. See LICENSE and NOTICE.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured