Gmail MCP server

Connect Gmail to Claude, ChatGPT, Cursor, Claude Code, Codex, Gemini, GitHub Copilot and any other MCP client, for your whole team. Metorial adds security, governance, and tracing, and gives everyone one Magic MCP URL to connect.

What you can do with the Gmail MCP server

Ask your agent in plain language. Each of these maps to a real tool on the server.

  • Use the modify message tool in Gmail
  • Use the manage settings tool in Gmail
  • Use the manage draft tool in Gmail
  • Use the manage labels tool in Gmail
  • Use the manage thread tool in Gmail
  • Use the search messages tool in Gmail

How teams use Gmail with agents

Most teams start with Gmail because it is where requests, approvals and customer threads already live. An agent that can search, draft and label mail takes the triage work, while a person still decides what gets sent.

Inbox triage

Search unread threads from customers, label them by topic, and draft replies for a person to review before sending.

Follow-up drafts

After a meeting, find the thread with each attendee and leave a draft summary in their conversation.

Attachment retrieval

Pull invoices or contracts out of a thread so the agent can read them or pass them to another tool.

Filters and settings

Set up forwarding, vacation replies or label rules from a single instruction instead of clicking through settings.

Tools to start with

  • Search Messages: Uses Gmail search operators like from:, label: and has:attachment.
  • Manage Draft: Leaves replies as drafts, the safest default for agents.
  • Manage Labels: Keeps triage visible in the inbox people already use.

Sign-in and permissions

Gmail connects through Google OAuth on each person's own account, so the agent only sees that person's mailbox. Google classifies the scopes that read or change mail as restricted, so Workspace admins often have to allow the app in their API controls before people can connect.

Sign-in options on Metorial: Google OAuth.

Supported Tools

modify_message

Modify Message

Modify a message's labels, move it to trash, or restore it from trash. Supports both single and batch operations on multiple messages.

manage_settings

Manage Settings

View and manage Gmail settings including vacation responder (auto-reply), IMAP, POP, display language, mail filters, forwarding addresses, auto-forwarding status, and send-as aliases with signatures.

manage_draft

Manage Draft

Create, update, send, list, get, or delete email drafts. Drafts can be composed with recipients, subject, body, and then sent when ready.

manage_labels

Manage Labels

List, create, update, get, or delete Gmail labels. Labels organize messages and threads (e.g., INBOX, SENT, STARRED, or custom labels).

manage_thread

Manage Thread

Get, list, modify labels, trash, or restore email conversation threads. Retrieve full thread conversations with all messages.

search_messages

Search Messages

Search and list email messages using Gmail query syntax. Returns parsed messages with headers, body, and attachment metadata. Use the same search operators available in the Gmail search bar: `from:`, `to:`, `subject:`, `has:attachment`, `after:`, `before:`, `is:unread`, `label:`, etc.

get_message

Get Message

Retrieve a single email message by its ID. Returns the full message including parsed headers, body (text and HTML), and attachment metadata.

send_email

Send Email

Send an email message to one or more recipients. Supports plain text and HTML bodies, CC/BCC recipients, file attachments (base64-encoded), and replying within existing threads.

get_attachment

Get Attachment

Download an email attachment by its ID. Returns the attachment as a file attachment plus its size. Use the attachment IDs from the message's attachments list.

search_google_contacts

Search Google Contacts

Searches the authenticated user's Google Contacts from the People API by name, email address, phone number, or other fields.

list_google_contacts

List Google Contacts

Lists the authenticated user's Google Contacts from the People API with pagination support. Use the `pageToken` from a previous response to fetch the next page.

get_google_contact

Get Google Contact

Retrieves detailed Google Contacts information for a People API resource name. Use `people/me` to get the authenticated user profile.

delete_messages_permanently

Delete Messages Permanently

Immediately and permanently delete one or more Gmail messages. This bypasses Trash and cannot be undone.

delete_thread_permanently

Delete Thread Permanently

Immediately and permanently delete a Gmail thread and all messages in it. This bypasses Trash and cannot be undone.

forward_message

Forward Message

Forward an existing Gmail message to new recipients while preserving its complete MIME body and attachments.

get_profile

Get Profile

Get the authenticated user's Gmail mailbox profile, including mailbox totals and the current history ID.

import_message

Import Message

Import an email into the user's Gmail mailbox as if it arrived by normal delivery: Gmail runs its standard scanning and classification (spam, categories, filters), like receiving over SMTP. Use this for migrating mail into Gmail. Does not send the message. Use insert_message instead to store a message exactly as given without scanning.

insert_message

Insert Message

Insert an email directly into the user's Gmail mailbox, like IMAP APPEND, bypassing most of Gmail's scanning and classification so the message is stored exactly as given with only the labels you choose. Does not send the message. Use import_message instead when the message should be treated like normal incoming mail.

Connect Gmail to your AI client

Every client uses the same Magic MCP URL, and so does any other MCP client. Add it once and sign in with SSO.

  1. Enable Gmail in Metorial. In your Metorial portal, enable the Gmail MCP server and sign in with the account that owns the data. Access stays governed by your team policies.
  2. Add a custom connector. Open Customize, then Connectors. Select Add, then Custom, then Web.
  3. Paste your Metorial MCP URL. Name it Metorial, paste your Magic MCP URL (<your-magic-mcp-url>) and continue.
  4. Sign in. Select Add and sign in to load Gmail tools.

Run Gmail through the Metorial gateway

