Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"gmail": {
"env": {
"OPENAI_API_KEY": "your_openai_api_key_here",
"GMAIL_CLIENT_ID": "your_client_id_here.apps.googleusercontent.com",
"GMAIL_CLIENT_SECRET": "your_client_secret_here"
},
"command": "C:/path/to/your/auto-gmail.exe"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
An MCP server that lets AI agents search Gmail threads, understand your email writing style, and create draft emails.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
personal-email-style-guideYour personal email writing style (auto-generated or manual)
file://personal-email-style-guide
generate-email-toneAnalyze your sent emails to create personalized writing style
server-statusShow file locations and server status
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in communication
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Office services through the Graph API
PubNub Model Context Protocol MCP Server for Cursor and Claude
MCP Security Weekly
Get CVE alerts and security updates for Gmail Mcp Server Agent and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
An MCP server that lets AI agents search Gmail threads, understand your email writing style, and create draft emails.
When you first run the server, it will open your browser for authorization. The server requests only these minimal permissions:
✅ Gmail Readonly Access (gmail.readonly)
✅ Gmail Compose Access (gmail.compose)
Build the server first: go build .
You'll want to add this to your agent's configuration file:
{
"mcpServers": {
"gmail": {
"command": "C:/path/to/your/auto-gmail.exe",
"env": {
"GMAIL_CLIENT_ID": "your_client_id_here.apps.googleusercontent.com",
"GMAIL_CLIENT_SECRET": "your_client_secret_here",
"OPENAI_API_KEY": "your_openai_api_key_here"
}
}
}
}
Problem: In stdio mode, Cursor starts a fresh server process each time (and for each tab), causing OAuth popup spam.
Solution: Run the server as a persistent HTTP daemon that authenticates once and stays running.
# Build the server
go build -o gmail-mcp-server
# Start persistent server (OAuth only once!)
./gmail-mcp-server --http
# Or with custom port
./gmail-mcp-server --http 3000
{
"mcpServers": {
"gmail": {
"command": "C:/path/to/your/gmail-mcp-server",
"env": {
"GMAIL_CLIENT_ID": "your_client_id_here.apps.googleusercontent.com",
"GMAIL_CLIENT_SECRET": "your_client_secret_here",
"OPENAI_API_KEY": "your_openai_api_key_here"
}
}
}
}
The difference: You start the server manually once instead of letting Cursor start it fresh each time.