# Gmail

> Gmail is an MCP server for communication. Gmail integration with OAuth authentication, message search, batch operations, and Sheets export. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Repository:** https://github.com/mcp-z/mcp-gmail
- **MCP Registry name:** io.github.mcp-z/mcp-gmail
- **Categories:** communication
- **Listing updated:** 2026-11-13

## About

Gmail integration with OAuth authentication, message search, batch operations, and Sheets export

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-gmail --env GOOGLE_CLIENT_ID='<GOOGLE_CLIENT_ID>' --env GOOGLE_CLIENT_SECRET='<GOOGLE_CLIENT_SECRET>' -- npx -y @mcp-z/mcp-gmail
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-gmail": {
      "command": "npx",
      "args": [
        "-y",
        "@mcp-z/mcp-gmail"
      ],
      "env": {
        "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
        "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-gmail": {
      "command": "npx",
      "args": [
        "-y",
        "@mcp-z/mcp-gmail"
      ],
      "env": {
        "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
        "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-gmail": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mcp-z/mcp-gmail"
      ],
      "env": {
        "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
        "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-gmail": {
      "command": "npx",
      "args": [
        "-y",
        "@mcp-z/mcp-gmail"
      ],
      "env": {
        "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
        "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-gmail": {
      "command": "npx",
      "args": [
        "-y",
        "@mcp-z/mcp-gmail"
      ],
      "env": {
        "GOOGLE_CLIENT_ID": "<GOOGLE_CLIENT_ID>",
        "GOOGLE_CLIENT_SECRET": "<GOOGLE_CLIENT_SECRET>"
      }
    }
  }
}
```

## FAQ

### How do I add Gmail to Claude Code?

Run this command in your terminal: claude mcp add mcp-gmail --env GOOGLE_CLIENT_ID='<GOOGLE_CLIENT_ID>' --env GOOGLE_CLIENT_SECRET='<GOOGLE_CLIENT_SECRET>' -- npx -y @mcp-z/mcp-gmail

### What are the best alternatives to Gmail?

The closest alternatives to Gmail are BoardAgent, Callout, nicemails, SOMMON Office and PostBaton.

## Alternatives

- [BoardAgent](https://ai-powered.com/mcp/boardagent): BoardAgent is a free MCP server for community directories.
- [Callout](https://ai-powered.com/mcp/callout): Callout is a freemium MCP server for communication.
- [nicemails](https://ai-powered.com/mcp/nicemails): nicemails is a freemium MCP server for communication.
- [SOMMON Office](https://ai-powered.com/mcp/sommon-office): SOMMON Office is a paid MCP server for communication.
- [PostBaton](https://ai-powered.com/mcp/postbaton): PostBaton is a freemium MCP server for marketing and seo.
- [MeetBetr](https://ai-powered.com/mcp/meetbetr): MeetBetr is a free MCP server for productivity.
- [Host Tools](https://ai-powered.com/mcp/host-tools): Host Tools is an MCP server for home services.
- [iMessage MCP](https://ai-powered.com/mcp/imessage-mcp): iMessage MCP is an open-source MCP server for communication.

---
Source: https://ai-powered.com/mcp/gmail-4
