ANTIGRAVITY LABJP
Articles/Integrations
Integrations/2026-05-04Beginner

Connecting Antigravity to Gmail: Setting Up Google Workspace MCP and Practical Workflow Patterns

Learn how to connect Gmail, Google Calendar, and Sheets to Antigravity via MCP so you can manage your inbox, schedule, and tasks without ever leaving your editor. Includes step-by-step setup and real workflow patterns.

google-workspace2mcp14gmailgoogle-calendargoogle-sheetsautomation79

Every Monday morning used to follow the same ritual: open Gmail to clear unread messages, check Google Calendar for the week's schedule, then update the Google Sheets task tracker with status changes. Solid project management habits, sure — but the context-switching pulled me out of a focused coding mindset before the day even started.

After connecting Antigravity to Google Workspace through MCP, that entire routine can now happen from inside the editor. "Summarize unread emails related to the requirements doc," "block free time on my calendar for deep work" — these natural-language instructions land right where the code is. This article walks through how to set it up and the workflow patterns that have actually stuck.

What Google Workspace MCP Lets You Do

MCP (Model Context Protocol) is an open standard that lets AI tools communicate securely with external services. Antigravity's MCP support means you can connect official Google-provided servers or community-built connectors to access Workspace data directly from the editor.

Services you can operate via MCP include:

  • Gmail: Read, search, send, and label messages
  • Google Calendar: Retrieve, create, and update events; check availability
  • Google Sheets: Read and write cells, append rows, update statuses
  • Google Drive: List files, search, read document content

The key difference from traditional API scripts is that Antigravity's AI engine decides which API calls to make and when. You don't need to write explicit scripts — natural language prompts are enough. If you want a deeper understanding of how MCP works within Antigravity, the Antigravity MCP Ecosystem Guide covers the architecture well.

Setting Up Google Workspace MCP

Prerequisites

  • A Google Cloud project (the free tier works)
  • Antigravity 2.0 or later
  • Python 3.11+

1. Enable APIs and Create OAuth Credentials

Enable the necessary APIs in your Google Cloud project:

# Enable all required APIs at once
gcloud services enable gmail.googleapis.com \
  calendar-json.googleapis.com \
  sheets.googleapis.com \
  drive.googleapis.com

Then create an OAuth 2.0 client ID in Google Cloud Console. Go to APIs & Services → Credentials → Create Credentials → OAuth client ID, choose "Desktop app" as the type, and add http://localhost:8080 as an authorized redirect URI.

Download the generated client_secret_*.json file and store it somewhere safe, like ~/.config/google/client_secret.json.

2. Install the MCP Server and Authenticate

# Install the Python-based Google Workspace MCP server
pip install mcp-google-workspace
 
# Run the initial OAuth flow (this opens a browser window)
mcp-google-workspace auth --client-secret ~/.config/google/client_secret.json
 
# If you need send access in addition to read access
mcp-google-workspace auth \
  --scopes gmail.readonly,gmail.send,calendar,sheets,drive.readonly

Once authenticated, tokens are saved to ~/.config/mcp-google-workspace/credentials.json.

3. Add the Server to Antigravity's MCP Config

Open Antigravity's settings (Settings → MCP, or edit .antigravity/settings.json) and add:

{
  "mcpServers": {
    "google-workspace": {
      "command": "mcp-google-workspace",
      "args": ["serve"],
      "env": {
        "MCP_GOOGLE_CREDENTIALS": "~/.config/mcp-google-workspace/credentials.json"
      }
    }
  }
}

Restart Antigravity, and the Google Workspace tools will appear in the chat panel. For configuration templates, the MCP Store Guide shows how to browse and import server configurations.

Gmail Integration — Process Email Without Leaving the Editor

Once everything is connected, try this in the Antigravity chat:

"Summarize today's unread emails that have 'GitHub' or 'error' in the subject line"

Antigravity fetches the messages, filters by your criteria, and returns a readable summary. In practice, this has cut my morning email review time roughly in half.

Useful prompts for common email scenarios:

  • "List all pull request review requests I received this week"
  • "Show sent messages from the last two weeks that haven't received a reply"
  • "Summarize all emails from [name] over the past month"

To draft a reply, continue the conversation:

"Draft a reply to the third message. Keep it professional —
acknowledge receipt and say I'll follow up with details within two days."

When you're satisfied, say "Send it" and Antigravity will confirm the content before dispatching. It will always show you what it's about to send — no accidental emails.

Google Calendar Integration — Keep Your Schedule in View While Coding

The calendar integration is most useful for scheduling focused work blocks without switching apps:

"What's my schedule today, and when do I have at least a 2-hour uninterrupted block
where I can get into deep work?"

Antigravity pulls your calendar, calculates free time, and gives you a direct answer.

To create an event:

"Schedule a 'Design Review' meeting next Tuesday at 3 PM for one hour.
Add a note in the description: 'Q2 feature demo walkthrough'"

Other calendar patterns worth trying:

  • "List all one-on-one meetings I have for the rest of the month"
  • "Block Saturday morning for three hours as 'coding session'"
  • "Find the next available hour-long slot that works for both me and [colleague] this week"

The last one requires that the other person's calendar is shared with you, but it's a real timesaver for scheduling across teammates.

Common Issues and How to Fix Them

A couple of problems show up often enough to call out specifically.

OAuth token expiry

If you suddenly see authentication errors after working for a while, the OAuth access token has likely expired (they typically last about an hour).

# Refresh the token
mcp-google-workspace auth --refresh
 
# Enable auto-refresh so it happens in the background
mcp-google-workspace config set auto_refresh true

Setting auto-refresh prevents mid-session interruptions.

Insufficient scope errors

If Antigravity says it "cannot perform this operation," you probably didn't include the required scope when you first authenticated. For example, sending email requires gmail.send, which isn't included in read-only setup.

# Re-authenticate with the correct scopes
mcp-google-workspace auth \
  --scopes gmail.readonly,gmail.send,calendar,sheets \
  --force

You can review and revoke your app's permissions at any time from myaccount.google.com/permissions.

If you want to take things further — building automated agents that act on Workspace data without manual prompts — the Antigravity Google Workspace Agent Automation Guide covers the agent-side architecture.

Where to Go From Here

Once the MCP connection is in place, the most immediate return comes from replacing your morning email routine with a single prompt. Start there before adding calendar and Sheets integrations — each one is useful on its own, and layering them in gradually makes it easier to see what's actually changing in your workflow.

The one thing to get right early is the scope configuration. Spending an extra five minutes during setup to include gmail.send and sheets alongside the read permissions avoids the frustration of re-authenticating later when you actually want to act on something.

Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

Integrations2026-04-09
Antigravity × Notion API Integration: AI-Powered Document-Driven Development
Learn how to connect Antigravity IDE with the Notion API to automate your document-driven development workflow — from spec to code, tests, and PR descriptions — using MCP servers.
Integrations2026-03-27
Build an AI Workflow to Auto-Generate Code from GitHub Issues with Antigravity
Learn how to connect Antigravity's AI agent with GitHub Issues to automatically generate code from issue descriptions. Covers MCP server setup, AGENTS.md configuration, and practical workflow patterns.
Integrations2026-07-08
Antigravity Now Saves OAuth Tokens to the OS Keyring — Keeping Auth Alive in Headless Runs
In v2.2.1, refreshed OAuth tokens are saved to the OS keyring automatically. Pleasant on the desktop, but on headless scheduled runs the vault itself may not exist and auth quietly breaks. We design explicit backend selection, a safe file fallback, and per-location liveness checks.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →