google-workspace-mcp
Provides tools for sending, drafting, searching, and managing Gmail messages and threads across multiple Google accounts.
Provides tools for creating, updating, deleting, and listing calendar events across multiple Google accounts.
Provides tools for searching, uploading, downloading, moving, renaming, trashing, and sharing files, as well as creating folders across multiple Google accounts.
Provides tools for managing Google Tasks, including creating, updating, completing, moving, and deleting tasks across multiple task lists and accounts.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@google-workspace-mcpWhat's on my calendar today for my personal account?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
google-workspace-mcp
A multi-account Google Workspace MCP server for Claude Code. Drives
Gmail, Google Calendar, and Google Drive across any number of
Google accounts in parallel from one server — every tool takes an
account slug, so a single Claude session can email from one account,
file in another's Drive, and book an event in a third.
You bring your own Google Cloud OAuth client, so you own the access and
get the full tool surface — including things the default claude.ai
connector can't do, like deleting a draft.
Ships as a Claude Code plugin (this repo is also its own marketplace).
How it works
One server, many accounts. Each tool call passes an
accountslug (e.g.work,personal). The server loads and refreshes that account's OAuth token transparently.You decide which accounts a project can touch. Accounts are not baked into the code — they're configured at runtime (see Define your accounts). A per-project
.mcp.jsoncan scope a project to a specific subset, so e.g. a personal project never even sees your work account.Secrets live outside the repo. Your OAuth client and per-account tokens are stored under
~/.config/google-workspace-mcp/, never in the code tree.
Requires uv on your PATH.
Related MCP server: Google-Workspace-MCP-Server
Setup
1. Install the plugin
/plugin marketplace add rajool/google-workspace-mcp
/plugin install google-workspace-mcp@google-workspace-mcpThis gives you the /google-workspace-setup command, which can walk you
through the rest. The manual steps follow.
2. Create your own Google Cloud OAuth client
Each user creates their own client (free):
Go to the Google Cloud Console and create a project (or pick one).
APIs & Services → Enabled APIs & Services → + Enable APIs — enable Gmail API, Google Calendar API, and Google Drive API.
APIs & Services → OAuth consent screen — User type External. Fill the required fields. Under Test users, add every Google account you intend to connect. (Leaving the app in Testing is fine.)
APIs & Services → Credentials → + Create credentials → OAuth client ID → Application type: Desktop app. Download the JSON.
Save that JSON as:
~/.config/google-workspace-mcp/credentials.json
3. Install the server binary
So a project's .mcp.json can launch it by name:
# from GitHub:
uv tool install git+https://github.com/rajool/google-workspace-mcp
# …or from a local clone:
uv tool install .This installs two commands: google-workspace-mcp (the server) and
google-workspace-authorize (the OAuth helper).
4. Define your accounts
Give each account a short slug. Two ways:
a) A registry file (recommended) — ~/.config/google-workspace-mcp/accounts.json:
{
"accounts": {
"work": { "email": "you@company.com", "name": "Your Name" },
"personal": { "email": "you@gmail.com", "name": "Your Name" }
}
}name is the display name shown in the From: header on sent mail (set it
to "" to send with the bare address).
b) Or inline per project via the GWM_ACCOUNTS env var (see below) —
handy if you don't want a shared registry file.
5. Authorize each account
This opens a Google consent URL — open it in a browser signed into that account and click Allow:
# account already in accounts.json — just the slug:
google-workspace-authorize work
# or register a brand-new account inline (adds it to accounts.json):
google-workspace-authorize personal you@gmail.com "Your Name"You'll click through the "Google hasn't verified this app" warning (it's
your own app) → Continue → Select all → Continue. The refresh token is
written to ~/.config/google-workspace-mcp/tokens/<slug>.json.
6. Wire it into a project
Add a .mcp.json at the project root. GWM_ACCOUNTS decides which
accounts this project may use.
{
"mcpServers": {
"google-workspace": {
"command": "google-workspace-mcp",
"env": { "GWM_ACCOUNTS": "work,personal" }
}
}
}GWM_ACCOUNTScan be a comma-list of slugs from your registry (above), or an inline JSON map ({"work":{"email":"…","name":"…"}}) if you skipped the registry.Omit
GWM_ACCOUNTSto expose every account in the registry.
Restart Claude Code (or reconnect MCP) to pick it up, then ask Claude to list accounts to confirm.
Per-project access control
The point of GWM_ACCOUNTS is isolation: a project literally cannot act
as an account that isn't in its list — the server refuses the slug. Tokens
are stored centrally (authorize once), but each project's .mcp.json
chooses its own slice. Example:
project |
| can use |
personal site |
| personal only |
work app |
| work + support |
Tool surface
Every call requires an account slug.
accounts_list— configured accounts + which have valid tokensGmail —
gmail_send,gmail_draft_create,gmail_draft_update,gmail_draft_send,gmail_draft_delete,gmail_drafts_list,gmail_search,gmail_thread_get,gmail_message_get,gmail_message_modify,gmail_message_trash,gmail_labels_listCalendar —
calendar_list,calendar_events_list,calendar_event_get,calendar_event_create,calendar_event_update,calendar_event_deleteDrive —
drive_search,drive_file_get,drive_file_download,drive_file_upload,drive_file_move,drive_file_rename,drive_file_trash,drive_file_share,drive_folder_createTasks —
tasklist_list,tasklist_create,tasklist_delete,task_list,task_get,task_create,task_update,task_complete,task_delete,task_move
Configuration & storage
Everything lives under the config home — $GWM_HOME, else
$XDG_CONFIG_HOME/google-workspace-mcp, else
~/.config/google-workspace-mcp/:
what | path | override |
OAuth client secret |
|
|
Account registry |
|
|
Per-account tokens |
|
|
Per-instance account scope | — |
|
Token files are written 0600.
Scopes
Broad on purpose — these are your own accounts; narrower scopes would force a re-auth every time a tool is added.
https://mail.google.com/https://www.googleapis.com/auth/calendarhttps://www.googleapis.com/auth/drivehttps://www.googleapis.com/auth/tasks
Security notes
The OAuth client and tokens are yours and stay on your machine, outside this repo. Never commit
credentials.jsonortokens/.Each teammate runs their own OAuth client and authorizes their own accounts — nothing is shared between users.
Tokens grant broad access to your mail/calendar/drive; treat
~/.config/google-workspace-mcp/like any other secret store.
License
MIT © Ali Rajool. See LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/rajool/google-workspace-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server