Gmail AutoAuth MCP Server logo

Gmail AutoAuth MCP Server

by GongRzhe

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.

View on GitHub

Last updated: N/A

What is Gmail AutoAuth MCP Server?

The Gmail AutoAuth MCP Server is a tool that allows AI assistants, specifically Claude Desktop, to interact with and manage Gmail accounts through natural language. It provides a seamless integration by handling authentication and providing a set of tools for common email tasks.

How to use Gmail AutoAuth MCP Server?

To use the server, you need to create a Google Cloud Project, enable the Gmail API, and obtain OAuth 2.0 credentials. Then, you can install the server using Smithery or manually via npm. After installation, authenticate using the auth command, providing the path to your OAuth keys. Finally, configure Claude Desktop to use the server by specifying the command and arguments in the mcpServers configuration.

Key features of Gmail AutoAuth MCP Server

  • Send emails with attachments and international character support

  • Read, search, modify, and delete emails

  • Comprehensive label management (create, update, delete, list)

  • Batch operations for efficient email processing

  • Simple OAuth2 authentication flow with auto browser launch

  • Docker support for containerized environments

Use cases of Gmail AutoAuth MCP Server

  • Automated email sending and drafting

  • Intelligent email searching and filtering

  • Automated label management and organization

  • Integrating Gmail with AI assistants for natural language email management

  • Bulk email processing and management tasks

FAQ from Gmail AutoAuth MCP Server

Where should I place the gcp-oauth.keys.json file?

You can place it either in your current directory when running the authentication command or in the ~/.gmail-mcp/ directory for global access.

What redirect URI should I use for Web application credentials?

Make sure to add http://localhost:3000/oauth2callback to your authorized redirect URIs in the Google Cloud Console.

How do I configure Claude Desktop to use this server?

Add the following configuration to your Claude Desktop settings: {"mcpServers": {"gmail": {"command": "npx","args": ["@gongrzhe/server-gmail-autoauth-mcp"]}}}

What if port 3000 is already in use?

If port 3000 is already in use, you need to free it up before running authentication. You can find and stop the process using that port.

How do I handle authentication in a cloud server environment?

You can specify a custom callback URL during authentication using the command: npx @gongrzhe/server-gmail-autoauth-mcp auth https://yourdomain.com/oauth2callback. Make sure to configure a reverse proxy and DNS settings accordingly.