About
Gmail MCP Server enables AI assistants to manage Gmail accounts through natural language interactions, wrapping the Gmail API in a seamless interface for email operations. Key features: - Send and receive emails with support for HTML formatting, international characters, and file attachments - Download email attachments to the local filesystem with detailed metadata display (filename, type, size) - Search emails using multiple criteria including subject, sender, and date ranges - Comprehensive label management for creating, updating, deleting, and organizing emails into folders - Batch operations for efficiently processing multiple emails at once - Mark emails as read/unread, move messages between labels, and delete emails - Simple OAuth2 authentication flow that automatically launches the browser for credential setup - Support for both Desktop and Web application credentials with global credential storage
README
Gmail AutoAuth MCP Server
A Model Context Protocol (MCP) server for Gmail integration in Claude Desktop with auto authentication support. This server enables AI assistants to manage Gmail through natural language interactions.
[](https://smithery.ai/server/@gongrzhe/server-gmail-autoauth-mcp)
Features
Installation & Authentication
Installing via Smithery
To install Gmail AutoAuth for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @gongrzhe/server-gmail-autoauth-mcp --client claude
Installing Manually
1. Create a Google Cloud Project and obtain credentials:a. Create a Google Cloud Project: - Go to Google Cloud Console - Create a new project or select an existing one - Enable the Gmail API for your project
b. Create OAuth 2.0 Credentials:
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth client ID"
- Choose either "Desktop app" or "Web application" as application type
- Give it a name and click "Create"
- For Web application, add http://localhost:3000/oauth2callback to the authorized redirect URIs
- Download the JSON file of your client's OAuth keys
- Rename the key file to gcp-oauth.keys.json
2. Run Authentication:
You can authenticate in two ways:
a. Global Authentication (Recommended):
# First time: Place gcp-oauth.keys.json in your home directory's .gmail-mcp folder
mkdir -p ~/.gmail-mcp
mv gcp-oauth.keys.json ~/.gmail-mcp/ # Run authentication from anywhere
npx @gongrzhe/server-gmail-autoauth-mcp auth
b. Local Authentication:
# Place gcp-oauth.keys.json in your current directory
# The file will be automatically copied to global config
npx @gongrzhe/server-gmail-autoauth-mcp auth
The authentication process will:
- Look for gcp-oauth.keys.json in the current directory or ~/.gmail-mcp/
- If found in current directory, copy it to ~/.gmail-mcp/
- Open your default browser for Google authentication
- Save credentials as ~/.gmail-mcp/credentials.json
> Note:
> - After successful authentication, credentials are stored globally in ~/.gmail-mcp/ and can be used from any directory
> - Both Desktop app and Web application credentials are supported
> - For Web application credentials, make sure to add http://localhost:3000/oauth2callback to your authorized redirect URIs
3. Configure in Claude Desktop:
{
"mcpServers": {
"gmail": {
"command": "npx",
"args": [
"@gongrzhe/server-gmail-autoauth-mcp"
]
}
}
}
Docker Support
If you prefer using Docker:
1. Authentication:
docker run -i --rm \
--mount type=bind,source=/path/to/gcp-oauth.keys.json,target=/gcp-oauth.keys.json \
-v mcp-gmail:/gmail-server \
-e GMAIL_OAUTH_PATH=/gcp-oauth.keys.json \
-e "GMAIL_CREDENTIALS_PATH=/gmail-server/credentials.json" \
-p 3000:3000 \
mcp/gmail auth
2. Usage:
{
"mcpServers": {
"gmail": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"mcp-gmail:/gmail-server",
"-e",
"GMAIL_CREDENTIALS_PATH=/gmail-server/credentials.json",
"mcp/gmail"
]
}
}
}
Cloud Server Authentication
For cloud server environments (like n8n), you can specify a custom callback URL during authentication:
npx @gongrzhe/server-gmail-autoauth-mcp auth https://gmail.gongrzhe.com/oauth2callback
#### Setup Instructions for Cloud Environment
1
Related MCP Servers
AI Research Assistant
hamid-vakilzadeh
AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar
Linkup
LinkupPlatform
Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages
Math-MCP
EthanHenrickson
Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support