MCP server that enables reading, sending, archiving, and managing Gmail messages via MCP clients.
Configuration
View docs{
"mcpServers": {
"domdomegg-gmail-mcp": {
"url": "http://localhost:3000/mcp",
"headers": {
"MCP_TRANSPORT": "http",
"GOOGLE_CLIENT_ID": "YOUR_CLIENT_ID",
"GOOGLE_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
}
}
}
}You run a Gmail MCP server that lets you search, read, send, archive, and manage emails through MCP clients. It acts as an OAuth-enabled proxy to Google Gmail, enabling automation and complex workflows across your apps and services.
Connect an MCP client to Gmail MCP and start using the tools to search, read, modify, send, and organize emails. Typical workflows include finding receipts, extracting tracking numbers, drafting follow-up emails, or setting vacation auto-replies. You can perform these actions by issuing MCP requests from your client, and Gmail MCP will handle the Gmail API calls behind the scenes.
Key capabilities you can leverage include listing messages and threads, reading message content, sending messages, labeling and archiving, managing drafts and attachments, and handling Gmail settings like vacation auto-replies. Start by registering the Gmail MCP server with your MCP client and then send requests using the client’s MCP interface.
Prerequisites you need before installation: a Node.js environment and a functioning MCP client setup.
Step 1: Create Google OAuth credentials for Gmail access - Go to Google Cloud Console - Create a new project (or select an existing one) - Enable the Gmail API - In APIs & Services, open OAuth consent screen and configure it - In APIs & Services, Credentials, choose Create Credentials → OAuth client ID - Select Web application - Add http://localhost:3000/callback to Authorized redirect URIs - Note your Client ID and Client Secret for later steps
Step 2: Run the server locally with the required environment values set
GOOGLE_CLIENT_ID='your-client-id' \
GOOGLE_CLIENT_SECRET='your-client-secret' \
MCP_TRANSPORT=http \
npm startOnce the server is running, register it with your MCP client so the client can route requests to Gmail through the MCP gateway.
claude mcp add --transport http gmail-mcp http://localhost:3000/mcpGet user's email address and profile info
Search/list messages (consider using gmail_threads_list instead)
Get the content of a single message
Send an email via Gmail API
Add or remove labels from a message
Archive a message (remove from inbox)
Move a message to trash
Restore a message from trash
Permanently delete a message
Bulk label changes on multiple messages
Bulk permanent delete of multiple messages
Search/list threads (recommended)
Get all messages in a thread (recommended)
Add or remove labels on a thread
Move a thread to trash
Restore a thread from trash
Permanently delete a thread
List drafts
Get a draft
Create a draft
Update a draft
Send a draft
Delete a draft
List all labels
Get a label
Create a label
Update a label
Delete a label
Download an attachment
List email filters
Get a filter
Create a filter
Delete a filter
Get vacation auto-reply settings
Set vacation auto-reply settings