MCP Google Tools Server
Provides tools for drafting, sending, searching, archiving, labeling, and deleting emails, with safety features like draft mode and confirmation.
Provides tools for listing events, finding free time slots, and creating meetings with attendees.
Provides tools for reading, creating, appending text, filling templates, and exporting documents to PDF.
Provides tools for searching, copying, moving, sharing files, and managing permissions.
Provides tools for reading and writing ranges, named ranges, filter views, find and replace, and CSV export.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Workspace Operator
Deep automation for Google Workspace through the Model Context Protocol
Drive · Docs · Sheets · Slides · Gmail · Calendar · Apps Script — one local MCP server with 67 tools, staged writes and server-side tool profiles.
Workspace Operator (formerly yet-another-google-mcp) runs on your machine, talks to Google over your own OAuth client, and gives an AI agent the operations that turn "read my inbox" into "do the work and let me undo it": staged Apps Script updates, file transfer in both directions, presentation assembly, sheet formatting, threaded replies and attachments.
67 tools · 3 resources · 3 resource templates · 8 prompts, every tool annotated
with readOnlyHint / destructiveHint.
Nothing here is tied to a specific account, spreadsheet or document: every tool takes identifiers and ranges, and all examples use synthetic data.
How it compares
Google Workspace MCP (remote) | Workspace Operator | |
Transport | Streamable HTTP, Google-hosted | stdio, local |
Availability | Developer Preview | public, MIT |
Data path | Google MCP endpoint | your machine, your OAuth client |
Apps Script | — | create · read · stage · execute · cancel · restore · run function |
Local files | — | upload, download, export to pdf/docx/xlsx/pptx |
Slides | — | create, add slides, fill text, insert images |
Sheets formatting | — | bold, colours, number formats, widths, freeze |
Gmail threads | single messages | threads, attachments, in-thread replies |
Server-side tool profiles | IAM / admin allow-list | read-only / read-write / full + allow-deny |
Official servers are the right default for "ask my mail a question". Workspace Operator is for "change the workspace and be able to roll it back".
Related MCP server: MCP Google Workspace Server
What you get
Group | Tools | Highlights |
🔎 Cross-search | 1 | One query over Drive, Gmail and Calendar, merged by date |
📁 Drive | 8 | Search, move, copy, share, permissions, revoke public access |
💾 Drive files | 3 | Upload/download/export, conversion to native Google formats |
📊 Sheets | 12 | Read/write, formatting, filter views, named ranges, CSV |
📄 Docs | 5 | Read (tables included), append, templates, PDF export |
🖼 Slides | 5 | Create decks, add slides, replace text, insert images |
⚙️ Apps Script | 7 | Staged updates with backups, rollback, run functions |
📧 Gmail | 14 | Threads, attachments, replies, drafts, labels, batch delete |
📅 Calendar | 7 | Events, free slots, meetings, update/delete, invite responses |
🧩 Composite | 5 | report from sheet, digest, table diff, template clone, table → deck |
Plus 3 resources, 3 resource templates and 8 prompts — see the tool catalog.
Quick start
1 — Install
pip install workspace-operator-mcpFrom source (development):
git clone https://github.com/Artoxem/workspace-operator.git
cd workspace-operator
python -m venv .venv && .venv\Scripts\activate # Windows
pip install -r requirements.txtPython 3.10 or newer. The package installs the workspace-operator command; the
python -m workspace_operator form works from a source checkout too.
2 — Google OAuth
Create an OAuth 2.0 Client ID (type: Desktop app) in Google Cloud Console.
Enable these APIs: Drive, Docs, Sheets, Slides, Gmail, Calendar, Apps Script.
Download the client JSON — the server will read it on first run.
Step by step: docs/AUTH_SETUP.md · docs/ru/AUTH_SETUP.md Upgrading? Slides needs the
.../auth/presentationsscope — re-run the OAuth flow once.
3 — Configure
cp config.example.yaml config.yamlclient_secrets_file: "C:\\Users\\you\\.google\\oauth.keys.json"
token_file: "C:\\Users\\you\\.google\\token.json"
backup_dir: "C:\\Users\\you\\.google\\backups"
mcp_auth_token: "MySecretToken_2026!"
tool_profile: "read-write" # full | read-write | read-onlymcp_auth_token is a local activation key, not network security: the server refuses
to handle tools until it is set. Every key can be overridden by an environment
variable — see docs/SECURITY.md.
4 — Connect a client
~/.gemini/config/mcp_config.json (global) or <workspace>/.agents/mcp_config.json:
{
"mcpServers": {
"workspace-operator": {
"command": "python",
"args": ["D:\\DEV\\workspace-operator\\server.py"],
"env": {
"MCP_CONFIG_FILE": "D:\\DEV\\workspace-operator\\config.yaml",
"MCP_AUTH_TOKEN": "MySecretToken_2026!",
"MCP_TOOL_PROFILE": "read-write"
},
"timeoutSeconds": 300,
"tools": { "workspace_search": { "eager": true } }
}
}
}Ready-made file: antigravity/mcp_config.example.json · walkthrough: antigravity/README.md · Agent Skill: skills/google-workspace/SKILL.md
{
"mcpServers": {
"workspace-operator": {
"command": "python",
"args": ["D:\\DEV\\workspace-operator\\server.py"],
"env": {
"MCP_CONFIG_FILE": "D:\\DEV\\workspace-operator\\config.yaml",
"MCP_AUTH_TOKEN": "MySecretToken_2026!"
}
}
}
}Per-client paths: docs/IDE_SETUP.md · docs/ru/IDE_SETUP.md.
Tool profiles
A profile is a server-side allow-list: tools outside it are neither listed nor callable. It complements OAuth scopes (what Google allows) and client permissions (what the agent may do without asking).
Profile | Tools | Use it for |
| 67 | your own machine, full trust |
| 59 | daily work — destructive tools hidden |
| 21 | exploration, demos, shared machines, untrusted agents |
tool_profile: "read-write"
# Optional, applied on top. Deny wins over allow.
allowed_tools: ["workspace_search", "find_files", "read_sheet", "read_email"]
denied_tools: ["send_email", "share_file"]Environment overrides: MCP_TOOL_PROFILE, MCP_ALLOWED_TOOLS, MCP_DENIED_TOOLS.
A blocked call returns a clear explanation instead of failing silently.
Operations
python -m workspace_operator doctor # config, token, scopes, API reachability
python -m workspace_operator doctor --offline # same, without network probes
python -m workspace_operator tools # catalog (--profile read-only, --json)
python -m workspace_operator serve # stdio server (same as python server.py)Feature | How to use it | What it does |
Dry run |
| Every non-read-only tool returns a preview instead of executing — safe demos, safe exploration |
Audit log |
| One JSON line per call: tool, profile, status, duration, argument names (never values) |
Retries |
| Transient Google API errors (429/5xx) are retried with exponential backoff |
Doctor |
| Checks secrets, token, granted vs configured scopes, and Drive/Gmail/Calendar reachability |
In dry-run the read-only tools still work, so an agent can explore data while every write is turned into an explicit preview.
HTTP transport (localhost first)
python -m workspace_operator serve --http --port 8765binds
127.0.0.1by default — not reachable from the network;every request needs
Authorization: Bearer <mcp_auth_token>; extra per-client tokens can be listed underhttp_tokensinconfig.yaml, and the audit log records the token name asclient;DNS-rebinding protection is on: only expected
Hostheaders pass, browser origins are denied unless explicitly allowed;GET /healthzis unauthenticated and returns only version and transport info;binding a non-loopback address requires both
--allow-networkand--insecure; loopback names accept any host port (containers, proxies), anything else needs an explicit--allow-host;--insecure, so network exposure is always deliberate.
Docker
docker pull ghcr.io/artoxem/workspace-operator:latest
docker run --rm -p 127.0.0.1:8765:8765 \
-v "$HOME/.google:/home/app/.google" \
-v "$PWD/config.docker.yaml:/app/config.yaml:ro" \
-e MCP_AUTH_TOKEN="$(python -c 'import secrets; print(secrets.token_urlsafe(32))')" \
ghcr.io/artoxem/workspace-operator:latestThe image runs as an unprivileged user (uid 10001), publishes only to loopback and
mounts the Google credentials read-write, because the server refreshes the token in
place. docker compose up --build builds the same image locally.
Clients that only speak stdio can still use the image — the entrypoint takes the same arguments as the CLI:
docker run -i --rm \
-v "$HOME/.google:/home/app/.google" \
--entrypoint python \
ghcr.io/artoxem/workspace-operator:latest -m workspace_operator serveSomething not working? See docs/TROUBLESHOOTING.md.
Tool catalog
Tool | Type | Description |
| read | One query across Drive, Gmail and Calendar, date-sorted, partial failures reported |
Tool | Type | Description |
| read | Search by name or Drive query |
| read | Full Drive query syntax with a limit |
| read | List permissions of a file |
| write | Create a folder |
| write | Move a file into a folder |
| write | Copy a file |
| write | Share with user/group/domain/anyone |
| destructive | Revoke public access ( |
Tool | Type | Description |
| write | Upload a local file; |
| read | Download a binary file to disk |
| read | Export a Doc/Sheet/Slide to pdf, docx, xlsx, pptx, csv… |
Tool | Type | Description |
| read | Read a cell range |
| read | Sheet names and IDs |
| read | Export a range as CSV |
| write | Append a row |
| write | Write rows to a range |
| write | Create a spreadsheet |
| write | Add a tab |
| write | Create a filter view |
| write | Create a named range |
| write | Find & replace ( |
| write | Bold, colours, number formats, widths, row heights, frozen panes |
| destructive | Clear a range (auto dry-run for large ranges) |
Tool | Type | Description |
| read | Read text and tables |
| read | Export as binary PDF |
| write | Create a document |
| write | Append text |
| destructive | Fill placeholders ( |
Tool | Type | Description |
| write | Create a presentation |
| read | Slide count, IDs and text per slide |
| write | Add a slide with a predefined layout |
| destructive | Replace placeholders ( |
| write | Insert a public image URL onto a slide |
Tool | Type | Description |
| read | Read project files |
| write | Create a project |
| write | Stage an update, returns |
| write | Apply a staged update (auto-backup first) |
| write | Cancel a staged update |
| write | Restore from a backup |
| destructive | Run a function from an API-executable deployment |
Tool | Type | Description |
| read | Authenticated address |
| read | List with date, sender and subject |
| read | Headers, labels, attachments and decoded body |
| read | Search with a compact summary |
| read | Whole conversation |
| read | Save an attachment to disk |
| write | Create a draft |
| write | Send or draft ( |
| write | Send an existing draft |
| write | Reply in-thread ( |
| write | Apply a label ( |
| write | Archive ( |
| destructive | Delete ( |
| destructive | Delete many ( |
Tool | Type | Description |
| write | Read a range → column statistics → Doc with native tables or plain text ( |
| write | Last N hours across Gmail, Calendar and Drive → text or Doc |
| write | Diff two ranges by a key column; |
| write | Copy any Drive file and replace placeholders in the copy |
| write | Read a range → deck: title slide + one slide per row group |
Tool | Type | Description |
| read | Upcoming events with times and locations |
| read | Free slots in a window |
| write | Create an event |
| write | Meeting with attendees ( |
| write | Change any field; only what you pass is modified |
| destructive | Delete an event ( |
| write | Accept / decline / tentative ( |
Resources
URI | Attaches |
| 20 most recently modified Drive files |
| Recent unread inbox messages |
| Events for the next 7 days |
| Metadata for one file |
| A sheet range as a table |
| Full document text, tables included |
Prompts
Prompt | What it does |
| Fetch recent mail → ready for a summary |
| Read a range → ready for analysis |
| Load calendar events → ready for planning |
| Search files → ready for organisation advice |
| Last N days of mail, files and agenda → weekly summary |
| Gmail slice → urgent / waiting / informational / archive |
| Range → statistics plus a briefing question |
| Two ranges → reconciliation report |
Safety by default
Guard | Applies to |
|
|
|
|
Draft mode by default |
|
Public sharing blocked |
|
No silent overwrite |
|
Staged Apps Script |
|
Tool annotations | every tool carries |
Server-side profiles |
|
⚠️ An agent can reach everything your OAuth token can. Use read-only scopes and the
read-onlyprofile for sensitive accounts — docs/SECURITY.md.
How it works
server.py MCP server: 67 tool definitions, resources, prompts, profiles
workspace_operator/
├─ profiles.py read-only / read-write / full + allow-deny lists
├─ config.py config file + environment overrides
├─ auth.py OAuth 2.0 credentials and token cache
├─ text.py entity/whitespace normalisation, timestamps, error hints
├─ operations.py staged-operation store for Apps Script
├─ security.py token and email checks
├─ runtime.py retries, audit log, dry-run helpers
├─ cli.py doctor / tools / serve
└─ handlers/
├─ search.py workspace_search — Drive + Gmail + Calendar
├─ files.py drive_upload / drive_download / drive_export
├─ formatting.py sheet_format request builders
├─ gmail_threads.py threads, attachments, in-thread replies
├─ slides.py presentations
├─ calendar_writes.py update / delete / invite responses
├─ report.py report_from_sheet: stats + document
├─ digest.py digest across mail, calendar and drive
├─ compare.py table diff by key column
├─ template.py clone a file and fill placeholders
├─ deck.py table → presentation
├─ drive.py sheets.py docs.py
├─ gmail.py calendar.py apps_script.py
tests/ unit, live and round-trip checks
antigravity/ ready-to-paste mcp_config.json
skills/google-workspace/ Agent Skill: when to use which toolDesign rules:
every handler returns a string — exceptions never reach the transport;
writes are staged, confirmed or drafted, never silent;
Apps Script is a two-phase commit with an automatic backup;
server-side profiles keep the exposed surface small.
Testing
python -m unittest discover -s tests -v # 251 unit tests, no network
python tests/live_smoke.py # 51 checks against a real account
python tests/pptx_roundtrip.py deck.pptx # 5 checks: pptx → Slides → replaceThe live suite is self-cleaning: it uploads and trashes a temp file, creates and
trashes a presentation and a spreadsheet, drafts and deletes a reply, downloads an
attachment and removes it. tests/test_docs.py keeps this README, the docs and the
code in sync (tool counts, profile numbers, links, examples).
Documentation
🇬🇧 English
Document | Description |
Google OAuth setup, step by step | |
Every tool, resource and prompt | |
Scopes, profiles, safety model | |
Antigravity, Cursor, Windsurf, VS Code | |
Symptom → cause → fix, including Docker | |
How this server was built | |
Release notes and specs for every version |
🇷🇺 На русском
Документ | Описание |
Пошаговая настройка OAuth | |
Справочник инструментов | |
Скоупы, профили, модель безопасности | |
Antigravity, Cursor, Windsurf, VS Code |
Limitations
Knowing the edges is part of the contract:
Drive: files can be created, copied, moved and unshared, but not deleted — use the Drive UI for that.
Sheets: no conditional formatting, charts or pivot tables; plain cell formatting only.
Docs: no comments, and tables can be created by the report tool but not edited cell by cell afterwards.
Slides: slides can be added and filled, but not deleted or reordered.
One account per server: a single OAuth token, no multi-tenant mode.
Roadmap
Cross-product search, tool profiles
Files, Slides, Apps Script execution
Sheet formatting
Gmail threads, attachments, replies
Calendar update/delete/respond
Composite tools:
report_from_sheet,digest,compare_tables,clone_and_fillOptional HTTP transport (Streamable HTTP, stateless, localhost-first)
Responsibility
You are responsible for what the agent does with your account. Read
docs/SECURITY.md, start with read-only, keep backups on.
MIT licensed · built on the MCP Python SDK
This server cannot be deployed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Hosted MCP server with managed OAuth for 15+ toolkits: Google Workspace, Fitbit, Oura, Kalshi, etc.
Related MCP Servers
- AlicenseAqualityCmaintenanceA Model Context Protocol server that provides seamless integration with Google Workspace, allowing operations with Google Drive, Docs, and Sheets through secure OAuth2 authentication.860 PyPI3MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI agents to interact with Google Workspace services including Drive, Docs, and Sheets through natural language commands.8MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that connects AI agents to Google Workspace (Gmail, Calendar, Drive, Docs, Sheets, and Slides).302MIT
- AlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that gives Claude access to Google Workspace including Gmail, Calendar, Drive, Contacts, Sheets, Docs, Slides, Tasks, and 100+ APIs via the gws CLI.22 npm2MIT