How to integrate Gmail MCP with ChatGPT

Trusted by
AWS
Glean
Zoom
Airtable

30 min · no commitment · see it on your stack

Gmail logo
ChatGPT logo
divider

How to integrate Gmail MCP with ChatGPT

ChatGPT is one of the most popular AI tools today, with capabilities ranging from deep research and image generation to writing, coding, and everyday productivity.

In this guide, I will explain the easiest and most secure way to connect your Gmail account to ChatGPT via Composio Connect, so it can summarize unread updates from this morning, create draft replies to urgent messages, fetch contact details for recent senders, and more without ever putting your account credentials at risk.

Also integrate Gmail with

Why use Composio over default connectors?

  • Apps with read and write access. Default connectors mostly can read your data. Composio's Gmail integration lets ChatGPT take actions like creating drafts, sending updates, labeling records, and more.
  • 1,000+ SaaS toolkits out of the box. Composio gives you instant access to a vast catalog of pre-built connectors, from Gmail and Slack to Notion, Linear, and Salesforce.
  • One MCP server for every app. Connect any of your applications on demand through a single endpoint, rather than juggling a separate server for each app.
  • Smart, context-aware tool loading. Unlike traditional MCP servers that dump every available tool into the LLM context window, Composio searches for and loads only the tools relevant to the task at hand.
  • Cross-app automation. Chain actions across multiple apps in a single run - fetch a thread, summarize it in Notion, and post highlights to Slack without leaving the conversation.

Prerequisites

  • A ChatGPT account with Plus subscription or higher (Business, Enterprise, Edu, or Pro). We will use ChatGPT Web.
  • Access to the Gmail workspace you want to connect.
  • Composio MCP.

Note: Composio connects through OAuth. You will be asked to sign in and approve specific permissions. Review the permission screen carefully if you are using a work account.

Step-by-step: Connect Gmail to ChatGPT

1. Enable Developer Mode

In ChatGPT, go to Settings > Apps > Advanced settings and turn on Developer Mode.

ChatGPT settings showing Developer Mode toggle

2. Add the MCP server

Click Create app, then paste the Composio MCP server URL:

bash
https://connect.composio.dev/mcp
ChatGPT create app flow with Composio MCP URL

3. Authorize in your browser

A browser window will open automatically. Sign in to authorize ChatGPT to access your Composio account.

Composio authorization screen for ChatGPT MCP setup

4. Start using Composio

Composio tools are now available in ChatGPT chats and Deep Research. In every new chat, click the + icon at the bottom, click More, and select Composio to enable tools for that conversation.

What you can do after connecting Gmail

  • Summarize unread emails from this morning
  • Create draft replies to urgent messages
  • Fetch contact details for recent senders
  • Add 'Follow Up' label to flagged emails

Security + privacy notes (important)

  • Use least-privilege access: Only grant permissions you actually need.
  • Review OAuth permissions before approving: Make sure requested scopes match what you expect Composio and ChatGPT to do.
  • Keep write actions human-reviewed: For actions like sending messages, creating labels, or editing drafts, keep manual confirmation enabled.
  • Be careful with sensitive data: Avoid using this setup with highly sensitive information unless allowed by your personal, company, or client policies.

Supported Tools & Triggers

