Gmail MCP Server Integration

Seamlessly connect Gmail with your AI assistants in FlowHunt. Automate email management, search, batch operations, and more, all while maintaining security through OAuth2.

Gmail MCP Server Integration

What does “Gmail” MCP Server do?

The Gmail MCP Server is a Model Context Protocol (MCP) server designed to integrate Gmail functionalities into AI platforms such as Claude Desktop. Its primary role is to serve as a bridge between AI assistants and Gmail, allowing natural language interactions for managing emails. This includes sending and reading emails, managing labels, handling attachments, searching for specific messages, and performing batch operations. By exposing these capabilities as MCP tools and resources, the Gmail MCP Server enables developers to create powerful workflows where AI agents can automate and streamline email management, facilitate contextual data retrieval from inboxes, and manipulate Gmail content programmatically, all while leveraging secure OAuth2-based authentication.

List of Prompts

No explicit prompt templates are listed in the repository or documentation.

List of Resources

  • Email Messages
    Exposes email messages as resources that can be read and used as context for LLM interactions.

  • Gmail Labels
    Provides access to both system and user-defined Gmail labels, which can be used to organize or retrieve emails.

  • Attachments Metadata
    Enables retrieval of information about email attachments, such as filenames, types, and sizes.

  • Search Results
    Allows clients to access the results of advanced email searches based on subject, sender, or date range.

List of Tools

Based on the features listed in the documentation, the following tools are provided by the Gmail MCP Server:

  • send_email
    Send emails with subject, content, attachments, and recipients, including support for HTML and international characters.

  • read_email
    Retrieve email messages by ID, with support for complex MIME structures.

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

  • manage_labels
    Create, update, delete, and list labels for comprehensive label management.

  • search_emails
    Search emails using various criteria (subject, sender, date range).

  • list_emails_by_label
    List emails in inbox, sent, or custom labels.

  • mark_read_unread
    Mark emails as read or unread.

  • move_email
    Move emails to different labels/folders.

  • delete_email
    Delete emails from the mailbox.

  • batch_operations
    Efficiently process multiple emails at once with batch operations.

Use Cases of this MCP Server

  • Automated Email Sending
    Developers can set up workflows that allow AI agents to compose and send emails automatically, reducing manual effort for routine communications.

  • Inbox Triage and Management
    AI assistants can categorize, label, and move emails to appropriate folders, helping users maintain organized inboxes and prioritize important messages.

  • Email Search and Retrieval
    With advanced search criteria, users can quickly locate specific messages or attachments, streamlining information retrieval from their Gmail accounts.

  • Batch Processing
    Bulk operations such as deleting, marking read/unread, or moving groups of emails can be automated, saving time for users with high email volumes.

  • Label Management Automation
    AI can create, update, or delete Gmail labels dynamically, enabling adaptive organization strategies based on evolving user needs or project requirements.

How to set it up

Windsurf

  1. Ensure prerequisites such as Node.js are installed.
  2. Open the Windsurf configuration file (commonly windsurf.json or similar).
  3. Add the Gmail MCP Server package:
    {
      "mcpServers": {
        "gmail-mcp": {
          "command": "npx",
          "args": ["@gongrzhe/server-gmail-autoauth-mcp@latest"]
        }
      }
    }
    
  4. Save the configuration and restart Windsurf.
  5. Verify the setup by checking that the MCP server is listed in your Windsurf dashboard.

Securing API Keys Example:

