Google Multi-Account
Every Google account.
Any AI agent.
Built-in AI connectors usually link one Google account each. This open source MCP server links all of them, personal, work and side projects, to any agent that speaks MCP. Ask once, and your agent searches every inbox, merges every agenda and sends from the right address.
What your agent can do with it
Gmail
Search with Gmail syntax across one or all accounts, read messages and threads, draft or send replies that stay in the thread, archive and label.
Google Calendar
List calendars, see a single agenda merged across every account to spot conflicts, create, update and delete events, add Google Meet links.
Google Drive
Search by name or full text, including shared drives. Read Docs, Slides and plain text files, and Sheets as CSV. Read only.
Built for several accounts
Every tool takes an account parameter: an alias you choose (perso, work), an email address, or all for reads.
Reads can span everything
"Summarize my unread mail from this week on all my accounts." Each account is queried in parallel, and one failing account never blocks the others.
Writes are always explicit
Sending an email or changing an event requires a single, named account. "all" is refused, so a work email never leaves from your personal address by accident.
One connector or several
Run one server for every account, or one instance per account with --accounts=work to toggle each one separately in your client.
Install
About 15 minutes, once. You need Node.js 20 or later (or Docker, see below), a Google account to host the OAuth client, and an MCP client such as Claude, Codex, Cursor or Gemini CLI.
Get the code
Clone the repository and build it.
$ git clone https://github.com/dathims/google-multi-mcp.git $ cd google-multi-mcp && npm install && npm run build
Create your Google OAuth client
In Google Cloud, create a project, enable the Gmail, Google Calendar and Google Drive APIs, configure the consent screen as External, then create an OAuth client of type Desktop app and download its JSON file.
$ mkdir -p ~/.config/google-multi-mcp $ mv ~/Downloads/client_secret_*.json ~/.config/google-multi-mcp/client_secret.json $ chmod 600 ~/.config/google-multi-mcp/client_secret.json
Add your accounts
One command per account. Your browser opens, you pick the Google account and approve the permissions.
$ npm run add-account -- perso $ npm run add-account -- work $ npm run check-accounts
Connect it to your agent
Point your MCP client at
dist/index.js. Replace the path with the absolute path of your clone.Claude Code
$ claude mcp add google-multi -s user -- node /path/to/google-multi-mcp/dist/index.jsCodex, in ~/.codex/config.toml
[mcp_servers.google-multi] command = "node" args = ["/path/to/google-multi-mcp/dist/index.js"]
Claude Desktop (
claude_desktop_config.json), Cursor (~/.cursor/mcp.json) and Gemini CLI (~/.gemini/settings.json) share the same format:{ "mcpServers": { "google-multi": { "command": "node", "args": ["/path/to/google-multi-mcp/dist/index.js"] } } }
Prefer Docker?
Skip Node.js and the clone: a ready-made image is published for amd64 and arm64. Step 2 (your OAuth client) is still required. Add an account, then copy the URL it prints into your browser:
$ docker run -it --rm -p 127.0.0.1:8765:8765 \
-v ~/.config/google-multi-mcp:/config \
ghcr.io/dathims/google-multi-mcp add perso
Then point any MCP client at the image. Set TZ to your time zone, otherwise the container runs in UTC and event times would shift:
{
"mcpServers": {
"google-multi": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "TZ=Europe/Paris",
"-v", "/Users/you/.config/google-multi-mcp:/config",
"ghcr.io/dathims/google-multi-mcp"]
}
}
}
Tools
| Tool | What it does | account="all" |
|---|---|---|
| list_accounts | Connected accounts and their aliases | |
| gmail_search | Search emails with Gmail syntax | Yes |
| gmail_read | Read a message or a whole thread | |
| gmail_create_draft | Create a draft, new or as a reply | |
| gmail_send | Send an email, new or as a reply | |
| gmail_modify_labels | Archive, mark as read, star, label | |
| calendar_list_calendars | List calendars | Yes |
| calendar_list_events | Events over a period, merged across accounts | Yes |
| calendar_create_event | Create an event, optionally with Google Meet | |
| calendar_update_event | Change only the fields you pass | |
| calendar_delete_event | Delete or cancel an event | |
| drive_search | Full text or raw Drive query search | Yes |
| drive_read_file | Read Docs, Slides, Sheets (CSV) and text files |
Privacy by construction
- No Cockpit server in the loop. Data goes from Google to your computer, then to the AI assistant you connect it to.
- Your own OAuth client. You decide which Google project holds the credentials.
- Local tokens. Stored in
~/.config/google-multi-mcpwith owner-only permissions. Revoke them any time at myaccount.google.com/permissions. - Least privilege. Drive is read only. Gmail cannot permanently delete anything.
- Hardened. OAuth with PKCE and state checks, protection against email header injection.
Read the full privacy policy.