MCPdir β€” MCP Server Directory
πŸ‡¬πŸ‡§ πŸ‡ͺπŸ‡Έ

Gmail Auto-Auth MCP Server

by GongRzhe

Full Gmail integration with automatic OAuth authentication for AI assistants

communication Node.js Intermediate Self-hostable Docker
⭐ 1.0k stars πŸ“¦ 34.9k/week πŸ“… Updated: 8mo ago

Description

An MCP server for Gmail that stands out for its automatic OAuth2 authentication flow β€” it launches the browser, handles the callback, and stores credentials globally so setup is done once. Provides 19 tools covering email operations (send, draft, read, search, delete), full attachment support (send, receive, download), comprehensive label management (CRUD), batch operations for up to 50 emails at a time, and advanced filter creation with pre-defined templates. Supports HTML and multipart emails with international character encoding. With 34,000+ weekly npm downloads, it's one of the most widely used Gmail MCP servers.

βœ… Best for

Developers who want hassle-free Gmail integration with AI assistants and need full email management capabilities

⏭️ Skip if

You need multi-provider email support or prefer a server-side OAuth flow without browser interaction

πŸ’‘ Use cases

  • Sending and drafting emails with attachments through AI assistants
  • Searching and organizing inbox using Gmail's advanced search syntax
  • Automating email labeling and filtering with template-based rules
  • Batch-processing emails for classification or cleanup
  • Reading and downloading email attachments for data extraction

πŸ‘ Pros

  • βœ“ Automatic OAuth2 authentication β€” no manual token setup needed
  • βœ“ 34,000+ weekly npm downloads, well-tested in production
  • βœ“ Full attachment support for sending, receiving, and downloading
  • βœ“ Batch operations handle up to 50 emails at once
  • βœ“ Filter templates for common scenarios like auto-labeling

πŸ‘Ž Cons

  • βœ— Requires Google Cloud OAuth credentials setup (one-time)
  • βœ— Limited to Gmail β€” does not support other email providers
  • βœ— 71 open issues suggest some edge cases remain unresolved

πŸ”§ Exposed tools (15 tools)

ToolCategoryDescription
batch_modify_emailsbatch-operationsModify labels for multiple emails efficiently in batches of up to 50
batch_delete_emailsbatch-operationsPermanently delete multiple emails in batches
send_emailemail-operationsSend new emails with subject, content, optional attachments, and recipients
draft_emailemail-operationsCreate draft emails without sending, with attachment support
read_emailemail-operationsRetrieve specific email content by ID with attachment information
download_attachmentemail-operationsDownload email attachments to local filesystem
search_emailsemail-operationsSearch emails using Gmail search syntax and criteria
modify_emailemail-operationsAdd or remove labels from emails
delete_emailemail-operationsPermanently delete an email
create_filterfilter-managementCreate Gmail filters with custom criteria and actions
list_filtersfilter-managementRetrieve all Gmail filters
create_filter_from_templatefilter-managementCreate filters using pre-defined templates for common scenarios
list_email_labelslabel-managementRetrieve all available Gmail labels
create_labellabel-managementCreate new Gmail labels
get_or_create_labellabel-managementGet existing label or create if not found

πŸ’‘ Tips & tricks

Run 'npx @gongrzhe/server-gmail-autoauth-mcp auth' once to complete the OAuth flow. Credentials are stored globally at ~/.gmail-mcp/credentials.json so they work from any project directory. Use create_filter_from_template for quick inbox rules.

Quick info

Author
GongRzhe
License
MIT
Runtime
Node.js 18+
Transport
stdio
Category
communication
Difficulty
Intermediate
Self-hostable
βœ…
Auth
β€”
Docker
🐳 Docker available
Version
1.1.11
Updated
Aug 6, 2025

Client compatibility

  • ❓ Claude Code
  • ❓ Cursor
  • ❓ VS Code Copilot
  • ❓ Gemini CLI
  • ❓ Windsurf
  • ❓ Cline
  • ❓ JetBrains AI
  • ❓ Warp

Platforms

🍎 macOS 🐧 Linux πŸͺŸ Windows