How to connect Gmail to Claude Cowork

Trusted by
AWS
Glean
Zoom
Airtable

30 min · no commitment · see it on your stack

Gmail logo
Claude Cowork logo
divider

Introduction

Cowork is Anthropic's AI agent for knowledge work. Think of it as Claude Code for everything else. It works autonomously with your computer, local files, and applications to accomplish complex tasks.

This guide walks you through the easiest and most secure way to connect your Gmail account to Cowork via Composio Connect, enabling it to summarize unread emails from this morning, create draft replies to urgent messages, fetch contact details for recent senders, and more such actions on your behalf without compromising your account security.

Also integrate Gmail with

Connecting Gmail to Claude Cowork

1. Open Customize

In Claude Desktop, click Customize in the left sidebar, then select Connectors and click the + icon at the top.

Claude Desktop connectors screen with Add custom connector selected

2. Add the Composio MCP server

Click Add custom connector and paste in the Composio MCP server URL:

bash
https://connect.composio.dev/mcp
Add custom connector dialog with Composio MCP server URL

3. Authorize in your browser

Click Connect. You'll be redirected to a browser window where you can authorize Composio to continue.

Composio authorization screen for Claude Cowork

4. Connect your Gmail account

Back in Cowork, ask the agent to connect to Gmail or give it any Gmail-related task.

For example, ask Cowork to:

  • "Summarize unread emails from this morning"
  • "Create draft replies to urgent messages"
  • "Fetch contact details for recent senders"

It will prompt you to authenticate and authorize access.

That's it. Composio's tools are now available in Cowork, and your Gmail account is ready to use.

What is Claude Cowork?

Claude Cowork is Anthropic's agent for general knowledge work. It can use your computer, files, and connected applications to complete longer-running tasks across your work tools.

With Composio Connect, Cowork can securely access apps like Gmail through MCP without you sharing account credentials directly with the agent.

What is the Gmail MCP server, and what's possible with it?

The Gmail MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Gmail account. It provides structured and secure access to your email, so your agent can search, read, draft, organize, and even manage contacts in your mailbox—all on your behalf.

  • Advanced email search and retrieval: Effortlessly instruct your agent to fetch emails by sender, subject, label, date, or keywords, and even retrieve full message content or threads.
  • Automated drafting and sending: Have your agent create new email drafts, craft replies, add CC/BCC, include attachments, and handle threading to streamline communication.
  • Smart label and inbox organization: Let the agent create new labels, apply or remove labels from emails, and keep your inbox clutter-free by archiving or moving messages.
  • Contact and thread management: Fetch your Gmail contacts, pull entire conversation threads, or download specific attachments to make follow-ups a breeze.
  • Email and draft cleanup: Direct your agent to permanently delete emails or drafts, helping you maintain a tidy mailbox with minimal effort.

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 Claude Cowork?

Yes, you can. Claude Cowork 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.