Back to Browse

Google Workspace MCP Server

Developer Tools5.4Moderate riskMCP RegistryLocal
Free

Server data from the Official MCP Registry

Give AI agents access to Gmail, Calendar, Drive, and more — multi-account, manifest-driven

About

Give AI agents access to Gmail, Calendar, Drive, and more — multi-account, manifest-driven

At a glance

Runs
On your computer, from the npm package @aaronsb/google-workspace-mcp, which we verified belongs to this listing.
Works with
Claude Desktop, Claude Code, Grok Build (formerly Cursor), Windsurf, VS Code, Codex, Antigravity CLI, Gemini CLI, ChatGPT.
Can access
  • Connects to services on the internet
  • Reads files on your computer
  • Writes or changes files on your computer

Security report

How we score
5.4out of 10Moderate riskMCP Marketplace security score

Serious: Uses an outdated component (@modelcontextprotocol/sdk) with a known security hole

This is a Google Workspace MCP server that uses user-supplied OAuth credentials from environment variables and calls Google APIs on the user's behalf, with network access and local token storage that match its stated purpose. The visible code (entrypoint, lifecycle, Node floor checks, Meet formatting helpers) shows no data exfiltration, shell execution, or hardcoded secrets, though the truncated portions of the codebase (OAuth token handling, file sandbox, and the remaining Meet handler) could not be fully reviewed. Supply chain analysis found 10 known vulnerabilities in dependencies (0 critical, 3 high severity). Package verification found 1 issue.

8 files analyzed · 15 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

HTTP Network Access

Connects to external APIs or services over the internet.

File System Read

Reads files on your machine. Normal for tools that analyze or process local data.

File System Write

Writes or modifies files on your machine. Check that this is expected for the tool.

env_vars

Check that this permission is expected for this type of plugin.

system_info

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Google OAuth 2.0 Client ID (Desktop application)Required

Environment variable: GOOGLE_CLIENT_ID

Google OAuth 2.0 Client SecretRequired

Environment variable: GOOGLE_CLIENT_SECRET

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "google-workspace-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@aaronsb/google-workspace-mcp@4.10.0"
      ],
      "env": {
        "GOOGLE_CLIENT_ID": "your-google-client-id-here",
        "GOOGLE_CLIENT_SECRET": "your-google-client-secret-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

Google Workspace MCP Server

npm version Latest release Node License

Give your AI agent real access to Google Workspace — Gmail, Calendar, Drive, Docs, Sheets, Tasks, Meet and Contacts — from one MCP server, across as many accounts as you have.

Search your mail, check your calendar, write a doc, file a task — in conversation, as yourself.

Install

First, you need Google OAuth credentials — the one prerequisite common to every path:

  1. Go to console.cloud.google.com/apis/credentials
  2. Create an OAuth 2.0 Client ID, application type Desktop app
  3. Enable the APIs you want (Gmail, Calendar, Drive, Sheets, Docs, Tasks, Meet — and People API for contacts, which is what Google calls it in the console)
  4. Keep the Client ID and Client Secret handy — you'll paste them in below

The OAuth client is yours, so Google's terms for AI tools apply to you as its developer; see Google's terms for AI tools before you start.

Then pick the path that matches how you work. All three run the same server.

Node 22.12 or newer. (Node 18 and 20 are both end-of-life.)


📦 → 🤖 Claude Desktop — one-click .mcpb install (recommended)

Download google-workspace-mcp.mcpb from the latest release, then drag it onto the Claude Desktop window, or double-click it.

Claude Desktop opens an install dialog with three fields:

Field
Google OAuth Client IDrequired — from the step above
Google OAuth Client Secretrequired — from the step above
Workspace Directoryoptional — where attachments, downloads and exports land. Defaults to ~/.local/share/google-workspace-mcp/workspace/. Give it a dedicated folder — not your home, Documents, Desktop, or a Google Drive folder.

Paste, hit Save, done. No JSON to edit, no Node to install, no paths to get right — the bundle carries the server and every dependency.

One bundle covers every platform — macOS (Intel and Apple Silicon), Linux (x64 and ARM64), and Windows. There is nothing to choose: the server is pure JavaScript, so there is no platform-specific payload to pick between.

Cross-platform note: .mcpb files install via Claude Desktop's bundled handler. If double-clicking doesn't trigger Claude on your system, drag the file onto the Claude Desktop window instead, or right-click → "Open with…" and pick Claude Desktop (then "always open with" if your OS offers). Behavior varies: macOS usually auto-associates, Windows may need a one-time association, Linux varies by desktop environment.


Claude Code — one command

claude mcp add google-workspace \
  -e GOOGLE_CLIENT_ID=your-client-id \
  -e GOOGLE_CLIENT_SECRET=your-client-secret \
  -- npx -y @aaronsb/google-workspace-mcp

That's it — no file to edit. Verify with /mcp.


Other MCP clients

Add an entry to the client's MCP config file (for Claude Desktop by hand, that's claude_desktop_config.json; for Claude Code, .mcp.json):

