Labsco
aaronsb logo

Google Workspace

β˜… 160

from aaronsb

Manage Gmail, Calendar, Drive, and Contacts through Google Workspace APIs using OAuth 2.0.

πŸ”₯πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredNeeds API keys

Google Workspace MCP Server

npm version Latest release Node License

Give AI agents full access to Google Workspace β€” Gmail, Calendar, Drive, and more β€” through a single MCP server that handles multi-account credential routing, response formatting for AI consumption, and contextual guidance.

Built on Google's official Workspace CLI (gws), which means API coverage grows as Google does. The server uses a manifest-driven factory that turns declarative YAML into fully functional MCP tools β€” adding a new Google API operation is a config change, not a code change.

Why This MCP Server

For users: One install gives your AI agent real, authenticated access to your Google accounts. Search email, check your calendar, manage Drive files, chain multi-step workflows β€” all through natural conversation.

For teams: Multi-account support means your agent can work across personal and work accounts simultaneously, with per-account credential isolation and XDG-compliant storage.

For developers: The factory architecture means coverage expands fast. Google's Workspace CLI already supports 15+ services and hundreds of API operations. The manifest curates which ones are exposed, patches add domain-specific formatting, and the defaults handle everything else.

What's Available

7 Google-service tools (~80 operations) plus account, batching, and content-authoring tools. The full surface β€” what's covered, what isn't, and how it grows β€” is mapped in API coverage.

ToolWhat It Does
manage_emailGmail β€” search, read (plain or sanitized HTML body), send, reply / reply-all, forward, triage, trash, 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 (update), 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 β€” browse past conferences, participants, transcripts, recordings, smart notes
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)
queue_operationsChain operations sequentially with $N.field result references

Every response includes next-steps guidance β€” the agent always knows what it can do next.

How It Works

Copy & paste β€” that's it
                          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
MCP Client ──stdio──▢     β”‚  manifest/*.yaml         β”‚
                          β”‚  (one file per service)  β”‚
                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                   β”‚
                          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                          β”‚  Factory Generator       β”‚
                          β”‚  schemas + handlers      β”‚
                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                   β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β–Ό              β–Ό              β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚  Gmail   β”‚  β”‚ Calendar β”‚  β”‚  Drive   β”‚
              β”‚  Patch   β”‚  β”‚  Patch   β”‚  β”‚  Patch   β”‚
              β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
                   β”‚             β”‚             β”‚
                   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                          β–Ό             β–Ό
                    Account Router ──▢ gws CLI ──▢ Google APIs

The factory reads a YAML manifest and generates MCP tool schemas and request handlers at startup. Patches add domain-specific behavior where needed β€” Gmail search hydration, calendar formatting, Drive file type detection. Operations without patches get sensible defaults automatically.

The underlying engine is Google's @googleworkspace/cli β€” a Rust binary that wraps the full Google Workspace API surface. The MCP server curates which operations to expose and shapes the responses for AI consumption.

Expanding Coverage

The server discovers operations from the gws CLI, which already supports 15+ Google services (Sheets, Docs, Tasks, People, Chat, and more). Adding coverage is a manifest edit:

Copy & paste β€” that's it
make manifest-discover   # Find all 287+ available operations
make manifest-lint       # Validate the curated manifest
make test                # Verify everything works

New operations get default formatting automatically. Add a patch only when you need domain-specific presentation.

Data Storage

Follows XDG Base Directory Specification:

DataLocation
Account registry~/.config/google-workspace-mcp/accounts.json
Credentials~/.local/share/google-workspace-mcp/credentials/

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

License

MIT