Gmail
Read and send email via Gmail API.
Overview
Read and send email through Gmail API with AI clients.
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
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-labels-tool
List Gmail labels for the connected mailbox, including system labels like INBOX and UNREAD.
-
list-messages-tool
List or search Gmail messages in the connected mailbox. Returns message IDs and thread IDs; use get-message-tool for full content.
-
get-message-tool
Get a Gmail message by ID, including headers and body when format is full.
-
download-attachment-tool
Download a Gmail attachment by message ID and attachment ID. Returns standard base64-encoded file data. Get attachment IDs from get-message-tool payload parts.
-
send-message-tool
Send an email from the connected Gmail account. Supports plain text or HTML body.
-
modify-message-labels-tool
Add or remove Gmail labels on a message. Use list-labels-tool to discover label IDs.
MCP endpoint:
https://stackgate.ai/mcp/gmail
(HTTP) or via the private gateway.