@mcp-z/mcp-gmail
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | Port for HTTP transport (used for OAuth callback URL). | |
| AUTH_MODE | No | Authentication mode: loopback (default), service-account, or dcr. | |
| REDIRECT_URI | No | Redirect URI for OAuth. Omit for local loopback; set to public /oauth/callback for cloud. | |
| DCR_STORE_URI | No | URI for DCR registration storage (default: file://). | |
| TOKEN_STORE_URI | No | URI for OAuth token storage (default: file:// under ~/.mcp-z/). | |
| GOOGLE_CLIENT_ID | No | Your Google OAuth client ID. Required for loopback OAuth and DCR modes. | |
| GOOGLE_CLIENT_SECRET | No | Your Google OAuth client secret. Required for loopback OAuth and DCR modes. | |
| GOOGLE_SERVICE_ACCOUNT_KEY_FILE | No | Path to the Google service account JSON key file. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| categories-listA | List Gmail category labels (CATEGORY_*) with IDs and descriptions. |
| label-addB | Add a label to a Gmail message |
| label-deleteA | Delete Gmail labels permanently (irreversible). System labels (INBOX, SENT, etc.) cannot be deleted. |
| labels-listA | List Gmail labels for label: query syntax. Case-sensitive. |
| message-getA | Get a Gmail message by ID with flexible field selection |
| message-mark-readA | Mark a Gmail message as read |
| message-move-to-trashA | Move Gmail messages to trash (recoverable). |
| message-respondB | Send a reply to a Gmail message |
| message-searchB | Search Gmail messages using structured query objects with flexible field selection. |
| message-sendC | Send an email message through Gmail |
| messages-export-csvA | Export Gmail messages to CSV with streaming pagination. Returns file URI. Use query-syntax prompt for query reference. |
| account-meA | Show current mcp-gmail user identity. Returns email, alias (if set), and session expiry information. |
| account-switchA | Use mcp-gmail account (smart mode). If email/alias provided and already linked, switches to it without triggering OAuth. If not linked or no email provided, triggers OAuth browser flow to add account. Returns account email, whether it was newly added, and total account count. |
| account-removeA | Remove mcp-gmail account and delete stored tokens permanently. If removing the active account, the first remaining account becomes active. Requires email or alias parameter. |
| account-listA | List all linked mcp-gmail accounts with their aliases and active status. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| draft-email | Draft an email response |
| query-syntax | Reference guide for Gmail query syntax |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mcp-z/mcp-gmail'
If you have feedback or need assistance with the MCP directory API, please join our Discord server