google-mcp
Enables interaction with Google Chat through MCP, allowing listing spaces and messages, searching messages, and sending messages. Supports local and remote transports.
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
- In Google Cloud Console, enable the Google Chat API.
- Configure the OAuth consent screen (External or Internal).
- Create credentials → OAuth client ID → Desktop app.
- 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:8080orngrok http 8080gives 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, andcredentials.jsonare 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
- Create
src/modules/<name>/index.tsexporting aToolModule(name,scopes,register). - Add it to the array in
src/modules/registry.ts.
Scopes are aggregated automatically for the auth flow.
License
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.