Gmail
Hosted Gmail MCP for Claude, ChatGPT and Cursor. OAuth setup, read and send mail, and cross-tool attachment handoff via the private gateway.
Overview
Read and send email through Gmail API with AI clients. Use this Gmail MCP integration to connect Claude, ChatGPT, or Cursor to a Google mailbox with OAuth — no IMAP passwords in prompts.
Common use cases
- Connect Gmail to ChatGPT or Claude — search threads, read messages, and draft replies through MCP tools.
- Governed OAuth scopes — credentials stay in stackgate.ai; agents never see your Google password.
- Cross-tool workflows — download attachments to Temp Storage and hand files to other integrations via the private gateway.
Prerequisites
- A Google account with Gmail enabled
- A stackgate.ai account
Getting credentials
- Sign in to stackgate.ai and open Integrations → Gmail.
- Click Activate, then Connect Gmail.
- Sign in with Google and grant the requested Gmail scopes.
stackgate.ai uses the same Google OAuth app as Google Calendar and Search Console where applicable.
Using with AI clients
- Dedicated endpoint:
POST /mcp/gmail - Private gateway:
gmail__*tools
Set store_in_temp_storage=true on download_attachment to store an attachment in Temp Storage and receive a file_id for cross-tool handoff. Requires Temp Storage activated on My Integrations.
Troubleshooting
- Insufficient scopes — reconnect Gmail to refresh OAuth permissions.
- Send failures — verify the connected account has permission to send from the requested address.
Available tools
-
list_accounts
List connected Gmail accounts for this hub user (id, label, email) and the default account.
-
list_labels
List Gmail labels for the connected mailbox, including system labels like INBOX and UNREAD.
-
list_messages
List or search Gmail messages in the connected mailbox. Returns message IDs and thread IDs; use get_message for full content.
-
get_message
Get a Gmail message by ID, including headers and body when format is full.
-
download_attachment
Download a Gmail attachment by message ID and attachment ID. Returns metadata plus embedded binary content for files under 10 MB, or a resource_link for larger files (fetch bytes via resources/read). Pass mime_type and filename from get_message payload parts when available. Set store_in_temp_storage=true to store in temp storage and receive a file_id for cross handoff.
-
send_message
Send an email from the connected Gmail account. Supports plain text or HTML body. Pass thread_id to reply in an existing conversation.
-
modify_message_labels
Add or remove Gmail labels on a message. Use list_labels to discover label IDs.
MCP endpoint:
https://stackgate.ai/mcp/gmail
(HTTP) or via the
private gateway.
Related workflows
Multi-integration playbooks that use Gmail to solve concrete business outcomes.
-
Daily standup from Trello, Slack, and Gmail
Summarize yesterday's board movement, Slack threads, and inbox follow-ups into one standup draft without switching tools.
-
CRM revenue workspace with Salesforce, HubSpot, Gmail, and Slack
Unify pipeline visibility across Salesforce and HubSpot, draft follow-ups in Gmail, and alert revenue teams in Slack without forcing a single CRM.
-
Lead qualification handoff with Typeform, HubSpot, Gmail, and Slack
Pull new Typeform lead responses, enrich or create HubSpot contacts, draft Gmail follow-ups, and alert the team in Slack.
-
Temp Storage handoffs between AI tools
Pass files between email, WordPress, and other integrations without manual downloads or re-uploads.
-
Prospect company brief with CVR, CRM, and email
Resolve a Danish prospect by CVR or name, enrich with CRM context, and draft a follow-up email.