Gmail MCP Server

Read, search, and send email from Claude Desktop via the Gmail API

Community google messaging community

The Gmail MCP server gives Claude and MCP-compatible agents access to your Google inbox. Claude can search for emails using Gmail query syntax, read full message threads, draft and send replies, and manage labels — turning your AI assistant into an email co-pilot.

Prerequisites

Installation & Configuration

Add this block to your claude_desktop_config.json:

{
  "mcpServers": {
    "gmail": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-gmail"],
      "env": {
        "GMAIL_CREDENTIALS_PATH": "/path/to/your/credentials.json",
        "GMAIL_TOKEN_PATH": "/path/to/your/token.json"
      }
    }
  }
}

Config file location:

Available Tools (5)

Use Cases

Tips & Gotchas

Gotcha: Google requires OAuth consent screen verification for apps with sensitive scopes. While in development/testing mode you can add yourself as a test user and skip the full review.
Gotcha: The token.json file contains a refresh token — keep it out of version control. Add it to your .gitignore.
Tip: Use the gmail.readonly scope first to test without send permissions, then upgrade to gmail.modify when ready. You'll need to delete token.json and re-authenticate after changing scopes.

Source & Documentation

GitHub Repository: https://github.com/modelcontextprotocol/servers/tree/main/src/gmail

Gmail API Setup: Google Cloud Console — Gmail API

Protocol: Model Context Protocol (MCP) — modelcontextprotocol.io

MCP Setup Pack — $15
20 ready-to-paste server configs + installer + doctor script
Get the Pack →
← Back to MCP Server Directory