Gmail

Connect AI Agents to
Gmail

Automate workflows and connect AI agents to Gmail. Metorial is built for developers. Handling OAuth, compliance, observability, and more.

Gmail on Metorial

The Gmail integration lets you read, send, and manage emails directly from your workspace, enabling you to automate email workflows and quickly access your inbox without switching applications.

Deploy on Metorial

Combine Gmail with other tools

Metorial has 600+ integrations available. Here are some related ones you might find interesting.

Exa

Exa

The Exa integration lets you search the web using neural search capabilities and retrieve high-quality, AI-ready content directly within your MCP-enabled applications.

Slack

Slack

The Slack integration lets you read messages, send messages to channels and users, and manage your workspace directly from your AI assistant. Use it to stay connected with your team, search conversation history, and automate routine Slack tasks without leaving your workflow.

Google Calendar

Google Calendar

The Google Calendar integration lets you view, create, and manage calendar events directly from your workflow, enabling seamless scheduling and time management without switching contexts.

Google Drive

Google Drive

The Google Drive integration lets you search, read, create, and manage files and folders in your Drive directly through AI interactions. Use it to organize documents, retrieve file contents, share files, and automate common Drive tasks without switching to your browser.

Microsoft 356

Microsoft 356

The Microsoft 365 integration lets you access and manage your emails, calendar events, documents, and collaborate across Word, Excel, PowerPoint, and Teams directly from your workspace. Use it to read and send messages, schedule meetings, edit files in OneDrive and SharePoint, and streamline your productivity workflows.

Neon

Neon

The Neon integration lets you connect to your Neon Postgres databases to query data, inspect schemas, and manage database operations directly from your AI assistant.

Supabase

Supabase

The Supabase integration lets you query and manage your database, authentication, and storage directly from your AI assistant, enabling natural language database operations and real-time data access.

Linear

Linear

The Linear integration lets you create, update, and search issues directly from your workspace, enabling seamless project management and task tracking without leaving your development environment.

Gmail

Gmail

The Gmail integration lets you read, send, and manage emails directly from your workspace, enabling you to automate email workflows and quickly access your inbox without switching applications.

Connect anything. Anywhere.

Supported tools and capabilities

Metorial helps you connect AI agents to Gmail with various tools and resources. Tools allow you to interact with perform specific actions, while resources provide read-only access to data and information.

Help & Documentation

Find guides and articles to help you get started with Gmail on Metorial.

More about Gmail

Gmail MCP Server

A comprehensive Model Context Protocol (MCP) server that provides complete access to Gmail functionality. This server enables AI assistants and applications to manage emails, organize mailboxes, handle drafts, configure filters, and automate email workflows through a rich set of tools that mirror Gmail's full feature set.

Overview

The Gmail MCP Server bridges the gap between AI applications and Gmail, offering programmatic access to everything from basic email operations to advanced mailbox management. Whether you need to search through thousands of messages, automate email responses, organize conversations with labels, or manage vacation settings, this server provides the tools to do it all. It supports both individual message operations and bulk thread management, making it suitable for everything from simple email tasks to complex workflow automation.

Features

Email Management

  • Advanced Search: Leverage Gmail's powerful search syntax to find exactly the messages you need
  • Multiple Format Support: Retrieve messages in minimal, full, raw, or metadata formats depending on your needs
  • Thread Management: Work with entire conversation threads as cohesive units
  • Attachment Handling: Access and retrieve message attachments with metadata

Communication Tools

  • Send and Compose: Create and send emails with support for HTML formatting, CC, and BCC recipients
  • Reply and Forward: Respond to messages or forward them to other recipients with optional additional context
  • Draft Management: Create, update, and manage draft messages before sending
  • Reply All Support: Automatically include all recipients when responding to group conversations

Organization and Labels

  • Custom Labels: Create, update, and delete labels with custom colors and visibility settings
  • Label Management: Apply and remove labels from individual messages or entire threads
  • Quick Actions: Star, unstar, mark as read/unread, and flag messages as important
  • Spam Management: Mark messages as spam or move them to trash

Automation and Filters

  • Filter Creation: Set up automated rules to organize incoming mail
  • Filter Management: List and delete existing filters
  • Vacation Auto-Reply: Configure out-of-office automatic responses with custom messages and schedules

