GMAIL MCP SERVER
Connect Gmail to Andromity with Google’s Gmail MCP server
Set up Google’s Gmail MCP server (Developer Preview) with Andromity: search and read threads, manage labels and draft replies. OAuth client, redirect URI and API setup.
- Server
- https://gmailmcp.googleapis.com/mcp/v1
- Connects with
- Your Google OAuth client
- Category
Google runs a Gmail MCP server at https://gmailmcp.googleapis.com/mcp/v1 as part of the Google Workspace Developer Preview. With it, Andromity can search your mail, read threads and draft replies, for example to pull an error report out of an email or to draft a reply once a fix ships.
Google doesn’t let clients register themselves for sign-in, so you create your own Google OAuth client once and give Andromity its ID and secret.
What the agent can do with Gmail
- Search threads and read threads and messages.
- List and create labels, and add or remove labels on threads and messages.
- Create and list drafts.
- Google documents no tool for sending or deleting mail. Drafts stay in Gmail until you send them.
Example prompts
Ask for the work in plain language. Naming the server helps, for example “use the Gmail MCP server”.
- Search my Gmail for this week’s crash reports from support, and list the distinct stack traces.
- Read the thread from Priya about the export bug and check whether this branch fixes what she describes.
- Draft a reply to the customer thread about the CSV import, explaining the fix in this release.
Connect Gmail
- Join the Google Workspace Developer Preview Program with the Google account you’ll use.
- In a Google Cloud project, enable the Gmail API (gmail.googleapis.com) and the Gmail MCP service (gmailmcp.googleapis.com), and configure the OAuth consent screen. With an External audience, add yourself as a test user.
- Create an OAuth client of type Web application, select “Use this client for an AI-powered agent” (Google requires this from November 11, 2026), and add the redirect URI http://127.0.0.1:54321/callback.
- In VS Code, open Andromity Hub → MCP Servers → Discover. In the terminal app, open /settings → MCP → + Connect an app. Find Gmail, select Connect and enter the client ID and secret.
- Sign in with Google in the browser. Andromity asks for offline access so the sign-in refreshes instead of expiring after an hour.
See Connect an app for how Andromity stores connectors and tokens.
Access and safety
- Google warns that email content can contain prompt injection. Keep Andromity in SAFE or TRUST mode so you review what the agent does with what it reads.
- The client ID and secret are stored in the gmail entry of ~/.andromity/mcp.json; the sign-in token is kept in Andromity’s encrypted token store.
- Google’s guide says not to share one OAuth client between agent and non-agent uses.
In an untrusted folder, MCP servers don’t start at all. Read workspace trust and permission modes for the full model.
Limits to know
- The server is a Developer Preview, so its tools and requirements may change.
- Andromity listens on port 54321 during sign-in, or the next free port if it is busy. If Google reports a redirect mismatch, free port 54321 and retry.
Questions
- Is there an official Gmail MCP server?
- Yes. Google runs one at https://gmailmcp.googleapis.com/mcp/v1 as part of the Google Workspace Developer Preview Program.
- Can the agent send email?
- Google’s Gmail MCP server documents tools for reading, labels and drafts, but none for sending. The agent can draft a reply; you send it.
- Why do I need my own Google OAuth client?
- Google’s servers don’t support dynamic client registration, so each user brings a client from their own Google Cloud project.
Sources
This guide is based on Gmail’s own documentation. The app controls its server, so tools can change; check the source for the current list.
- Google: Configure the Gmail MCP server
- Google: Configure Google Workspace MCP servers
- Google Workspace Developer Preview Program
Gmail is a trademark of its owner. Andromity is not affiliated with or endorsed by Gmail.