Google Workspace MCP for Antigravity IDE
Allows the MCP server to compose and draft Gmail messages and list recent inbox threads.
Allows the MCP server to schedule meetings and modify calendar events.
Allows the MCP server to author new documents, read content as Markdown, insert tables, perform text replacements, and append revisions.
Allows the MCP server to search folders and files, inspect file metadata, create directory structures, and manage file hierarchies.
Allows the MCP server to provision spreadsheets, inspect schema metadata, perform 2D batch writes, set cell formatting and borders, and compute formula ranges.
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., "@Google Workspace MCP for Antigravity IDEcreate a new Google Doc titled 'Meeting Notes' and share it with me"
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 IDE x Google Workspace (Docs, Sheets, Drive) MCP
A standalone, token-optimized Model Context Protocol (MCP) server integration connecting Antigravity IDE with Google Docs, Google Sheets, Google Drive, Gmail, and Google Calendar.
Engineered with token-reduction protocols (AGENTS.md) designed to reduce context consumption by 70% to 90%, accelerating agent latency and preserving the LLM context window.
Table of Contents
Related MCP server: google-connections-mcp
Overview & Capabilities
Once integrated, Antigravity IDE gains direct access to your Google Workspace environment:
Google Docs: Author new documents, read content as token-lean Markdown, insert structured tables, conduct surgical text replacements (
findAndReplace,replaceRangeWithMarkdown), and append revisions.Google Sheets: Provision spreadsheets, inspect schema metadata, perform 2D batch writes, set cell formatting/borders, and compute formula ranges.
Google Drive: Search folders/files, inspect file metadata, create directory structures, and manage file hierarchies.
Gmail & Calendar: Compose and draft messages, list recent inbox threads, schedule meetings, and modify calendar events.
Prerequisites
Node.js: Version 18.0.0 or higher.
npm: Version 8.0.0 or higher.
PowerShell: Windows PowerShell 5.1 or PowerShell Core 7+.
Google Cloud Platform (GCP) Account: Access to create an OAuth 2.0 Client ID.
Step 1: Google Cloud OAuth 2.0 Credentials
To authorize access to your Google Workspace resources:
Open Google Cloud Console: Navigate to console.cloud.google.com.
Create or Select a Project: Select the project dropdown in the top navigation bar and click New Project (e.g.,
Antigravity-Workspace-MCP).Enable Workspace APIs: In the top search bar, locate and enable each of the following:
Google Docs APIGoogle Sheets APIGoogle Drive API(Optional)
Gmail API,Google Calendar API.
Configure OAuth Consent Screen:
Navigate to APIs & Services > OAuth consent screen (or Google Auth Platform).
User Type: Select External, then click Create.
Input App Name (e.g.,
Antigravity MCP), User support email, and Developer contact information.Scopes: Click Add or remove scopes and select:
.../auth/documents.../auth/spreadsheets.../auth/drive
Test Users: Under the Audience / Test users section, click Add Users and add your personal Google account email address.
Create OAuth Client ID:
Navigate to APIs & Services > Credentials.
Click + Create Credentials > OAuth client ID.
Application type: Select Desktop app.
Click Create.
Note down:
Client ID (
xxx...apps.googleusercontent.com)Client Secret (
GOCSPX-xxx...)
Step 2: Interactive Setup & Management Script
This repository includes setup.ps1, an interactive management console providing automated setup, credential updating, browser authentication, diagnostics, and complete uninstallation/permission revocation.
Launching the Management Console:
.\setup.ps1The script displays an interactive menu:
======================================================================
Google Workspace MCP for Antigravity IDE - Management Console
======================================================================
[1] Complete Setup / Install (Dependencies, OAuth & IDE Config)
[2] Update OAuth Credentials (Client ID & Client Secret)
[3] Re-authenticate Account (OAuth Browser Sign-in)
[4] Revoke Permissions & Uninstall (Revoke Token, Remove Config)
[5] View Diagnostics & Connection Status
[0] Exit
======================================================================Script Execution Modes:
Interactive Menu: Run
.\setup.ps1with no arguments to navigate the interactive console.Direct Parameter Execution:
# Non-interactive automated install .\setup.ps1 -ClientID "your-client-id" -ClientSecret "your-client-secret" # Or invoke specific actions .\setup.ps1 -Action Install .\setup.ps1 -Action UpdateCredentials .\setup.ps1 -Action Reauth .\setup.ps1 -Action Uninstall .\setup.ps1 -Action Status
Step 3: IDE Activation
After completing setup:
Launch Antigravity IDE.
Press
Ctrl + Shift + P(orCmd + Shift + Pon macOS) to open the Command Palette.Type and select
Reload Window.Antigravity IDE will automatically detect and load the
google-docsMCP server. You can verify connection status under Additional Options (...) > MCP Servers.
Token Optimization Strategy
Large documents and spreadsheets can rapidly exhaust context windows if unoptimized. The rules codified in AGENTS.md enforce surgical, token-efficient interactions:
Operation | Inefficient Approach (Excessive Tokens) | Optimized Strategy (70-90% Reduction) |
Reading Google Docs | JSON AST format (~15,000 tokens for 5 pages). | Request Markdown via |
Modifying Docs | Reading full doc and overwriting entirely. | Use |
Reading Sheets | Unbounded range read (e.g. | Query |
Writing to Sheets | Repeated single-cell write calls. | Aggregate into 2D arrays and issue a single |
Agent Response | Echoing complete document contents back to chat. | Return success status, resource URL, and a 1-2 bullet diff summary. |
Turnkey Templates, Recipes & Antigravity Skill
This repository provides pre-built templates, styling recipes, and an Antigravity Skill automatically discovered by the IDE to streamline document authoring and minimize token overhead.
1. Antigravity Skill & Rule (.agents/)
.agents/skills/google-workspace-designer/SKILL.md: Complete design skill loaded automatically by Antigravity, including palette definitions, table creation sequences, and image constraints..agents/rules/workspace-token-standards.md: Mandatory agent rules enforcing markdown-first reads, bounded spreadsheet queries, and zero-echoing outputs.
2. Ready-to-Use Document & Spreadsheet Templates (templates/)
templates/docs/project-specification.md: Architecture spec & PRD layout with KPI tables, RACI matrix, roadmap timeline, and risk register.templates/docs/executive-brief.md: 2-page decision brief with business case comparison and budget breakdown.templates/sheets/project-tracker.json: Sprint task tracker schema with cell values, formula rows, number formats, and border definitions.templates/sheets/kpi-dashboard.json: Financial model schema with gross margin formulas, currency formatting, and frozen panes.
3. Execution Recipes & Architecture Guides (recipes/)
recipes/document-understanding-guide.md: Architecture guide for index-first reading and understanding large docs without context bloat.recipes/table-styling.md: Exact parameters forupdateTableCellStyle,updateTableBorders,formatCells, andsetCellBorders.recipes/image-formatting.md: Page geometry math in points (468pt printable width), dimension presets, and caption alignment.recipes/token-optimization-cheatsheet.md: Benchmarks, tool call sequences, and surgical editing snippets saving 70% to 90% tokens.
Project Workspace Starter Kit (Use in Your Own Project)
Want Antigravity to understand and manipulate Google Docs and Sheets directly inside your own application codebase? We provide a pre-packaged starter kit under workspace-template/:
your-project-folder/
├── .agents/
│ └── rules/
│ └── project-google-context.md # Automatic Antigravity discovery rule
├── google-workspace.json # Maps "spec" & "tracker" to actual Google IDs
├── DOCS_INDEX.md # Local outline cache (< 200 tokens)
└── WORKSPACE_GUIDE.md # Comprehensive user guide1-Click Scaffolding:
Run from this repository:
.\setup.ps1 -Action InitProject -TargetDir "C:\Projects\MyAwesomeApp"Or select [6] Scaffold Project Workspace from the interactive menu!
How Antigravity Uses It:
Never type URLs or IDs again: Antigravity automatically resolves "the spec" to your configured Doc ID and "the sprint tracker" to your Sheet ID.
Instant Understanding: Antigravity reads local
DOCS_INDEX.mdin ~150 tokens to know where headings, sections, and tables live before calling Google APIs.Natural Prompting:
"Read Section 3 of our spec and explain the database schema."
"Add a new task 'Implement Redis cache' to our sprint tracker with priority High."
"In the technical spec, update Section 2.1 with postgres connection parameters."
Credential Management & Revocation
If you need to rotate keys, switch Google accounts, or revoke all permissions:
Option A: Via the Interactive Menu
Run .\setup.ps1:
Select [2] Update OAuth Credentials: Allows updating
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETacross both local configuration and IDE settings.Select [3] Re-authenticate Account: Triggers a fresh browser consent screen without altering configuration keys.
Select [4] Revoke Permissions & Uninstall:
Sends a revocation request directly to Google Identity (
https://oauth2.googleapis.com/revoke), immediately invalidating access on your Google account.Deletes local token storage (
~/.config/google-docs-mcp/token.json).Removes the
google-docsentry from Antigravity IDE's configuration (~/.gemini/config/mcp_config.json).Offers to clean up local
.envand environment variables.
Option B: Manual Revocation
Google Account Permissions: Visit myaccount.google.com/permissions to view and revoke third-party app authorizations directly.
Local Stored Tokens: Delete
%USERPROFILE%\.config\google-docs-mcp\token.json.IDE Configuration: Remove
"google-docs"from%USERPROFILE%\.gemini\config\mcp_config.json.
Example Prompt Templates
You can interact with your Google Workspace using natural language in Antigravity IDE:
Google Docs:
"Create a Google Doc titled 'Q4 Engineering Roadmap' with sections for Goals, Architecture, and Timeline."
"Read the document at [DOCUMENT_ID] as markdown and provide a 3-bullet executive summary."
"In document [DOCUMENT_ID], find the section 'Budget Estimates' and insert a 3-column table with projected infrastructure costs."
Google Sheets:
"Create a Google Sheet titled '2026 Sprint Velocity' with columns: Sprint, Planned Points, Completed Points, Completion Rate."
"Read the range A1:D10 from spreadsheet [SHEET_ID] and calculate the average completion rate."
"Append 5 new test result rows to the end of spreadsheet [SHEET_ID]."
Google Drive:
"Search my Google Drive for files containing 'Architecture Spec' created in the last 30 days."
"Create a directory named 'Release Artifacts' and move file [FILE_ID] into it."
Troubleshooting & FAQ
1. "Access blocked: This app has not been verified"
Cause: The authenticated Google account is not listed under Test Users in the Google Cloud Console.
Resolution: In Google Cloud Console, navigate to APIs & Services > OAuth consent screen > Test users, click Add Users, and add your email address.
2. "Apps Script API has not been used..."
If generating Apps Script projects, verify that the Google Apps Script API is enabled at script.google.com/home/usersettings.
3. MCP Server does not appear in Antigravity IDE
Verify that
~/.gemini/config/mcp_config.jsoncontains thegoogle-docsentry.Trigger
Reload WindowviaCtrl + Shift + P.Run
.\setup.ps1and choose [5] View Diagnostics & Connection Status to diagnose file paths and token state.
Contributing & Pull Requests
Contributions, bug reports, and feature proposals are warmly welcome!
Check out our Contributing Guide to get started.
Adhere to the Contributor Covenant Code of Conduct.
Follow the token discipline guidelines defined in
AGENTS.md.Submit Pull Requests against the
mainbranch of github.com/duc-long/antigravity-google-suite.
License
This project is open-source software licensed under the MIT License. Copyright (c) 2026 Duc Long.
This server cannot be deployed
Maintenance
Related MCP Connectors
Permissioned access to Gmail, Drive and Calendar via the user's own Google account
Multiple Gmail accounts, editable Google Sheets & Docs for AI agents. Deny-by-default access rules.
SEO & marketing toolkit for AI agents: GA4, Search Console, AdSense, GTM, PageSpeed, Trends.
Your workspace as agent tools — docs, canvases, slides, sheets, projects, tickets, and a shell.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables deep integration with Google Workspace for AI assistants, allowing for document creation, spreadsheet manipulation, and file management. It supports advanced features like template processing, comment thread management, and cell formatting.46 npmMIT
- FlicenseNot gradedqualityDmaintenanceProvides AI assistants with access to Google Workspace APIs including Sheets, Calendar, Gmail, Tasks, Drive, and Docs. Enables full CRUD operations and management of Google services through natural language.1-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to securely interact with Google Workspace services, including sending emails via Gmail and appending content to Google Docs.221 npmMIT
- FlicenseAqualityCmaintenanceEnables AI agents to create and edit Google Docs and draft Gmail emails through natural language.7-