gmail-mcp
gmail-mcp
MCP server for Gmail — search, read, archive, and manage your email from any MCP client.
Setup
Add to your MCP client configuration:
{
"mcpServers": {
"gmail": {
"command": "npx",
"args": ["-y", "@d-mato/gmail-mcp"]
}
}
}On first launch, a browser window will open for Google account authorization. After granting access, the token is stored locally at ~/.gmail-mcp/tokens.json and you won't need to authorize again.
Available Tools
Messages
Tool | Description |
| Search messages using Gmail query syntax (e.g. |
| Get the full content of a message by ID |
| Get all messages in a thread by thread ID |
| Download an attachment (inline for images/text, or save to disk) |
| Archive a message (remove from inbox) |
| Archive multiple messages in a single API call |
| Move a message to trash |
| Move multiple messages to trash in a single API call |
| Remove a message from trash |
| Mark a message as read |
| Mark a message as unread |
Threads
Tool | Description |
| Archive all messages in a thread (remove from inbox) |
| Move all messages in a thread to trash |
| Remove a thread from trash |
| Mark all messages in a thread as read |
| Mark all messages in a thread as unread |
Labels
Tool | Description |
| List all labels |
| Add a label to a message |
| Remove a label from a message |
| Create a new label |
| Delete a label |
License
MIT