Google Workspace (multi-account) — Claude Code MCP server
Gives an agent 942 tools across 29 Google services and works with any number of accounts, picked by alias or hit all at once.
claude mcp add mcp-google-multi -e GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> -e GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> -e GOOGLE_ACCOUNTS=<GOOGLE_ACCOUNTS> -e MASTER_KEY=<MASTER_KEY> -- npx -y mcp-google-multiWhat Google Workspace (multi-account) does
Every Google API method the server can reach becomes a tool the agent may call: Gmail, Drive, Calendar, Sheets, Docs, Slides, Forms, Contacts, Tasks, Chat, Meet, GA4, Search Console, Classroom, Vault, Admin. Accounts are unlimited. Each takes a short alias, and one call can fan out to the whole set.
It launches from npx and wants Node.js 22 or newer. The slow part is OAuth. You register a Desktop client in Google Cloud yourself, then write the client ID, the secret and your aliases into .env, and sign in once per alias with mcp-google-multi auth --account me. Nothing ships with credentials, so without those two values the server stays down. Tokens sit encrypted with AES-256-GCM, writes are refused until allowed, no telemetry goes anywhere. Self-hosting over HTTP is supported too, with a built-in OAuth 2.1 login, and Docker Compose can put HTTPS on top.
A bundled skill under skills/google-workspace/ tells the model how to choose an account, run the discover step and keep replies small; symlink the folder into ~/.claude/skills/. When setup goes sideways, mcp-google-multi doctor walks every piece and names the fix.
What it helps with
- clear an unread inbox across two Google accounts in one pass
- send a Docs draft as mail with an attachment
- pull GA4 session counts into a Sheet
- book a slot on the work calendar without switching logins
- move Form responses into a fresh table
Example prompts for the agent
- Summarise unread mail in the
workaccount, one line each - Send this invite from every account listed in
GOOGLE_ACCOUNTS - Copy last week's GA4 sessions into a new Sheet
How to install Google Workspace (multi-account)
Platform CLI
claude mcp add mcp-google-multi -e GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> -e GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> -e GOOGLE_ACCOUNTS=<GOOGLE_ACCOUNTS> -e MASTER_KEY=<MASTER_KEY> -- npx -y mcp-google-multiReplace <…> with your own values
Platform CLI
codex mcp add google-workspace-multi-account --env GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> --env GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> --env GOOGLE_ACCOUNTS=<GOOGLE_ACCOUNTS> --env MASTER_KEY=<MASTER_KEY> -- npx -y mcp-google-multiReplace <…> with your own values
Config file
{
"mcpServers": {
"google-workspace-multi-account": {
"command": "npx",
"args": [
"-y",
"mcp-google-multi"
],
"env": {
"GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
"GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>",
"GOOGLE_ACCOUNTS": "<GOOGLE_ACCOUNTS>",
"MASTER_KEY": "<MASTER_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"google-workspace-multi-account": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-google-multi"
],
"env": {
"GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
"GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>",
"GOOGLE_ACCOUNTS": "<GOOGLE_ACCOUNTS>",
"MASTER_KEY": "<MASTER_KEY>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> -e GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> -e GOOGLE_ACCOUNTS=<GOOGLE_ACCOUNTS> -e MASTER_KEY=<MASTER_KEY> google-workspace-multi-account npx -y mcp-google-multiReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Google Workspace (multi-account)
How do I install Google Workspace (multi-account) in Claude Code?
Set up the OAuth client and your .env first, then run `claude mcp add mcp-google-multi -e GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> -e GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> -e GOOGLE_ACCOUNTS=<GOOGLE_ACCOUNTS> -e MASTER_KEY=<MASTER_KEY> -- npx -y mcp-google-multi` and restart Claude Code.
What does this MCP server do?
It exposes 942 Google API methods from 29 services as agent tools, and lets the agent switch between connected accounts by alias.
Can it handle more than one Google account?
Yes. List them comma-separated in GOOGLE_ACCOUNTS, for instance me:[email protected],work:[email protected], then run mcp-google-multi auth once for each alias.