{
  "mcpServers": {
    "gmail-mcp": {
      "command": "npx",
      "args": ["@gongrzhe/server-gmail-autoauth-mcp@latest"],
      "env": {
        "GOOGLE_CLIENT_ID": "your-client-id",
        "GOOGLE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Claude

  1. Ensure Node.js and the Claude platform are set up.
  2. Edit the Claude MCP configuration file.
  3. Add the Gmail MCP Server:
    {
      "mcpServers": {
        "gmail-mcp": {
          "command": "npx",
          "args": ["@gongrzhe/server-gmail-autoauth-mcp@latest"]
        }
      }
    }
    
  4. Save the configuration and restart Claude.
  5. Confirm the server is active within Claude.

Environment Variable Example:

{
  "env": {
    "GOOGLE_CLIENT_ID": "your-client-id",
    "GOOGLE_CLIENT_SECRET": "your-client-secret"
  }
}

Cursor

  1. Install Node.js and ensure Cursor is running.
  2. Update the Cursor configuration to include the Gmail MCP Server:
    {
      "mcpServers": {
        "gmail-mcp": {
          "command": "npx",
          "args": ["@gongrzhe/server-gmail-autoauth-mcp@latest"]
        }
      }
    }
    
  3. Restart Cursor for changes to take effect.
  4. Verify integration by checking available MCP servers.

Cline

  1. Prepare your environment with Node.js.
  2. Add the Gmail MCP Server entry in Cline’s configuration:
    {
      "mcpServers": {
        "gmail-mcp": {
          "command": "npx",
          "args": ["@gongrzhe/server-gmail-autoauth-mcp@latest"]
        }
      }
    }
    
  3. Save and restart Cline.
  4. Check that the Gmail MCP Server is recognized in the interface.

Note:
Always store sensitive API keys or credentials as environment variables and not directly in the configuration files. Use the env property in your MCP server configuration for secure injection of credentials.

How to use this MCP inside flows

Using MCP in FlowHunt

To integrate MCP servers into your FlowHunt workflow, start by adding the MCP component to your flow and connecting it to your AI agent:

FlowHunt MCP flow

Click on the MCP component to open the configuration panel. In the system MCP configuration section, insert your MCP server details using this JSON format:

{
  "gmail-mcp": {
    "transport": "streamable_http",
    "url": "https://yourmcpserver.example/pathtothemcp/url"
  }
}

Once configured, the AI agent can now use this MCP as a tool with access to all its functions and capabilities. Remember to change “gmail-mcp” to whatever the actual name of your MCP server is and replace the URL with your own MCP server URL.


Overview

SectionAvailabilityDetails/Notes
OverviewOverview and features clearly documented
List of PromptsNo explicit prompt templates found
List of ResourcesEmails, labels, attachments, search results
List of ToolsTools inferred from features list
Securing API KeysEnvironment variable config is demonstrated
Sampling Support (less important in evaluation)No mention of sampling support

Based on the available documentation, Gmail MCP Server is well-featured for Gmail workflow automation and integration but lacks explicit prompt templates and sampling/roots support documentation. Its security handling and tool/resource exposure are strong, so I’d rate this MCP a 7.5 out of 10 for completeness and developer readiness.


MCP Score

Has a LICENSE✅ (MIT)
Has at least one tool
Number of Forks106
Number of Stars409

Frequently asked questions

What is the Gmail MCP Server?

The Gmail MCP Server is a Model Context Protocol server that connects AI platforms to Gmail. It enables AI assistants to send, read, search, and organize emails via natural language, while managing labels, attachments, and batch operations, all with secure OAuth2 authentication.

What functionalities does the Gmail MCP Server expose?

It exposes tools for sending emails, reading messages, searching emails, managing labels, handling attachments, marking emails, moving or deleting emails, and performing batch operations—all as MCP tools and resources accessible to AI workflows.

How do I secure my Gmail API credentials?

Always store sensitive API keys such as GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET as environment variables using the 'env' property in your MCP server configuration. Avoid hard-coding credentials directly in your config files.

Can I automate Gmail workflows in FlowHunt?

Yes! By integrating the Gmail MCP Server in FlowHunt, you can automate email sending, triage, search, label management, and batch operations, all from your AI-powered workflow.

What are some common use cases?

Use cases include automated email sending, smart inbox triage, advanced email search and retrieval, label management, and batch processing of emails for efficient workflow automation.

Try Gmail MCP Server in FlowHunt

Empower your AI agents to manage and automate Gmail tasks. Integrate the Gmail MCP Server in FlowHunt for advanced, secure email workflows.

Learn more