Overview
Read, search, send emails, and manage Gmail labels and threads.
Setup
Run with npx:
npx -y @modelcontextprotocol/server-gmailConfiguration
GOOGLE_APPLICATION_CREDENTIALS path to OAuth credentials JSONDocumentation
Gmail MCP (Enhanced)
Overview
Gmail MCP provides integration with Gmail, enabling AI agents to read, search, send emails, and manage labels and threads.
Features
- Email reading and searching
- Email sending
- Label management
- Thread management
- Attachment handling
Installation
npx -y @modelcontextprotocol/server-gmail
Configuration
Create OAuth credentials at https://console.cloud.google.com/apis/credentials.
Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your OAuth credentials JSON file.
Available Tools
| Tool | Description |
|---|---|
list_messages | List Gmail messages |
get_message | Get message details |
send_message | Send an email |
search_messages | Search messages |
modify_labels | Modify message labels |
Usage Examples
Search Messages
{
"query": "from:newsletter subject:weekly",
"max_results": 10
}
Send an Email
{
"to": "recipient@example.com",
"subject": "Meeting Reminder",
"body": "Don't forget our meeting tomorrow at 3pm."
}
Pros
- ✅ Gmail integration
- ✅ Email automation
- ✅ Label management
- ✅ Thread handling
Cons
- ❌ Requires Google OAuth setup
- ❌ Complex configuration
- ❌ Rate limits apply