Profile and Settings

  • Profile Information: Access Gmail account profile details
  • Vacation Settings: View and update auto-reply configurations
  • Account Management: Get information about your Gmail account and settings

Tools

Message Operations

list_messages

List messages in your mailbox with flexible filtering options.

  • query (string): Search using Gmail's search syntax (e.g., "from:[email protected] is:unread")
  • labelIds (array of strings): Filter by specific label IDs
  • maxResults (number): Maximum messages to return (default: 100, max: 500)
  • includeSpamTrash (boolean): Include messages from spam and trash folders

get_message

Retrieve a specific message by its ID.

  • messageId (string, required): The ID of the message to retrieve
  • format (string): Format for the response - minimal, full, raw, or metadata (default: full)

send_message

Send a new email message.

  • to (array of strings, required): Recipient email addresses
  • subject (string, required): Email subject line
  • body (string, required): Email body content
  • cc (array of strings): Carbon copy recipients
  • bcc (array of strings): Blind carbon copy recipients
  • from (string): Sender address if you have multiple addresses
  • isHtml (boolean): Whether the body contains HTML formatting

reply_to_message

Reply to an existing email message.

  • messageId (string, required): ID of the message to reply to
  • body (string, required): Reply content
  • replyAll (boolean): Whether to reply to all recipients
  • isHtml (boolean): Whether the body contains HTML

forward_message

Forward an email to other recipients.

  • messageId (string, required): ID of the message to forward
  • to (array of strings, required): Recipients to forward to
  • body (string): Additional message to include
  • isHtml (boolean): Whether the additional body is HTML

delete_message

Permanently delete a message from Gmail.

  • messageId (string, required): ID of the message to delete

trash_message

Move a message to the trash folder.

  • messageId (string, required): ID of the message to trash

untrash_message

Restore a message from the trash folder.

  • messageId (string, required): ID of the message to restore

modify_message

Add or remove labels from a message.

  • messageId (string, required): ID of the message to modify
  • addLabelIds (array of strings): Label IDs to apply
  • removeLabelIds (array of strings): Label IDs to remove

mark_as_read

Mark a message as read.

  • messageId (string, required): ID of the message

mark_as_unread

Mark a message as unread.

  • messageId (string, required): ID of the message

star_message

Add a star to a message.

  • messageId (string, required): ID of the message to star

unstar_message

Remove the star from a message.

  • messageId (string, required): ID of the message to unstar

mark_as_spam

Mark a message as spam.

  • messageId (string, required): ID of the message

mark_as_important

Mark a message as important.

  • messageId (string, required): ID of the message

search_messages

Search for messages using Gmail's advanced search syntax.

  • query (string, required): Search query (supports operators like from:, to:, subject:, has:attachment, etc.)
  • maxResults (number): Maximum number of results to return

get_attachment

Retrieve metadata for a message attachment.

  • messageId (string, required): ID of the message containing the attachment
  • attachmentId (string, required): ID of the attachment

Thread Operations

list_threads

List email conversation threads.

  • query (string): Search query to filter threads
  • labelIds (array of strings): Filter by label IDs
  • maxResults (number): Maximum threads to return (default: 100)

get_thread

Retrieve all messages in a specific thread.

  • threadId (string, required): ID of the thread
  • format (string): Message format - minimal, full, or metadata (default: full)

modify_thread

Apply or remove labels from all messages in a thread.

  • threadId (string, required): ID of the thread
  • addLabelIds (array of strings): Label IDs to add
  • removeLabelIds (array of strings): Label IDs to remove

trash_thread

Move all messages in a thread to trash.

  • threadId (string, required): ID of the thread

delete_thread

Permanently delete an entire thread.

  • threadId (string, required): ID of the thread to delete

Label Management

list_labels

Retrieve all labels in the mailbox. No parameters required.

get_label

Get detailed information about a specific label.

  • labelId (string, required): ID of the label

create_label

Create a new custom label.

  • name (string, required): Name for the new label
  • color (object): Label color with textColor and backgroundColor properties
  • labelListVisibility (string): Visibility in label list - labelShow, labelShowIfUnread, or labelHide
  • messageListVisibility (string): Visibility in message list - show or hide

