MCP.so
Sign In

Gmail MCP Server

@david-strejc

About Gmail MCP Server

MCP Server for interacting with Gmail via IMAP and SMTP

Basic information

Category

Communication

License

BSD-3-Clause license

Runtime

python

Transports

stdio

Publisher

david-strejc

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "gmail-mcp-server-david-strejc": {
      "command": "uv",
      "args": [
        "venv",
        "#",
        "Create",
        "virtual",
        "environment",
        "(.venv)"
      ]
    }
  }
}

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is Gmail MCP Server?

The Gmail MCP Server is a Model Context Protocol (MCP) server that enables interaction with a Gmail account via IMAP and SMTP. It provides tools for email search, content retrieval, label management, batch operations, sending, and forwarding emails.

How to use Gmail MCP Server?

Clone the repository, create a Python virtual environment with uv, install dependencies, and configure environment variables in a .env file (Gmail credentials and server addresses). Run src/email_client/server.py, then add a configuration entry to your MCP client (e.g., Cline) pointing to the server script.

Key features of Gmail MCP Server

  • Search emails by date range, keyword, or raw Gmail query.
  • Retrieve full email content including headers, body, and attachments.
  • Manage Gmail labels (create, rename, delete, apply, remove).
  • Batch apply/remove labels and move multiple emails.
  • Send new emails and forward existing ones with attachments.
  • Count emails received per day within a date range.

Use cases of Gmail MCP Server

  • Automate email triage and folder organization via an AI assistant.
  • Perform bulk label operations on messages from specific queries.
  • Integrate email sending/forwarding into automated workflows.
  • Retrieve and process email content programmatically without a web browser.
  • Schedule daily email count summaries for reporting or monitoring.

FAQ from Gmail MCP Server

What are the runtime dependencies?

The server requires Python 3.x, the uv package manager, and IMAP/SMTP libraries installed via uv sync. No additional runtime is needed beyond standard Python.

How do I authenticate with Gmail?

Set GMAIL_EMAIL and GMAIL_PASSWORD in a .env file. If 2‑Factor Authentication is enabled, you must generate and use a Gmail App Password. Standard passwords will not work.

What transport does the server use?

The server communicates with MCP clients via standard input/output (stdio). It runs as a subprocess that reads JSON‑RPC requests from stdin and writes responses to stdout.

Can I use this with any MCP client?

Yes, the server is designed to work with any client that supports the Model Context Protocol, such as Cline or other compatible tools. Configuration is done per‑client in a JSON settings file.

Where does my email data reside?

All email data stays within your Gmail account. The server communicates directly with Gmail’s IMAP and SMTP servers; no data is cached or stored outside your account.

Comments

More Communication MCP servers