home / mcp / gmail mcp server

Gmail MCP Server

MCP server that enables reading, sending, archiving, and managing Gmail messages via MCP clients.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "domdomegg-gmail-mcp": {
      "url": "http://localhost:3000/mcp",
      "headers": {
        "MCP_TRANSPORT": "http",
        "GOOGLE_CLIENT_ID": "YOUR_CLIENT_ID",
        "GOOGLE_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
      }
    }
  }
}

You run a Gmail MCP server that lets you search, read, send, archive, and manage emails through MCP clients. It acts as an OAuth-enabled proxy to Google Gmail, enabling automation and complex workflows across your apps and services.

How to use

Connect an MCP client to Gmail MCP and start using the tools to search, read, modify, send, and organize emails. Typical workflows include finding receipts, extracting tracking numbers, drafting follow-up emails, or setting vacation auto-replies. You can perform these actions by issuing MCP requests from your client, and Gmail MCP will handle the Gmail API calls behind the scenes.

Key capabilities you can leverage include listing messages and threads, reading message content, sending messages, labeling and archiving, managing drafts and attachments, and handling Gmail settings like vacation auto-replies. Start by registering the Gmail MCP server with your MCP client and then send requests using the client’s MCP interface.

How to install

Prerequisites you need before installation: a Node.js environment and a functioning MCP client setup.

Step 1: Create Google OAuth credentials for Gmail access - Go to Google Cloud Console - Create a new project (or select an existing one) - Enable the Gmail API - In APIs & Services, open OAuth consent screen and configure it - In APIs & Services, Credentials, choose Create Credentials → OAuth client ID - Select Web application - Add http://localhost:3000/callback to Authorized redirect URIs - Note your Client ID and Client Secret for later steps

Step 2: Run the server locally with the required environment values set

GOOGLE_CLIENT_ID='your-client-id' \
GOOGLE_CLIENT_SECRET='your-client-secret' \
MCP_TRANSPORT=http \
npm start

Add the Gmail MCP server to your MCP client

Once the server is running, register it with your MCP client so the client can route requests to Gmail through the MCP gateway.

claude mcp add --transport http gmail-mcp http://localhost:3000/mcp

Available tools

gmail_get_profile

Get user's email address and profile info

gmail_messages_list

Search/list messages (consider using gmail_threads_list instead)

gmail_message_get

Get the content of a single message

gmail_message_send

Send an email via Gmail API

gmail_message_modify

Add or remove labels from a message

gmail_message_archive

Archive a message (remove from inbox)

gmail_message_trash

Move a message to trash

gmail_message_untrash

Restore a message from trash

gmail_message_delete

Permanently delete a message

gmail_messages_batch_modify

Bulk label changes on multiple messages

gmail_messages_batch_delete

Bulk permanent delete of multiple messages

gmail_threads_list

Search/list threads (recommended)

gmail_thread_get

Get all messages in a thread (recommended)

gmail_thread_modify

Add or remove labels on a thread

gmail_thread_trash

Move a thread to trash

gmail_thread_untrash

Restore a thread from trash

gmail_thread_delete

Permanently delete a thread

gmail_drafts_list

List drafts

gmail_draft_get

Get a draft

gmail_draft_create

Create a draft

gmail_draft_update

Update a draft

gmail_draft_send

Send a draft

gmail_draft_delete

Delete a draft

gmail_labels_list

List all labels

gmail_label_get

Get a label

gmail_label_create

Create a label

gmail_label_update

Update a label

gmail_label_delete

Delete a label

gmail_attachment_get

Download an attachment

gmail_filters_list

List email filters

gmail_filter_get

Get a filter

gmail_filter_create

Create a filter

gmail_filter_delete

Delete a filter

gmail_vacation_get

Get vacation auto-reply settings

gmail_vacation_set

Set vacation auto-reply settings