One governed layer for every app your agents reach, not a separate connector per tool.

  • Give Gmail and every other app to your whole team through one MCP gateway, behind your SSO.
  • Scope which teams and agents can use Gmail tools with role-based access control, and trace every call.
  • Prefer to run it yourself? Metorial is open source and self-hostable.

More integrations teams use with Gmail

Slack

Slack: connect with bot OAuth or user OAuth to work with messages, conversations, search, files, Canvases, Lists, profiles, reactions, reminders, and workspace productivity settings.

Sharepoint

Manage SharePoint sites, document libraries, lists, and files. Create, read, update, and delete lists and list items with custom columns. Resolve site users to numeric Person/Group LookupId values. Upload, download, move, copy, and version files in document libraries. Search across sites, files, folders, lists, and list items using Microsoft Search. Manage permissions at site, list, and item levels with granular access control. Define and manage content types and site columns. Retrieve site properties and search for sites across Microsoft 365.

Microsoft Outlook

Send, read, reply to, forward, and manage email messages in user mailboxes. Organize messages into folders, apply categories, flags, and importance levels. Manage file and item attachments. Create, update, delete, and respond to calendar events and meetings. Find available meeting times, manage attendees, handle recurrence, and work with shared or delegated calendars. Create, read, update, and delete contacts, organize them into contact folders, and manage contact photos. Manage tasks and task lists via Microsoft To Do, including due dates, reminders, recurrence, and checklist items. Support for Focused Inbox, @-mentions, mail tips, send-on-behalf, and send-as capabilities.

Google Drive

Upload, download, create, copy, move, rename, trash, and permanently delete files and folders in Google Drive. Search for files using complex queries filtering by name, MIME type, owner, modification date, labels, and other metadata. Share files and folders with specific users, groups, or domains with role-based permissions (owner, writer, commenter, reader). Manage shared drives and their members. Export Google Workspace files (Docs, Sheets, Slides) to standard formats like PDF, DOCX, and XLSX. Track file revision history and restore earlier versions. Create, read, update, and delete threaded comments and replies on files. Read label definitions and search files by label. Browse the Drive apps installed for your account. Store app-specific data in a hidden per-user folder.

Confluence

Create, read, update, and delete pages, blog posts, comments, and attachments in Confluence spaces. Manage spaces, permissions, labels, and content restrictions. Search content using Confluence Query Language (CQL). Upload and download file attachments with versioning. Manage users, groups, and group memberships. Create and manage whiteboards, databases, folders, and templates. View and update inline tasks. Access audit logs.

Discord

Send, edit, and delete messages in channels. Manage servers (guilds), channels, roles, members, invites, webhooks, threads, scheduled events, auto moderation rules, audit logs, application commands, and custom guild emojis.

How to use Gmail on Metorial

Automate Client Appointment Reminders via Acuity and Gmail

Service businesses with high appointment volumes see no-show rates climb when reminder workflows are manual or inconsistent. This workflow checks upcoming Acuity appointments, reviews each client record, and sends personalized reminder emails via Gmail with appointment details and any required preparation instructions.

E-commerce Order Anomaly Detection and Customer Notification

Scan recent Shopify orders for anomalies such as high-value orders with mismatched shipping addresses or unusual item quantities, then notify the operations team via Slack and send a confirmation email to the customer.

Onboard New HubSpot Contacts with a Calendly Scheduling Link

When new leads are created in HubSpot, sales teams often delay follow-up because scheduling a first meeting requires back-and-forth email. This workflow detects new HubSpot contacts, creates a personalized Calendly scheduling link, and sends a follow-up email through Gmail so prospects can book immediately.

Salesforce Lead-to-Deal Pipeline Automation

Convert qualified Salesforce leads into contacts and opportunities, validate their email addresses, enrich company data, and notify the assigned rep via email with a summary of the new deal.

Scheduled Meeting Booking Workflow for Sales Teams

When a prospect requests a demo, check the rep's Calendly availability, create a scheduling link for the appropriate event type, and log the meeting details back into HubSpot with a follow-up task.

Shopify Inventory Reorder Alerts and Supplier Email Drafting

Scan inventory levels across Shopify locations, identify products below reorder threshold, and draft reorder emails to suppliers with product details and requested quantities ready for review.

Shopify Product Launch Coordination

Coordinate a new product launch by creating the product in Shopify, setting up a discount code for launch day, notifying the team in Slack, and sending a launch announcement email to the customer list.

Technical notes for Gmail

Send, read, and search email messages with support for recipients, attachments, and HTML content. Create, update, and send drafts. Manage conversation threads and organize messages with labels. Search mailboxes using Gmail query syntax (from, to, subject, date, attachment filters). Manage filters and vacation responders, update the primary address's display name and signature, and view send-as aliases, forwarding addresses, and auto-forwarding status. Import and insert messages for migration.

Frequently asked questions

Common questions about connecting Gmail to AI agents with Metorial.

  1. How many tools does the Gmail MCP server have?
    The Gmail MCP server exposes 18 tools, including Modify Message, Manage Settings, Manage Draft. Each one is governed and traced through Metorial.
  2. Yes. Gmail has 1 triggers you can use to start workflows from Gmail events.
  3. Any MCP client, including VS Code, Windsurf, Zed, OpenCode and Grok. Each one reaches the Gmail MCP server through the same Metorial URL.
  4. Use role-based access control to decide which teams, users, and agents can use Gmail and which of its tools they can call.
  5. Yes. Metorial is open source, so you can run the Gmail MCP server yourself or use the hosted gateway.

Connect Gmail to production AI agents

See how Metorial gives your team governed access to Gmail, with tracing and security controls built in.