gmail-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | Web UI setup server port (default: 3000) | 3000 |
| GMAIL_CLIENT_ID | Yes | Google OAuth2 Client ID | |
| GMAIL_REDIRECT_URI | No | Override redirect URI (default: http://localhost:3000/oauth/callback) | http://localhost:3000/oauth/callback |
| GMAIL_CLIENT_SECRET | Yes | Google OAuth2 Client Secret | |
| GMAIL_REFRESH_TOKEN | Yes | Long-lived refresh token (from setup wizard) |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_emailsA | List emails from Gmail. Filter by labels and/or a search query. Returns sender, subject, date, and snippet for each message. |
| read_emailB | Read the full content of a specific email by its message ID, including headers and decoded body. |
| search_emailsA | Search Gmail using the standard Gmail search syntax. Returns matching emails with sender, subject, date, and snippet. |
| download_attachmentB | Download a specific attachment from a Gmail message. Returns the base64-encoded attachment data and its MIME type. |
| list_attachments_with_safetyA | List attachments for a message and provide policy-based safety assessment for each file. |
| validate_attachmentA | Validate one attachment against local safety policy (size, MIME type, extension, filename). |
| download_attachment_safeA | Safely download one validated attachment. Blocks risky files and enforces policy checks before returning data. |
| redact_text_localB | Redact sensitive content from provided text using local privacy pipeline (orchestrator with deterministic fallback). |
| read_email_with_privacyA | Read one email and return only privacy-redacted subject/snippet/body fields using the local privacy pipeline. |
| send_emailC | Send an email via the authenticated Gmail account. |
| create_draftA | Create a draft email in Gmail without sending it. |
| reply_to_emailA | Reply to an existing email thread. Automatically sets Reply-To headers and preserves the thread. |
| delete_emailA | Move an email to Trash. Pass permanent: true to permanently delete (irreversible). |
| mark_as_readA | Mark an email as read by removing the UNREAD label. |
| mark_as_unreadB | Mark an email as unread by adding the UNREAD label. |
| set_labelsA | Add and/or remove labels on an email. Use get_labels to obtain valid label IDs. |
| get_labelsA | List all Gmail labels (system labels like INBOX, SENT and user-created labels). Returns label IDs, names, and message counts. |
| get_profileA | Get the authenticated Gmail user profile: email address, total message count, and thread count. Useful to verify the connection. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
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/enoch-sit/gmail-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server