update_label

Modify an existing label.

  • labelId (string, required): ID of the label to update
  • name (string): New name for the label
  • color (object): New color with textColor and backgroundColor
  • labelListVisibility (string): New visibility setting for label list
  • messageListVisibility (string): New visibility setting for message list

delete_label

Remove a label from Gmail.

  • labelId (string, required): ID of the label to delete

Draft Management

list_drafts

List all draft messages.

  • maxResults (number): Maximum number of drafts to return (default: 100)

get_draft

Retrieve a specific draft.

  • draftId (string, required): ID of the draft

create_draft

Create a new draft message.

  • to (array of strings, required): Recipient addresses
  • subject (string, required): Email subject
  • body (string, required): Email body
  • cc (array of strings): CC recipients
  • bcc (array of strings): BCC recipients
  • isHtml (boolean): Whether the body is HTML

update_draft

Modify an existing draft.

  • draftId (string, required): ID of the draft to update
  • to (array of strings, required): Updated recipient addresses
  • subject (string, required): Updated subject
  • body (string, required): Updated body
  • isHtml (boolean): Whether the body is HTML

send_draft

Send a draft message.

  • draftId (string, required): ID of the draft to send

delete_draft

Delete a draft message.

  • draftId (string, required): ID of the draft to delete

Filter Management

list_filters

Retrieve all configured filters. No parameters required.

create_filter

Create a new email filter for automated organization.

  • from (string): Filter messages from this sender
  • to (string): Filter messages to this recipient
  • subject (string): Filter by subject line
  • query (string): Gmail search query for advanced filtering
  • addLabelIds (array of strings): Labels to automatically apply
  • removeLabelIds (array of strings): Labels to automatically remove
  • forward (string): Email address to forward matching messages to

delete_filter

Remove an existing filter.

  • filterId (string, required): ID of the filter to delete

Account Settings

get_profile

Retrieve Gmail profile information for the authenticated account. No parameters required.

get_vacation_settings

Get current vacation auto-reply settings. No parameters required.

update_vacation_settings

Configure vacation auto-reply settings.

  • enableAutoReply (boolean, required): Enable or disable the auto-reply
  • responseSubject (string): Subject line for auto-reply messages
  • responseBodyPlainText (string): Plain text auto-reply message
  • responseBodyHtml (string): HTML formatted auto-reply message
  • startTime (string): When to start auto-replies (milliseconds since epoch)
  • endTime (string): When to stop auto-replies (milliseconds since epoch)

Use Cases

This MCP server enables a wide range of email automation and management scenarios:

  • Email Triage: Automatically categorize and label incoming messages based on content, sender, or other criteria
  • Intelligent Responses: Draft replies to common inquiries or forward messages to appropriate team members
  • Inbox Zero Workflows: Build automated workflows to archive, label, or delete messages based on custom rules
  • Email Analytics: Search and analyze email patterns, response times, and communication trends
  • Team Collaboration: Manage shared email addresses with automated sorting and assignment
  • Customer Service: Create draft responses, search historical conversations, and manage support tickets
  • Marketing Campaigns: Track sent messages, manage mailing lists with labels, and monitor engagement
  • Personal Productivity: Set up vacation responders, organize personal correspondence, and maintain clean inboxes

Resource Templates

This server does not currently provide resource templates.

Prompts

This server does not currently provide pre-defined prompts.

Ready to build with Metorial?

Let's take your AI-powered applications to the next level, together.

About Metorial

Metorial provides developers with instant access to 600+ MCP servers for building AI agents that can interact with real-world tools and services. Built on MCP, Metorial simplifies agent tool integration by offering pre-configured connections to popular platforms like Google Drive, Slack, GitHub, Notion, and hundreds of other APIs. Our platform supports all major AI agent frameworks—including LangChain, AutoGen, CrewAI, and LangGraph—enabling developers to add tool calling capabilities to their agents in just a few lines of code. By eliminating the need for custom integration code, Metorial helps AI developers move from prototype to production faster while maintaining security and reliability. Whether you're building autonomous research agents, customer service bots, or workflow automation tools, Metorial's MCP server library provides the integrations you need to connect your agents to the real world.

Star us on GitHub