Antigravity Google Workspace MCP Server
Allows reading, searching, drafting, sending, and trashing Gmail messages, including full thread content and CC/BCC support.
Allows listing upcoming events, creating meetings with attendees, and deleting or canceling calendar events.
Allows creating new Google Docs, reading document body text, and appending text or markdown content.
Allows searching files, reading plain text or markdown content, and trashing files in Google Drive.
Allows reading spreadsheet ranges, appending rows, and updating cell ranges in Google Sheets.
Allows listing tasks, creating tasks with due dates, completing tasks, and deleting tasks in Google Tasks.
Click on "Deploy 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., "@Antigravity Google Workspace MCP Serverschedule a team sync tomorrow at 10am and invite alex@example.com"
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.
🌐 Antigravity Google Workspace Plugin
Unified Automation Bridge, Token-Optimized Telemetry & Dispatch Firewall for Google Workspace (Gmail · Drive · Docs · Sheets · Calendar · Tasks · Contacts)
📖 Why Google Workspace Plugin?
Most Google Workspace integrations force AI agents into one of two traps:
Tool Overload & Context Bloat: Splitting every Google service into a separate server wastes memory, burns LLM context with repetitive schemas, and dumps hundreds of emails into prompt memory.
Unchecked Destructive Authority: Giving an LLM unconstrained access to send live emails or delete Drive files leads to accidental outbounds and catastrophic data loss.
Antigravity Google Workspace Plugin solves both:
🌐 7-in-1 Unified Hub: A single, lightweight FastMCP engine connects Calendar, Tasks, Gmail, Drive, Docs, Sheets, and Contacts.
🛡️ The Dispatch Firewall: Read and draft operations execute instantly; high-risk actions (sending live emails, trashing Drive files, canceling meetings) require explicit user confirmation.
⚡ Token-Optimized Telemetry: Bounded list limits, smart search filtering (
newer_than:2d,is:unread), and specific spreadsheet cell ranges prevent LLM context exhaustion.🌅 Morning Executive Briefing: 1-shot situational routine combining calendar agenda, pending tasks, and unread priority emails into an actionable summary.
Related MCP server: google-services-mcp
🏛️ System Architecture
Deep Developer Documentation: For complete OAuth lifecycle flows, Dispatch Firewall state machines, token quarantine models, and API schemas, see docs/ARCHITECTURE.md.
┌─────────────────────────────────────────────────────────────────────────────┐
│ GOOGLE ANTIGRAVITY AGENT / MCP HOST │
│ (Antigravity CLI · Claude Desktop · Cursor) │
└──────────────────────────────────────┬──────────────────────────────────────┘
│ JSON-RPC (stdio)
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ ANTIGRAVITY GOOGLE WORKSPACE PLUGIN (mcp/server.py) │
├─────────────────────────────────────────────────────────────────────────────┤
│ 🛡️ Strict Dispatch Firewall (Pre-Execution 3-Point Confirmation) │
│ 🔐 OAuth 2.0 Dynamic Token Engine (Auto-Refresh & Local Quarantine) │
├──────────────────────────────────────┬──────────────────────────────────────┤
│ 📅 Google Calendar (Agenda/Events) │ 📬 Gmail (Draft-First & Search) │
│ ✅ Google Tasks (Action Items) │ 📂 Google Drive (Scoped Retrieval) │
│ 📝 Google Docs (Document Engine) │ 📊 Google Sheets (Bounded A1 Ranges) │
│ 👥 Google Contacts (Address Book) │ ⚡ Error Filtration & Sanitizer │
└──────────────────────────────────────┬──────────────────────────────────────┘
│ HTTPS (Google APIs v1/v3/v4)
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ GOOGLE CLOUD PLATFORM / WORKSPACE │
│ [ Gmail · Drive · Docs · Sheets · Calendar · Tasks · Contacts ] │
└─────────────────────────────────────────────────────────────────────────────┘🛡️ The Dispatch Firewall: Operational Safety Guardrails
To safeguard your communications and data, operations are partitioned into two strict security tiers:
Tier | Operations | Execution Policy |
Tier 1: Safe Autonomous |
| Executes autonomously with zero delay. |
Tier 2: High-Risk Dispatch |
| Mandatory Confirmation: Presents recipient/target, content preview, and requires user approval ( |
Draft-First Standard: When asking the agent to email someone, it defaults to creating a draft via gmail_create_draft. You can review the draft in your Gmail inbox before authorizing live delivery.
🛠️ Tool Catalog (22 Operations Across 7 Services)
Service | MCP Tool Name | Description |
📅 Calendar |
| Fetch upcoming meetings with |
| Schedule new calendar events with title, timestamps, attendees, and location. | |
| Cancel/delete an event by | |
✅ Tasks |
| List pending tasks from Google Tasks ( |
| Create new action items with title, notes, and due date. | |
| Mark a task completed by | |
| Delete a task from Google Tasks (Firewall Protected). | |
📬 Gmail |
| Query emails with standard Gmail search syntax ( |
| Retrieve full message headers, subject, date, and body text. | |
| Stage an unsent draft in Gmail (recommended workflow). | |
| Transmit live email to external recipients (Firewall Protected). | |
| Move unwanted email directly to Gmail trash. | |
📂 Drive |
| Find files by name, MIME type, or full-text query. |
| Read plain text or markdown export of Google Drive files. | |
| Move files to Google Drive trash (Firewall Protected). | |
📝 Docs |
| Create an empty Google Document. Returns new document ID. |
| Read full document body, paragraphs, and structure. | |
| Append text paragraphs or markdown sections to a doc. | |
📊 Sheets |
| Read values from a spreadsheet using bounded A1 notation ( |
| Append row arrays to the end of a spreadsheet. | |
| Overwrite a specified A1 cell range with a 2D matrix of values. | |
👥 Contacts |
| Query address book contacts by name or email. |
| Create a new contact with name, email, and phone. |
🚀 Quickstart & Setup
1. Prerequisites & Google Cloud Setup
Create a Google Cloud Project in the Google Cloud Console.
Enable the following 7 APIs:
Google Calendar API
Google Tasks API
Gmail API
Google Drive API
Google Docs API
Google Sheets API
People API (Contacts)
Configure the OAuth Consent Screen (User Type: External, add your Google account as a Test User).
Create OAuth 2.0 Client IDs (Application Type: Desktop app).
Download the credentials JSON, rename it to
credentials.json, and place it in the centralized credential vault:Linux / macOS:
~/.gemini/credentials/google-workspace/credentials.jsonWindows:
%USERPROFILE%\.gemini\credentials\google-workspace\credentials.json(Alternatively, setGOOGLE_WORKSPACE_CREDENTIALS_PATH; legacy path~/.gemini/config/google_workspace/is supported as fallback).
2. Authentication Setup
Run the interactive local authenticator:
pip install -r mcp/requirements.txt
python mcp/auth_setup.pyA browser window will open automatically asking you to authorize your Google account. Upon approval, token.json is generated locally and cached for automated token refresh.
If the browser doesn't open automatically: Copy the AUTH_URL printed in your terminal and paste it directly into your browser (Chrome/Edge/Brave).
🔑 Permanent Tokens: How to Bypass the 7-Day Expiration
By default, Google puts all new Google Cloud projects in "Testing" mode. Under Google's security policy, refresh tokens in "Testing" mode strictly expire after 7 days (168 hours), forcing you to re-authenticate every week.
How to Make Your Refresh Token Permanent (Never Expires):
Under Publishing status, click the button: "PUBLISH APP" and confirm.
Your app's status will change from Testing to In Production.
Do you need Google verification? NO!
For your own personal Google account, you do not need public verification.
When authenticating, Google will show a screen saying "Google hasn't verified this app".
Click Advanced ➔ Go to (unsafe) and click Continue.
Once authorized, Google issues a permanent refresh token that does not expire after 7 days. You will never have to re-authenticate weekly again!
⚙️ Client Configurations
Pathway A: Google Antigravity Plugin (Recommended)
Clone or copy into your local Antigravity plugins directory:
git clone https://github.com/karansinghverma979/antigravity-google-workspace-plugin.git ~/.gemini/config/plugins/google-workspace-pluginAdd to your Antigravity
mcp_config.json:{ "mcpServers": { "google-workspace-mcp": { "command": "python", "args": [ "C:\\Users\\<YourUsername>\\.gemini\\config\\plugins\\google-workspace-plugin\\mcp\\server.py" ], "disabled": false } } }Antigravity automatically loads
plugin.json, activates thegoogle-workspaceskill (skills/google-workspace/SKILL.md), and registers the agent (agents/google_workspace.md).
Pathway B: Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"google-workspace": {
"command": "python",
"args": [
"/path/to/antigravity-google-workspace-plugin/mcp/server.py"
]
}
}
}🔒 Security & Privacy Standard
Sovereign External Quarantine: Credentials (
credentials.json) and active OAuth tokens (token.json) reside strictly outside the repository tree in the centralized vault at~/.gemini/credentials/google-workspace/(with legacy fallback to~/.gemini/config/google_workspace/). The git repository tree contains zero sensitive artifacts and survives complete repo wipes (git clean -fdx).Dynamic Path Expansion: Dynamically expands paths using
os.path.expanduserwith full support forGOOGLE_WORKSPACE_TOKEN_PATHandGOOGLE_WORKSPACE_CREDENTIALS_PATHenvironment variables, avoiding machine-specific paths.Git Defense-in-Depth:
.gitignorestrictly blocks alltoken.json,credentials.json,*.token,*.pem,*.key, and.envfiles. A sanitizedcredentials.json.exampleis committed for reference.OpenSSF CI Hardening: GitHub Actions workflows enforce
permissions: contents: readand pin dependencies to immutable 40-character commit SHAs.Vulnerability Disclosure: Managed through coordinated disclosure in SECURITY.md.
Maintained by Karan Singh Verma · Released under the MIT License
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Hosted Google Calendar MCP server for AI agents. No self-hosting or Google Cloud setup.
Let AI agents query data and act across all your business apps via MCP.
An agent-first office suite Claude & ChatGPT read and write over one MCP URL.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to send emails, create drafts in Gmail, and append content to Google Docs via standardized MCP tools.15 npmISC
- AlicenseBqualityAmaintenanceMCP server that gives AI agents direct access to Google services including Gmail, Calendar, Drive, and more, with multi-account OAuth support. Enables reading and sending email, managing calendar events, and interacting with Google files through natural language.6069 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to send Gmail emails, create drafts, and append content to Google Docs through MCP tools. Provides secure OAuth-based integration with Google Workspace.239 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to create and append to Google Docs and Sheets through MCP, including matrix-based row writes and dynamic text injection into document bodies.MIT