Google Workspace — Claude Code MCP server: install and setup
Links AI agents with Google tools like Gmail, Calendar, Drive, and Sheets. Operates locally across multiple accounts right from your chat.
claude mcp add --env GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> --env GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> --transport stdio google-workspace -- npx -y @aaronsb/google-workspace-mcpWhat Google Workspace does
This server connects coding agents to eight Google services. Tools like manage_email, manage_calendar, and manage_drive handle everyday office tasks. Your assistant can inspect email threads, book calendar meetings, update Docs, or read spreadsheet ranges.
Authentication requires your own OAuth 2.0 Desktop app credentials from Google Cloud Console. All access tokens stay on your local disk. Without Node 22.12 or newer installed, the process will fail. The server handles multiple accounts directly, keeping personal and work profiles separated.
What it helps with
- search inbox messages and send replies in Gmail
- inspect availability and schedule events in Google Calendar
- write or fetch row values in Google Sheets
- organize checklists and create entries in Google Tasks
Example prompts for the agent
- Check my calendar for tomorrow and list open slots in the afternoon.
- Look for recent emails from finance and download the attached spreadsheet.
- Append a new row to the quarterly budget sheet with yesterday's totals.
How to install Google Workspace
Platform CLI
claude mcp add --env GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> --env GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> --transport stdio google-workspace -- npx -y @aaronsb/google-workspace-mcpReplace <…> with your own values
Platform CLI
codex mcp add google-workspace --env GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> --env GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> -- npx -y @aaronsb/google-workspace-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"google-workspace": {
"command": "npx",
"args": [
"-y",
"@aaronsb/google-workspace-mcp"
],
"env": {
"GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
"GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"google-workspace": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@aaronsb/google-workspace-mcp"
],
"env": {
"GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
"GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> -e GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> google-workspace npx -y @aaronsb/google-workspace-mcpReplace <…> 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
How to install Google Workspace in Claude Code?
Run `claude mcp add --env GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> --env GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> --transport stdio google-workspace -- npx -y @aaronsb/google-workspace-mcp`. Replace the placeholders with your OAuth Client ID and secret.
What prerequisites are needed before configuration?
You need a Desktop app OAuth Client ID from Google Cloud Console with the necessary APIs enabled. Node version 22.12 or newer is also required on your system.
Are Google credentials sent to third-party services?
No, OAuth tokens reside strictly on your local disk. Requests go directly to Google APIs without passing through any external servers.