Mitigate AI Platform

Google Mail

How to configure the Google Mail (Gmail) MCP connector

The Google Mail connector allows the chatbot to read and manage emails through Gmail API using the google_workspace_mcp server.

Connector Settings

FieldValue
Integration TypeMCP
NameGoogle Mail
URLhttps://google-workspace-mail.mcp.mitigate.dev/mcp
Transport TypeStreamable HTTP
Authentication TypeOAuth 2.1
OAuth Client ID(from Google Cloud Console)
OAuth Client Secret(from Google Cloud Console)
OAuth Scopesopenid https://www.googleapis.com/auth/userinfo.email https://mail.google.com/

This MCP server does not support Dynamic Client Registration (RFC 7591). You must provide OAuth Client ID and Client Secret from a Google Cloud Console OAuth 2.0 Web application client.

OAuth Scopes

See all available scopes in the Google OAuth 2.0 Scopes documentation.

ScopeDescription
openidEnables OpenID Connect sign-in
https://www.googleapis.com/auth/userinfo.emailAccess to the user's email address
https://www.googleapis.com/auth/gmail.readonlyView email messages and settings
https://www.googleapis.com/auth/gmail.modifyRead, compose, and send emails (excludes permanent deletion)
https://www.googleapis.com/auth/gmail.composeManage drafts and send emails
https://www.googleapis.com/auth/gmail.sendSend email on behalf of the user
https://www.googleapis.com/auth/gmail.labelsSee and edit email labels
https://mail.google.com/Full access — read, compose, send, and permanently delete emails

Workflow Trigger

The Google Mail connector can be used as a workflow trigger. When configured, workflows automatically run when new emails arrive in the connected Gmail inbox.

Usage Examples

Once connected, users can interact with Gmail through natural language:

  • "Show my unread emails"
  • "Search my inbox for emails about the quarterly report"
  • "What emails did I receive today?"

Tools

Search Gmail Messages

search_gmail_messages

Searches messages in a user's Gmail account based on a query. Returns both Message IDs and Thread IDs for each found message, along with Gmail web interface links for manual verification. Supports pagination via page_token parameter.

Parameters:

  • query - The search query. Supports standard Gmail search operators
  • page_size - The maximum number of messages to return. Defaults to 10
  • page_token - Token for retrieving the next page of results

Get Gmail Message Content

get_gmail_message_content

Retrieves the full content (subject, sender, recipients, plain text body) of a specific Gmail message.

Parameters:

  • message_id - The unique ID of the Gmail message to retrieve

Get Gmail Messages Content Batch

get_gmail_messages_content_batch

Retrieves the content of multiple Gmail messages in a single batch request. Supports up to 25 messages per batch to prevent SSL connection exhaustion.

Parameters:

  • message_ids - List of Gmail message IDs to retrieve (max 25 per batch)
  • format - Message format. full includes body, metadata only headers. Defaults to full

Get Gmail Attachment Content

get_gmail_attachment_content

Downloads an email attachment and saves it to local disk. In HTTP mode, returns a temporary download URL (valid for 1 hour).

Parameters:

  • message_id - The ID of the Gmail message containing the attachment
  • attachment_id - The ID of the attachment to download

Send Gmail Message

send_gmail_message

Sends an email using the user's Gmail account. Supports both new emails and replies with optional attachments. Supports Gmail's "Send As" feature to send from configured alias addresses.

Parameters:

  • to - Recipient email address
  • subject - Email subject
  • body - Email body content (plain text or HTML)
  • body_format - Email body format: plain or html. Defaults to plain
  • cc - Optional CC email address
  • bcc - Optional BCC email address
  • from_name - Optional sender display name
  • from_email - Optional "Send As" alias email address. Must be configured in Gmail settings
  • thread_id - Optional Gmail thread ID to reply within
  • in_reply_to - Optional Message-ID of the message being replied to
  • references - Optional chain of Message-IDs for proper threading
  • attachments - Optional list of attachments. Each can have path (file path) or content (base64) + filename

Draft Gmail Message

draft_gmail_message

Creates a draft email in the user's Gmail account. Supports both new drafts and reply drafts with optional attachments. Supports Gmail's "Send As" feature to draft from configured alias addresses.

Parameters:

  • subject - Email subject
  • body - Email body content
  • body_format - Email body format: plain or html. Defaults to plain
  • to - Optional recipient email address
  • cc - Optional CC email address
  • bcc - Optional BCC email address
  • from_name - Optional sender display name
  • from_email - Optional "Send As" alias email address
  • thread_id - Optional Gmail thread ID to reply within
  • in_reply_to - Optional Message-ID of the message being replied to
  • references - Optional chain of Message-IDs for proper threading
  • attachments - Optional list of attachments

Get Gmail Thread Content

get_gmail_thread_content

Retrieves the complete content of a Gmail conversation thread, including all messages.

Parameters:

  • thread_id - The unique ID of the Gmail thread to retrieve

Get Gmail Threads Content Batch

get_gmail_threads_content_batch

Retrieves the content of multiple Gmail threads in a single batch request. Supports up to 25 threads per batch to prevent SSL connection exhaustion.

Parameters:

  • thread_ids - A list of Gmail thread IDs to retrieve

List Gmail Labels

list_gmail_labels

Lists all labels in the user's Gmail account.

Manage Gmail Label

manage_gmail_label

Manages Gmail labels: create, update, or delete labels.

Parameters:

  • action - Action to perform: create, update, or delete
  • name - Label name. Required for create, optional for update
  • label_id - Label ID. Required for update and delete operations
  • label_list_visibility - Whether the label is shown in the label list: labelShow or labelHide
  • message_list_visibility - Whether the label is shown in the message list: show or hide

List Gmail Filters

list_gmail_filters

Lists all Gmail filters configured in the user's mailbox.

Create Gmail Filter

create_gmail_filter

Creates a Gmail filter using the users.settings.filters API.

Parameters:

  • criteria - Filter criteria object as defined in the Gmail API
  • action - Filter action object as defined in the Gmail API

Delete Gmail Filter

delete_gmail_filter

Deletes a Gmail filter by ID.

Parameters:

  • filter_id - ID of the filter to delete

Modify Gmail Message Labels

modify_gmail_message_labels

Adds or removes labels from a Gmail message. To archive an email, remove the INBOX label. To delete an email, add the TRASH label.

Parameters:

  • message_id - The ID of the message to modify
  • add_label_ids - List of label IDs to add to the message
  • remove_label_ids - List of label IDs to remove from the message

Batch Modify Gmail Message Labels

batch_modify_gmail_message_labels

Adds or removes labels from multiple Gmail messages in a single batch request.

Parameters:

  • message_ids - A list of message IDs to modify
  • add_label_ids - List of label IDs to add to the messages
  • remove_label_ids - List of label IDs to remove from the messages

On this page