Enhanced Gmail MCP Server

SSE

by theposch

20 492 downloads Not rated yet

About

An MCP server for Gmail, allowing AI assistants to manage emails through natural language.

Details

Transport
SSE

Explore

- Send, read, trash, and mark emails as read/unread
- Create, list, and edit draft emails
- List, create, apply/remove, rename, and delete labels
- Create folders, move emails between folders, list folders
- Search emails with Gmail’s advanced query syntax
- Archive, batch archive, list, and restore emails

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Enhanced Gmail MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Python 3.8+
- Google Cloud project with Gmail API enabled
- OAuth 2.0 credentials

python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate

pip install -e .


1. Create a new Google Cloud project
2. Enable the Gmail API
3. Configure the OAuth consent screen:
- Select "External" user type
- Add your email as a test user
- Add the scope: https://www.googleapis.com/auth/gmail/modify
4. Create OAuth 2.0 credentials:
- Choose "Desktop app" as the application type
- Download the JSON credentials file

Add the following to your Claude Desktop configuration file (typically at ~/Library/Application Support/Claude/claude_desktop_config.json):

json
{
"mcpServers": {
"gmail": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/gmail-mcp",
"run",
"gmail",
"--creds-file-path",
"/absolute/path/to/credentials.json",
"--token-path",
"/absolute/path/to/tokens.json"
]
}
}
}
```

gmail_list_messages

List messages in the mailbox. Supports Gmail search syntax for filtering (e.g., from:, to:, subject:, is:unread, has:attachment).

gmail_get_message

Get a specific message by ID. Returns headers, body, labels, and metadata. Use format=full for parsed body or format=raw for RFC 2822.

gmail_send_message

Send an email message. Supports plain text and HTML body, CC, BCC, and replying to threads.

gmail_delete_message

Permanently delete a message. This action is irreversible — use gmail_trash_message for safe deletion.

gmail_trash_message

Move a message to the trash. Can be undone with gmail_untrash_message.

gmail_untrash_message

Remove a message from the trash, restoring it to its original location.

gmail_modify_message

Add or remove labels on a message. Use this to mark as read/unread, star/unstar, or apply custom labels.

gmail_batch_delete

Permanently delete multiple messages at once. Maximum 1000 IDs per request. Irreversible.

gmail_batch_modify

Add or remove labels on multiple messages at once. Maximum 1000 IDs per request.

gmail_get_attachment

Get attachment data for a message. Returns base64url-encoded data. Find attachment IDs in the message payload parts.

gmail_list_drafts

List all drafts in the mailbox.

gmail_get_draft

Get a specific draft by ID, including the draft message content.

gmail_create_draft

Create a new draft email. The draft can be sent later with gmail_send_draft.

gmail_update_draft

Update an existing draft with new content. Replaces the entire draft message.

gmail_delete_draft

Delete a draft. This permanently removes the draft.

gmail_send_draft

Send an existing draft. The draft is removed from the drafts list after sending.

gmail_list_labels

List all labels in the mailbox, including system labels (INBOX, SENT, etc.) and user-created labels.

gmail_get_label

Get details for a specific label, including message and thread counts.

gmail_create_label

Create a new user label for organizing messages.

gmail_update_label

Update a label name, visibility, or color.

gmail_delete_label

Delete a user-created label. System labels cannot be deleted. Messages with this label are not deleted.

gmail_list_threads

List email threads (conversations). Supports the same search syntax as gmail_list_messages.

gmail_get_thread

Get all messages in a thread (conversation). Returns the complete email chain.

gmail_modify_thread

Add or remove labels on all messages in a thread.

gmail_trash_thread

Move all messages in a thread to the trash.

gmail_untrash_thread

Remove all messages in a thread from the trash.

gmail_get_profile

Get the authenticated user's Gmail profile — email address, total message count, total thread count, and history ID.

gmail_update_vacation

Enable or disable vacation auto-reply (out of office) with custom response message.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "enhanced gmail mcp server": {
            "gmail-mcp": {
                "command": "python",
                "args": [
                    "-m",
                    "venv",
                    ".venv"
                ]
            }
        }
    }
}

McpServers

{
    "gmail-mcp": {
        "command": "python",
        "args": [
            "-m",
            "venv",
            ".venv"
        ]
    }
}

A powerful and feature-rich Model Context Protocol (MCP) server for Gmail integration, written in Python. This server enables AI assistants like Claude to interact with Gmail through natural language, providing comprehensive email management capabilities.

🌟 Key Features

📧 Complete Email Management

- Send emails with customizable subject, content, and recipients - Read and retrieve email content with full metadata - Move emails to trash with confirmation - Mark emails as read/unread - Open emails directly in browser

📝 Draft Management

- Create draft emails for later review - List all draft emails - Edit existing drafts

🏷️ Advanced Label Management

- List all available labels - Create custom labels - Apply/remove labels from emails - Rename existing labels - Delete unused labels - Search emails by label

📁 Folder Organization

- Create new folders (implemented as Gmail labels) - Move emails between folders - List all available folders

🔍 Powerful Search & Filtering

- Search emails using Gmail's advanced query syntax - Create, manage, and delete email filters - Filter by sender, recipient, subject, content, and more - Customize search results with flexible parameters

🗄️ Archive Management

- Archive emails (remove from inbox without deleting) - Batch archive multiple emails matching search criteria - List all archived emails - Restore archived emails to inbox

🚀 Getting Started

Prerequisites

- Python 3.8+ - Google Cloud project with Gmail API enabled - OAuth 2.0 credentials

Installation

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.

Videos about Enhanced Gmail MCP Server

Relevant YouTube tutorials, setups, and demos