Gmail

Gmail

A Model Context Protocol (MCP) server for Gmail integration in Claude Desktop with auto authentication support.

832
Stars
227
Forks
0
Releases

Overview

A Model Context Protocol (MCP) server that enables Claude Desktop to manage Gmail via natural language interactions with automatic OAuth2 authentication. The server integrates with the Gmail API and supports both Desktop and Web credentials, with global credential storage for convenience (typically at ~/.gmail-mcp/). It can operate in cloud environments using a custom OAuth callback URL. After initial authentication, credentials are reusable across sessions. The server enables sending emails with subject, body, recipients, and optional attachments, supporting plain text, HTML, and multipart messages. It can read emails by ID with robust MIME parsing, search emails using Gmail syntax, and perform comprehensive label management (create, update, delete, list, and get-or-create). Attachment features include enhanced display of filenames, MIME types, sizes, and download IDs, plus the ability to download attachments to the local filesystem. It also provides batch operations for efficiently processing multiple emails, supports international characters, and emphasizes secure, offline-style credential handling. Claude Desktop configuration is straightforward via a JSON mcpServers entry, and the solution supports Docker and cloud deployment scenarios.

Details

Owner
GongRzhe
Language
JavaScript
License
MIT License
Updated
2025-12-07

Features

Send Email with Attachments

Sends emails with subject, body, recipients, and optional attachments, supporting plain text, HTML, and multipart messages.

Full Attachment Support

Supports sending and receiving attachments with MIME type and size awareness.

Download Attachments

Downloads email attachments to the local filesystem with optional custom filename and path.

HTML and Multipart Email Support

Supports HTML emails and multipart messages that combine HTML and plain text parts.

Read Email by ID with MIME Handling

Retrieves email content by ID with robust parsing of complex MIME structures.

Enhanced Attachment Display

Shows attachment details including filenames, MIME types, sizes, and download IDs.

Label Management

Create, update, delete, and list Gmail labels (with get-or-create support).

Batch Email Operations

Process multiple emails efficiently with batch modify or delete capabilities.

Audience

Claude Desktop usersManage Gmail via natural language commands in Claude Desktop with automatic authentication.
MCP developersDevelop and deploy MCP Gmail server integrations for Claude-based workflows with auto authentication.

Tags

gmailmcpgmail-apioauth2attachmentemail-managementlabel-managementsearchmultiparthtml-emailclaude-desktopcloud-deployment