Tools
Triggers
Modify email labelsAdds and/or removes specified Gmail labels for a message; ensure `message_id` and all `label_ids` are valid (use 'listLabels' for custom label IDs).
Batch delete Gmail messagesTool to permanently delete multiple Gmail messages in bulk, bypassing Trash with no recovery possible.
Batch modify Gmail messagesModify labels on multiple Gmail messages in one efficient API call.
Create email draftCreates a Gmail email draft.
Create Gmail filterTool to create a new Gmail filter with specified criteria and actions.
Create labelCreates a new label with a unique name in the specified user's Gmail account.
Create Prompt PostSend a one-shot prompt to the Sanity Content Agent.
Delete DraftPermanently deletes a specific Gmail draft using its ID with no recovery possible; verify the correct `draft_id` and obtain explicit user confirmation before calling.
Delete Gmail filterTool to permanently delete a Gmail filter by its ID.
Delete label from account (permanent)Permanently DELETES a user-created Gmail label from the account (not from a message).
Delete messagePermanently deletes a specific email message by its ID from a Gmail mailbox; for `user_id`, use 'me' for the authenticated user or an email address to which the authenticated user has delegated access.
Delete threadTool to immediately and permanently delete a specified thread and all its messages.
Fetch emailsFetches a list of email messages from a Gmail account, supporting filtering, pagination, and optional full content retrieval.
Fetch message by message IDFetches a specific email message by its ID, provided the `message_id` exists and is accessible to the authenticated `user_id`.
Fetch Message by Thread IDRetrieves messages from a Gmail thread using its `thread_id`, where the thread must be accessible by the specified `user_id`.
Forward email messageForward an existing Gmail message to specified recipients, preserving original body and attachments.
Get Gmail attachmentRetrieves a specific attachment by ID from a message in a user's Gmail mailbox, requiring valid message and attachment IDs.
Get Auto-Forwarding SettingsTool to get the auto-forwarding setting for the specified account.
Get contactsFetches contacts (connections) for the authenticated Google account, allowing selection of specific data fields and pagination.
Get DraftRetrieves a single Gmail draft by its ID.
Get Gmail filterTool to retrieve a specific Gmail filter by its ID.
Get label detailsGets details for a specified Gmail label.
Get Language SettingsTool to retrieve the language settings for a Gmail user.
Get PeopleRetrieves either a specific person's details (using `resource_name`) or lists 'Other Contacts' (if `other_contacts` is true), with `person_fields` specifying the data to return.
Get ProfileRetrieves Gmail profile information (email address, aggregate messagesTotal/threadsTotal, historyId) for a user.
Get Vacation SettingsTool to retrieve vacation responder settings for a Gmail user.
Import messageTool to import a message into the user's mailbox with standard email delivery scanning and classification.
Insert message into mailboxTool to insert a message into the user's mailbox similar to IMAP APPEND.
List CSE identitiesTool to list client-side encrypted identities for an authenticated user.
List CSE key pairsTool to list client-side encryption key pairs for an authenticated user.
List DraftsRetrieves a paginated list of email drafts from a user's Gmail account.
List Gmail filtersTool to list all Gmail filters (rules) in the mailbox.
List forwarding addressesTool to list all forwarding addresses for the specified Gmail account.
List Gmail historyTool to list Gmail mailbox change history since a known startHistoryId.
List Gmail labelsRetrieves all system and user-created labels for a Gmail account in a single unpaginated response.
List send-as aliasesLists the send-as aliases for a Gmail account, including the primary address and custom 'from' aliases.
List S/MIME configsLists S/MIME configs for the specified send-as alias.
List threadsRetrieves a list of email threads from a Gmail account, identified by `user_id` (email address or 'me'), supporting filtering and pagination.
Modify thread labelsAdds or removes specified existing label IDs from a Gmail thread, affecting all its messages; ensure the thread ID is valid.
Trash threadMoves the specified thread to the trash.
Move to TrashMoves an existing, non-deleted email message to the trash for the specified user.
Patch LabelPatches the specified user-created label.
Patch send-as aliasTool to patch the specified send-as alias for a Gmail user.
Reply to email threadSends a reply within a specific Gmail thread using the original thread's subject; do not provide a custom subject as it will start a new conversation instead of replying in-thread.
Search PeopleSearches contacts by matching the query against names, nicknames, emails, phone numbers, and organizations, optionally including 'Other Contacts'.
Send DraftSends an existing draft email AS-IS to recipients already defined within the draft.
Send EmailSends an email via Gmail API using the authenticated user's Google profile display name.
Get IMAP SettingsRetrieves the IMAP settings for a Gmail user account, including whether IMAP is enabled, auto-expunge behavior, expunge behavior, and maximum folder size.
Get POP settingsTool to retrieve POP settings for a Gmail account.
Get send-as aliasTool to retrieve a specific send-as alias configuration for a Gmail user.
Stop watch notificationsTool to stop receiving push notifications for a Gmail mailbox.
Untrash MessageTool to remove a message from trash in Gmail.
Untrash threadTool to remove a thread from trash in Gmail.
Update draftUpdates (replaces) an existing Gmail draft's content in-place by draft ID.
Update IMAP settingsTool to update IMAP settings for a Gmail account.
Update LabelTool to update the properties of an existing Gmail label.
Update Language SettingsTool to update the language settings for a Gmail user.
Update POP settingsTool to update POP settings for a Gmail account.
Update send-as aliasTool to update a send-as alias for a Gmail user.
Update User Attributes ValuesUpdate user attribute values for a resource.
Update Vacation SettingsTool to update vacation responder settings for a Gmail user.

How to build Gmail MCP Agent with another framework

FAQ

What are the differences in Tool Router MCP and Gmail MCP?

With a standalone Gmail MCP server, the agents and LLMs can only access a fixed set of Gmail tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Gmail and many other apps based on the task at hand, all through a single MCP endpoint.

Can I use Tool Router MCP with ChatGPT?

Yes, you can. ChatGPT fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Gmail tools.

Can I manage the permissions and scopes for Gmail while using Tool Router?

Yes, absolutely. You can configure which Gmail scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Gmail data and credentials are handled as safely as possible.

Used by agents from

Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.