Skip to main content
ClaudeWave
A1-x-Tech avatar
A1-x-Tech

mcp-google-gmail

View on GitHub

MCP server for the Gmail API — search, read and send email, manage drafts, labels and the trash. For Claude, Cursor, Codex and other AI clients.

MCP ServersOfficial Registry0 stars0 forksTypeScriptMITUpdated today
ClaudeWave Trust Score
87/100
Trusted
Passed
  • Open-source license (MIT)
  • Actively maintained (<30d)
  • Clear description
  • Documented (README)
Last scanned: 9/21/2026
Install in Claude Code / Claude Desktop
Method: NPX · mcp-google-gmail
Claude Code CLI
claude mcp add mcp-google-gmail -- npx -y mcp-google-gmail
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "mcp-google-gmail": {
      "command": "npx",
      "args": ["-y", "mcp-google-gmail"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
Use cases

MCP Servers overview

# <img src="./assets/a1-logo.svg" alt="A1" width="40"> Gmail MCP

**English** | [Русский](./README.ru.md)

[![npm](https://img.shields.io/npm/v/mcp-google-gmail)](https://www.npmjs.com/package/mcp-google-gmail)
[![Glama](https://glama.ai/mcp/servers/A1-x-Tech/mcp-google-gmail/badges/score.svg)](https://glama.ai/mcp/servers/A1-x-Tech/mcp-google-gmail)
[![CI](https://github.com/A1-x-Tech/mcp-google-gmail/actions/workflows/ci.yml/badge.svg)](https://github.com/A1-x-Tech/mcp-google-gmail/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)

**A1 Gmail MCP** lets an AI app work with your Gmail mailbox in plain language. Search and read mail, prepare replies as drafts, send them when you are ready, keep labels tidy and use the trash instead of permanent deletion.

It uses the Gmail API with your Google account. It distinguishes a draft you can still edit from a sent email that cannot be recalled, and makes the limits of the Gmail API explicit instead of implying that every mail task is reversible.

- **24 tools.** Search and read messages and threads, send email directly or through drafts, manage the draft lifecycle, labels and the trash.
- **Connects from the conversation.** Say "connect Gmail": the server walks you through the OAuth client, catches Google's redirect on `127.0.0.1` with PKCE and keeps the tokens itself — no config files, no restart.
- **Send deliberately.** The draft → review → send path is first-class; sending is marked destructive, and the server never re-sends after an ambiguous failure — an email cannot be unsent.
- **The trash is the safety net.** Removing mail goes through the reversible trash (about 30 days); there is deliberately no permanent message delete tool.
- **Bounded reading.** Decoded bodies are truncated at an explicit limit and attachments come back as metadata, so a long newsletter cannot silently flood the conversation.
- **Minimal Google scope.** It uses `gmail.modify` only — no permanent deletion and no access to Gmail settings.

Start with a read-only question:

> Show my unread emails from the last week and tell me which ones need a reply.

[Connect the server](#quick-start) · [Explore use cases](#what-you-can-ask-it-to-do) · [Open technical documentation](#technical-documentation)

---

## See it work in a minute

> **You:** What is unread in my inbox from this week about the Acme contract?
>
> **Assistant:** Searches with Gmail query syntax and shows senders, subjects, dates and snippets. Nothing changes.
>
> **You:** Draft a reply to the latest one: we send the signed copy on Friday.
>
> **Assistant:** Creates a draft in the same thread and shows it for review. Nothing is sent.
>
> **You:** Send it.
>
> **Assistant:** Sends the draft. Sending is a separate, explicitly destructive step, so your AI app can ask for confirmation first.

## Contents

- [Quick start](#quick-start)
- [What you can ask it to do](#what-you-can-ask-it-to-do)
- [How mail changes](#how-mail-changes)
- [What can change](#what-can-change)
- [Getting access](#getting-access)
- [Configuration](#configuration)
- [Data, limits and background work](#data-limits-and-background-work)
- [Technical documentation](#technical-documentation)
- [Support](#support)

## Quick start

You need Node.js 20+ and a Google account. Credentials are not required at install time — the server connects from the conversation.

1. Add the server to your AI app.
2. Say "connect Gmail": the assistant walks you through [creating the OAuth client and approving access](#getting-access) without editing config files.
3. Ask the read-only question above.

<details open>
<summary><strong>Codex</strong></summary>

<br>

**In the app:** open **Settings → MCP servers**, select **Add server**, choose **STDIO**, enter the command `npx -y mcp-google-gmail@latest` and environment variables `GOOGLE_GMAIL_CLIENT_ID`, `GOOGLE_GMAIL_CLIENT_SECRET`, `GOOGLE_GMAIL_REFRESH_TOKEN`, then select **Save** and **Restart**.

**From the command line:**

```bash
codex mcp add google-gmail \
  -- npx -y mcp-google-gmail@latest
```

```bash
codex mcp list
```

[Codex MCP documentation](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)

</details>

<details>
<summary><strong>Claude Code</strong></summary>

<br>

```bash
claude mcp add \
  --transport stdio --scope user google-gmail \
  -- npx -y mcp-google-gmail@latest
```

```bash
claude mcp list
```

[Claude Code MCP documentation](https://code.claude.com/docs/en/mcp)

</details>

<details>
<summary><strong>Claude Desktop</strong></summary>

<br>

The current official path is **Settings → Extensions**. For a custom desktop extension, open **Advanced settings → Extension Developer → Install Extension…**, select a `.mcpb` file and follow the prompts.

This repository currently publishes an npm stdio package and does not contain a `.mcpb` bundle. For Claude Desktop builds that still support local configuration, use the following JSON stdio configuration as a fallback:

```json
{
  "mcpServers": {
    "google-gmail": {
      "command": "npx",
      "args": ["-y", "mcp-google-gmail@latest"]
    }
  }
}
```

In those builds, save it to `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS or `%APPDATA%\Claude\claude_desktop_config.json` on Windows.

[Claude Desktop MCP documentation](https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop)

</details>

<details>
<summary><strong>Cursor</strong></summary>

<br>

Add this to `~/.cursor/mcp.json` on macOS/Linux or `%USERPROFILE%\.cursor\mcp.json` on Windows:

```json
{
  "mcpServers": {
    "google-gmail": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "mcp-google-gmail@latest"]
    }
  }
}
```

[Cursor MCP documentation](https://cursor.com/docs/mcp)

</details>

<details>
<summary><strong>VS Code</strong></summary>

<br>

Run **MCP: Open User Configuration** and add:

```json
{
  "servers": {
    "google-gmail": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "mcp-google-gmail@latest"]
    }
  }
}
```

Check it with **MCP: List Servers**.

[VS Code MCP documentation](https://code.visualstudio.com/docs/agent-customization/mcp-servers)

</details>

## What you can ask it to do

### Triage the inbox

- Show unread messages from the last seven days and group them by sender.
- Find the conversation with Acme about the contract and summarize it, oldest to newest.
- Which messages have attachments waiting for me? Show subjects and file names.

### Write and send email

- Draft a reply in this thread saying the signed copy goes out on Friday.
- Show me the draft, tighten the wording, then send it.
- Send a short status email to the team, with the manager in CC.

### Keep the mailbox organized

- Create a label `Receipts/2026` and apply it to the matching messages.
- Mark this week's newsletters as read and archive them.
- Move that thread to the trash — and restore it if I change my mind.

## How mail changes

1. The safe path to sending is a **draft**: `create_draft` prepares the email, `get_draft` shows it for review, `send_draft` sends it. `send_message` skips the draft and sends immediately.
2. A sent email is externally irreversible. After a timeout or a `5xx` error the server does not re-send; search `in:sent` before trying again, because a replayed send would be a double-sent email.
3. Removing a message or thread means trashing it. `manage_trash` is reversible for about 30 days; there is deliberately no permanent-delete tool.
4. Drafts are the exception: `update_draft` replaces the whole draft (the API has no partial edit) and `delete_draft` is permanent, because drafts skip the trash.

Every call works on one mailbox — the account that granted the token. Decoded bodies are truncated at a configurable limit with explicit flags, and attachments come back as metadata only; attachment content is fetched through `raw_request` deliberately.

## What can change

| Operation | What happens | Confirmation boundary |
|---|---|---|
| Search and read messages, threads, drafts, labels, the profile | Reads mailbox data | No change |
| Create or update a draft | Prepares or replaces an unsent email | Changes the mailbox |
| Change read, starred or archived state, apply or strip labels | Changes how mail is organized | Changes the mailbox |
| Create or rename a label | Changes the label vocabulary | Changes the mailbox |
| Trash or untrash a message or thread | Moves mail to or from the trash; reversible for ~30 days | Destructive |
| Send an email or a draft | Delivers mail to real recipients; cannot be unsent | Destructive |
| Delete a draft or a label | Removes it permanently, skipping the trash | Destructive |
| Raw API request | Can call API methods without a dedicated tool | Potentially destructive |

The AI client controls confirmation prompts. The server marks reads, writes and destructive tools so the client can distinguish an inspection from a live change.

## Getting access

Google Gmail requires OAuth 2.0; an API key is not enough. There are two ways in, and the first one needs no configuration files.

### Connect from the chat (recommended)

Say "connect Gmail" and the assistant runs the flow with you:

1. `setup_instructions` prints the checklist: create or select a Google Cloud project, enable **Gmail API**, configure the consent screen and create a **Desktop app** OAuth client.
2. Download that client's JSON ("Download JSON") and give the assistant its **path** — `set_client` stores it owner-only. The secret never goes through the conversation.
3. `start_login` returns a Google consent link. Open it **on this machine** and approve; the code comes back to a one-shot listener on `127.0.0.1` (PKCE), never through the chat.
4. `finish_login` exchanges the code and saves the tokens to `~/.config/mcp-google-gmail/credentials.json` (mode 0600) and verifies them with a real Gmail API call — so an API that

What people ask about mcp-google-gmail

What is A1-x-Tech/mcp-google-gmail?

+

A1-x-Tech/mcp-google-gmail is mcp servers for the Claude AI ecosystem. MCP server for the Gmail API — search, read and send email, manage drafts, labels and the trash. For Claude, Cursor, Codex and other AI clients. It has 0 GitHub stars and its last recorded update is dated 2026-09-20.

How do I install mcp-google-gmail?

+

You can install mcp-google-gmail by cloning the repository (https://github.com/A1-x-Tech/mcp-google-gmail) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.

Is A1-x-Tech/mcp-google-gmail safe to use?

+

Our security agent has analyzed A1-x-Tech/mcp-google-gmail and assigned a Trust Score of 87/100 (tier: Trusted). See the full breakdown of passed checks and flags on this page.

Who maintains A1-x-Tech/mcp-google-gmail?

+

A1-x-Tech/mcp-google-gmail is maintained by A1-x-Tech. The last recorded GitHub activity is dated 2026-09-20, with 0 open issues.

Are there alternatives to mcp-google-gmail?

+

Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.

Deploy mcp-google-gmail to your cloud

Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.

Maintain this repo? Add a badge to your README

Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.

Featured on ClaudeWave: A1-x-Tech/mcp-google-gmail
[![Featured on ClaudeWave](https://claudewave.com/api/badge/a1-x-tech-mcp-google-gmail)](https://claudewave.com/repo/a1-x-tech-mcp-google-gmail)
<a href="https://claudewave.com/repo/a1-x-tech-mcp-google-gmail"><img src="https://claudewave.com/api/badge/a1-x-tech-mcp-google-gmail" alt="Featured on ClaudeWave: A1-x-Tech/mcp-google-gmail" width="320" height="64" /></a>

More MCP Servers

mcp-google-gmail alternatives