drio
Open app

Gmail IMAP MCP Server

Source

Gmail IMAP MCP server for integrating Gmail with Claude and other AI assistants

Catalog onlyCatalog onlySTDIO

Overview

The Gmail IMAP MCP Server is a Model Context Protocol (MCP) server designed for integrating Gmail with AI assistants, allowing them to read, search, and manage emails through IMAP.

To use the server, clone the repository, set up a Google Cloud project with the Gmail API enabled, and authenticate your Gmail account using OAuth2. Start the server and use the provided tools to interact with your Gmail account.

  • OAuth2 authentication with Gmail - Read and search emails with advanced options - Send emails with attachments - Manage labels (create, delete, list) - Support for multiple Gmail accounts - Integration with AI assistants through MCP
  1. Automating email management tasks for users.
  2. Enabling AI assistants to summarize and triage emails.
  3. Facilitating email composition and organization through voice commands.

Add to your AI client

Use these steps to connect Gmail IMAP MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "gmail-imap-mcp-tonykipkemboi": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-gmail-imap-mcp-tonykipkemboi"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "gmail-imap-mcp-tonykipkemboi": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-gmail-imap-mcp-tonykipkemboi"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "gmail-imap-mcp-tonykipkemboi": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-gmail-imap-mcp-tonykipkemboi"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "gmail-imap-mcp-tonykipkemboi": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-gmail-imap-mcp-tonykipkemboi"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "gmail-imap-mcp-tonykipkemboi": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-gmail-imap-mcp-tonykipkemboi"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "gmail-imap-mcp-tonykipkemboi": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-gmail-imap-mcp-tonykipkemboi"
      ]
    }
  }
}

FAQ

Can I use this server with multiple Gmail accounts?

Yes, the server supports multiple Gmail accounts.

Is there a limit on the number of emails I can manage?

No, but performance may vary based on the number of emails and server resources.

How secure is my data with this server?

OAuth2 credentials are stored securely, and the server uses secure connections to Gmail.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2622,"uuid":"e7701cdb-0f41-4e3d-8a5c-32b564d54d88","name":"gmail-imap-mcp","title":"Gmail IMAP MCP Server","description":"Gmail IMAP MCP server for integrating Gmail with Claude and other AI assistants","avatar_url":"https://avatars.githubusercontent.com/u/64493665?v=4","created_at":"2025-03-13T09:12:32.183Z","updated_at":"2025-03-13T09:41:21.438Z","status":"created","author_name":"tonykipkemboi","author_avatar_url":"https://avatars.githubusercontent.com/u/64493665?v=4","tags":"gmail,imap,mcp,ai-assistant,email-integration","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/tonykipkemboi/gmail-imap-mcp","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-03-10 13:44:11\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]