Gmail MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GMAIL_MCP_TOKEN_PATH | No | Custom path to the token cache file where authentication tokens are stored. | ~/.config/gmail-mcp/token.json |
| GMAIL_MCP_CREDENTIALS_PATH | Yes | Path to your Google Cloud OAuth credentials JSON file. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {
"tasks": {
"list": {},
"cancel": {},
"requests": {
"tools": {
"call": {}
},
"prompts": {
"get": {}
},
"resources": {
"read": {}
}
}
}
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_unreadB | List unread emails from inbox. Args: max_results: Maximum number of emails to return (1-100). Default: 20. Returns: List of email objects with id, from, subject, date, snippet, labels, body_preview. |
| searchA | Search emails using Gmail query syntax. Args: query: Gmail search query (e.g., "from:user@example.com is:unread", "subject:invoice", "newer_than:1d"). max_results: Maximum number of results (1-100). Default: 20. Returns: List of email objects matching the query. |
| archiveA | Archive emails by removing INBOX and UNREAD labels. Args: message_ids: List of message IDs to archive. Returns: Dict with archived_count, failed_count, and details. |
| mark_as_readA | Mark emails as read without archiving. Args: message_ids: List of message IDs to mark as read. Returns: Dict with marked_count, failed_count, and details. |
| get_labelsB | Get all Gmail labels for the authenticated user. Returns: List of label objects with id, name, type, and message counts. |
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
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/fred-drake/gmail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server