Back to MCP Catalog

Gmail AutoAuth MCP Server

CommunicationJavaScript
Manage Gmail through natural language interactions with AI assistants
Available Tools

send_email

Send an email with subject, content, attachments, and recipients

tosubjectbodyccbccattachmentshtml

read_email

Read email messages by ID with advanced MIME structure handling

idformat

search_emails

Search emails with various criteria like subject, sender, date range

querymaxResults

list_labels

List all available Gmail labels (system and user-defined)

create_label

Create a new Gmail label

namelabelListVisibilitymessageListVisibility

update_label

Update an existing Gmail label

idnamelabelListVisibilitymessageListVisibility

delete_label

Delete a Gmail label

id

list_emails

List emails in inbox, sent, or custom labels

labelIdsmaxResultsincludeSpamTrash

mark_as_read

Mark emails as read

ids

mark_as_unread

Mark emails as unread

ids

move_emails

Move emails to different labels/folders

idsaddLabelIdsremoveLabelIds

delete_emails

Delete emails

ids

batch_modify_emails

Batch operations for efficiently processing multiple emails at once

idsaddLabelIdsremoveLabelIds

Gmail AutoAuth provides a seamless integration between AI assistants and Gmail, enabling natural language management of your email. With comprehensive support for sending, reading, searching, and organizing emails, this tool transforms how you interact with your inbox. The server features automatic authentication handling, making setup straightforward while maintaining security. It supports advanced email operations including HTML formatting, attachment handling, label management, and batch operations for efficiently processing multiple emails at once.

Overview

Gmail AutoAuth enables AI assistants to interact with your Gmail account through natural language. This integration allows you to manage your emails efficiently without leaving your AI assistant interface.

Installation

Prerequisites

  • A Google Cloud Project with Gmail API enabled
  • OAuth 2.0 credentials (Desktop app or Web application type)

Setup Options

Option 1: Install via Smithery (Recommended)

npx -y @smithery/cli install @gongrzhe/server-gmail-autoauth-mcp --client claude

Option 2: Manual Installation

  1. Create OAuth Credentials:

    • Create a project in Google Cloud Console
    • Enable the Gmail API
    • Create OAuth 2.0 credentials (Desktop app or Web application)
    • For Web applications, add http://localhost:3000/oauth2callback to authorized redirect URIs
    • Download the JSON file and rename it to gcp-oauth.keys.json
  2. Authentication Setup:

    • Create a directory for credentials:
      mkdir -p ~/.gmail-mcp
      mv gcp-oauth.keys.json ~/.gmail-mcp/
      
    • Run the authentication process:
      npx @gongrzhe/server-gmail-autoauth-mcp auth
      
    • This will open your browser for Google authentication and save credentials to ~/.gmail-mcp/credentials.json
  3. Configure in Claude Desktop:

    • Add the configuration to your Claude Desktop settings

Option 3: Docker Installation

  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. Configure in Claude Desktop:

    • Add the Docker configuration to your Claude Desktop settings

Cloud Server Authentication

For cloud environments where localhost isn't accessible:

  1. Set up a reverse proxy to forward traffic from your domain to the authentication port
  2. Add your domain to authorized redirect URIs in Google Cloud Console
  3. Run authentication with your custom callback URL:
    npx @gongrzhe/server-gmail-autoauth-mcp auth https://yourdomain.com/oauth2callback
    

Usage

Once installed and authenticated, you can use natural language to interact with your Gmail account through Claude. Examples include:

  • "Send an email to john@example.com about the project update"
  • "Search for emails from Sarah received last week"
  • "Show me unread emails in my inbox"
  • "Create a new label called 'Important Projects'"
  • "Move the email from Alex to the Projects label"

The server handles the translation between your natural language requests and the appropriate Gmail API calls.

Related MCPs

YouTube Transcript
CommunicationTypeScript

Retrieve transcripts from YouTube videos

iMessage Query
CommunicationPython

Access and analyze your iMessage conversations through a secure MCP server

Slack Integration
CommunicationTypeScript

Enables AI assistants to interact with Slack workspaces

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.