{
  "mcpServers": {
    "google-workspace": {
      "command": "npx",
      "args": ["-y", "@aaronsb/google-workspace-mcp"],
      "env": {
        "GOOGLE_CLIENT_ID": "your-client-id",
        "GOOGLE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Or install it globally and point at the binary directly:

npm install -g @aaronsb/google-workspace-mcp

How it fits together

flowchart LR
    human["🧑 You<br>ask in plain language"]
    agent["🤖 Your AI agent<br>Claude Desktop, Claude Code…"]
    server["⚙️ This MCP server<br>picks the right account,<br>builds the real request"]
    keys[("🔑 Your accounts<br>OAuth tokens, kept<br>on your own machine")]
    google["☁️ Google<br>Gmail · Calendar · Drive · Docs<br>Sheets · Tasks · Meet · Contacts"]

    human -->|"“what's on my calendar?”"| agent
    agent -->|"tool call"| server
    server <-->|"which account?"| keys
    server -->|"real API call, as you"| google
    google -->|"your data"| server
    server -->|"shaped for an agent<br>+ what to do next"| agent
    agent -->|"an answer"| human

    classDef person   fill:#475569,color:#ffffff,stroke:#94a3b8
    classDef robot    fill:#2d7d9a,color:#ffffff,stroke:#4a5568
    classDef ours     fill:#7c3aed,color:#ffffff,stroke:#8b5cf6
    classDef secrets  fill:#2d8e5e,color:#ffffff,stroke:#4a5568
    classDef external fill:#f6821f,color:#1a1a1a,stroke:#d97706

    class human person
    class agent robot
    class server ours
    class keys secrets
    class google external

Your credentials never leave your machine. The server holds an OAuth token per account, on your own disk, and calls Google as you — there is no middleman service, no account of ours, nothing to sign up for. Add as many accounts as you like (personal and work, side by side); the server routes each request to the right one.

What it can do

12 tools across 8 Google services, plus multi-account handling, per-account read-only access, bulk execution, content authoring, and a file sandbox.

ToolWhat It Does
manage_emailGmail — search, read (plain or sanitized HTML), send, reply / reply-all, forward, triage, trash, drafts (list / delete), labels, threads, attachments
manage_calendarCalendar — list, agenda, get, create, quickAdd (natural language), update, delete, calendars, freebusy
manage_driveDrive — search, get, upload, download, copy, rename / move, delete, export, permissions, comments, view images
manage_sheetsSheets — read / write ranges (row-numbered output), append, clear, manage tabs, copy / duplicate / rename
manage_docsDocs — get, create, append, insert text, find-and-replace
manage_tasksTasks — list / create / update / complete tasks and task lists
manage_meetMeet — create and configure meeting spaces, see who is in a call now, browse past conferences, participants, transcripts, recordings, smart notes
manage_contactsContacts — look people up in your saved contacts, the addresses you have only corresponded with, and your organization's directory; create, update and delete contacts
manage_accountsMulti-account lifecycle — add accounts, manage credentials and scopes
manage_scratchpadCompose / edit multi-line content (line- or JSON-path-addressed), attach files, send to any target; JSON mode live-syncs to Docs / Sheets
manage_workspaceFile operations in the workspace sandbox (exchange point for attachments, downloads, exports)
bulk_operationsDo many things in one call — chain different operations in sequence with $N.field references, or apply one operation to many resources in a single Google request (queue_operations still works as an alias)

Every response carries next-steps guidance, so the agent always knows what it can do next.

One ask, many steps

The useful part isn't any single operation — it's that your agent can string them together.

You ask for one thing. The agent works out that it needs four API calls, in order, each one feeding the next:

sequenceDiagram
    autonumber
    participant H as 🧑 You
    participant A as 🤖 Your agent
    participant S as ⚙️ MCP server
    participant G as ☁️ Google

    H->>A: "file the invoice from Acme<br>and remind me to pay it Friday"
    A->>S: find the email
    S->>G: search Gmail
    G-->>S: the message
    S-->>A: found it — and here's what you can do next
    A->>S: save the attachment
    S->>G: download it
    A->>S: put it in Drive
    S->>G: upload
    A->>S: create a task, due Friday
    S->>G: Google Tasks
    A-->>H: Done. Invoice filed, task set for Friday.

Two things make this work. Every response tells the agent what it can do next, so it isn't guessing at the next step. And bulk_operations lets it run a whole chain in one call, feeding each result into the next — so "find the invoice, file it, remind me" is a single round trip rather than four.

When the work is the same operation over many things, it can go further and use one Google request for all of them:

bulk_operations { mode: 'batch', tool: 'manage_email', operation: 'trash',
                  items: ['msg1', 'msg2', 'msg3', … ] }

Two hundred messages trashed in one round trip instead of two hundred. This is narrow on purpose — it works only where Google publishes a method for it, which today is contacts (create, update, delete, get) and Gmail (trash, label changes). Ask for it anywhere else and the answer names the operations that can, and points you back at sequential mode, which works everywhere.

Ask for what's missing

This server exposes 95 operations, reaching 79 of the 257 methods Google publishes across those eight APIs. It is a curated subset on purpose: an agent has to choose among these, and every method it must weigh is one it can pick wrongly. A tool with 257 operations isn't more capable than one with 95 — it's harder to use correctly.

But that judgement was made without you.

→ Browse every method Google publishes

Every method is listed — what it does, whether we expose it, and a Request link that opens a pre-filled issue. The descriptions are Google's own, quoted verbatim, and the page is generated from the same specification the client is built from, so it can't drift from reality.

That page also lists three whole APIs this server doesn't touch yet — Chat, Slides and Forms — for the same reason: not targeted is a decision, not a fact of nature.

A good request names the task, not the method:

"I want the agent to file incoming invoices into a folder automatically."

That can be evaluated. It might turn out an existing operation already does it, or that the right answer is a different method than the one you found. "Expose users.settings.filters.create" is a conclusion, not a case — lead with the problem and let the method follow.

Why Apache 2.0, and not open core

Everything is here. There is no paid tier, no "enterprise" build, no feature held back to sell you later. What you install is what exists.

Open core works by keeping the good part back. The free thing is a lead magnet, and the moment your use gets serious you discover the operation you need lives behind a licence. That model would be especially rotten here: this is a piece of plumbing between you and your own data, using your own Google credentials, running on your own machine. Nothing about that arrangement should have a paywall in the middle of it, and nothing about it needs a vendor.

Apache 2.0 rather than MIT for two concrete reasons:

  • An explicit patent grant. Contributors licence their patent claims along with their code, so using this can't become a patent problem later. MIT is silent on patents, which means the question is merely unanswered rather than settled.
  • It's safe to adopt at work. Apache 2.0 is on essentially every corporate allow-list. Fork it, vendor it, ship it inside a commercial product — you don't owe anyone anything, and you don't need to ask.

The one obligation is attribution: keep the notices (NOTICE, LICENSE) with the code. That's it.

Through v3.0.0 this project was MIT-licensed, and that history is preserved rather than erased — MIT-era contributions keep their original notice in LICENSE-MIT, and their authors are credited in NOTICE. Apache 2.0 takes back nothing MIT permitted.

Google's terms for AI tools

On November 24, 2026 Google published the Workspace AI Tools Addendum to its API terms. It applies "If you use or authorize any GWS Access Tool to access or interact with any GWS Access Point". This server is such a tool, and the Workspace APIs it calls are such access points. In Google's words:

"The GWS Access Tool must use a Google MCP where the GWS Access Tool is or is driven by an AI Agent, an AI Harness or an AI model or service employing an AI model."

"You may not obfuscate or otherwise allow any GWS Access Tool to avoid classification as a GWS Access Tool or to circumvent this requirement to use a Google MCP."

You may not "Retain any user data obtained via GWS Access Tools or any Google Technical Information after you have disconnected the GWS Access Tool or revoked its access to the GWS Access Point(s);"

For that and the other activities the Addendum's Item 2 lists, its Item 3 says:

"Google may immediately (1) restrict or remove the GWS Access Tool’s access to the GWS Access Point(s) and corresponding GWS Service(s); or (2) suspend or terminate your access to or use of the GWS Access Point(s) or corresponding GWS Service(s), as necessary in Google’s determination to stop the activity."

Google's quota usage tiers page says how it enforces the MCP requirement, and where it does not apply. In its section "Tier and billing policies":

"Starting February 1, 2027, external AI agents or similar access tools that call Google Workspace REST APIs directly instead of MCP are limited to Standard Tier quotas, regardless of the tier selected."

"Internal agentic use cases aren't required to use MCP."

In its section "Usage tiers" the page describes a separate quota designation, the internal-use exception, which a Workspace super administrator enrolls a project in:

"This exception applies only to projects used by users within the same Google Workspace organization that don't share their API or MCP access directly with third-party services."

How we read it

  • The project ships no OAuth client, and Google's API Terms say "Developer credentials may not be embedded in open source projects." You create your own client, so you are the developer these terms bind.
  • The server calls the Workspace REST APIs directly. It does not disguise itself: requests go out under your own OAuth client, with nothing that masks what drives them.
  • Meet and People (contacts) are not on Google's list of its MCP servers, so as far as we know their access through this server has no Google MCP to use.
  • The Addendum states no exemption for self-hosted or individual use. The quota page exempts "internal agentic use cases" from MCP without defining "internal", and its internal-use exception excludes projects that share API access directly with third-party services. That condition is likely to bear on you if you run this server in a hosted AI client.
  • Google describes the technical enforcement as REST quota limits from February 1, 2027. The API Terms separately let Google suspend access "if we reasonably believe that you are in violation of the Terms", and we read the Addendum as part of those Terms.
  • Google asks developers to select "Use this client for an AI-powered agent" (is_agentic) "on OAuth 2.0 clients used by AI agents"; the project has not decided what to recommend about it.

What the server keeps today: your refresh token, in a plain JSON file with mode 0600, which the maintainer chose over encryption or an OS keychain; and the files it downloads for you, in the workspace folder (see Where your data lives). In releases before v4.10.0, removing an account deletes the local credential but does not revoke access at Google; you can revoke it at myaccount.google.com/permissions. The planned v4.10.0 release changes removal to revoke access and clear local data.

Whether to run this server under these terms is your decision. This is the project's reading, not legal advice. The sources, the full quotes and the open questions are in ADR-204.

Usage

Add an account (opens a browser for OAuth):

manage_accounts { "operation": "authenticate" }

Then use any tool with your account email:

manage_email    { "operation": "triage", "email": "you@gmail.com" }
manage_calendar { "operation": "agenda", "email": "you@gmail.com" }
manage_drive    { "operation": "search", "email": "you@gmail.com", "query": "quarterly report" }

Give an account read-only access

Some accounts should never be written to. Ask for less at consent time and the token itself cannot send, edit or delete — this isn't a rule layered over a broad token:

manage_accounts { "operation": "scopes", "email": "you@gmail.com",
                  "services": "gmail,drive,contacts", "access": "read" }

Google is asked for the read-only variant of each scope, so ticking every box on the consent screen still yields a read-only token. manage_accounts status reports what each account actually holds.

A write from a read-only account is refused before the request leaves, with the account, the operation, and the way back:

'create' needs write access to contacts. Account you@gmail.com was authorized
read-only for contacts. Re-authorize with manage_accounts {operation:'scopes',
email:'you@gmail.com', services:'contacts', access:'readwrite'}, or use an
account that already has it.

Where a service has no read-only scope, you're told which ones and what they'll still be able to do before the browser opens.

Multi-step workflows

Chain operations with result references — the output of one step feeds the next:

{
  "operations": [
    { "tool": "manage_email", "args": { "operation": "search", "email": "you@gmail.com", "query": "from:boss subject:review" }},
    { "tool": "manage_email", "args": { "operation": "read", "email": "you@gmail.com", "messageId": "$0.messageId" }}
  ]
}

One operation, many things

Where Google publishes a method for it, the same operation across many resources costs one request:

{
  "mode": "batch",
  "tool": "manage_contacts",
  "operation": "delete",
  "email": "you@gmail.com",
  "items": ["people/c1", "people/c2", "people/c3"]
}

Anything shared by the whole batch goes at the top level; items carry only what differs — a bare id is enough when that's all it is.

Where your data lives

Follows the XDG Base Directory Specification:

DataLocation
Account registry~/.config/google-workspace-mcp/accounts.json
Credentials~/.local/share/google-workspace-mcp/credentials/
Workspace (file exchange)~/.local/share/google-workspace-mcp/workspace/, or the folder WORKSPACE_DIR names

Credentials are per-account files holding standard OAuth tokens. No secrets are stored in the project directory.

The workspace holds the files the server writes for you: attachments, archived messages, Drive downloads and exports, and what you or your agent save there. Each account has its own folder inside it, named like its credential file (workspace/you_at_example_dot_com/), and a file always lands in the folder of the account that fetched it. Folders are kept only for accounts you have registered, under the address as manage_accounts list shows it. A tool reading a workspace file by name looks only in the calling account's folder, so no file name, in any case, reaches another account's files; a call that names another account in email acts as that account, as every Gmail and Drive call does.

The server creates account folders, and the workspace folder itself when it creates it, readable by you alone (mode 0700). It does not change a workspace folder that already exists, such as one you chose with WORKSPACE_DIR; if other users on the machine can read it, the server says so once on stderr when it starts.

Removing an account (manage_accounts remove) deletes its workspace folder along with its credential.

Files written by releases before per-account folders stay at the top of the workspace, because nothing records which account they came from, so removing an account does not delete them. manage_workspace list shows them apart, as from before per-account folders. A tool reading a name that is not in the account's folder still finds such a file, so existing attachments keep working. Delete them with manage_workspace delete and no email, move one into an account's folder with manage_workspace move, or remove them by hand.

Under the hood

You don't need any of this to use the server. But if you're curious, or you want to add an operation:

The server builds its Google API client from Google's own machine-readable API specifications. Nothing is transcribed by hand, so the surface can't drift from reality, and adding an operation is a YAML edit rather than a code change.

  • How it works — the build-time / runtime split, the descriptor, the factory
  • API coverage — what's exposed, what isn't, and how to ask for more
  • The full API surface — every method Google publishes, plus the three APIs we don't target yet
  • Architecture decisions — the ADRs, including why this server owns its Google client outright

License

Apache License 2.0 — see Why Apache 2.0 above.

Reviews

No reviews yet

Be the first to review this server!