Navigation
Gmail Plugin MCP Server: Effortless Setup & Seamless Sync - MCP Implementation

Gmail Plugin MCP Server: Effortless Setup & Seamless Sync

Power your Gmail plugins locally with Claude Desktop's MCP server—effortless setup, seamless sync, and full control. Works like a champ." )

Developer Tools
4.0(28 reviews)
42 saves
19 comments

This tool saved users approximately 14107 hours last month!

About Gmail Plugin MCP Server

What is Gmail Plugin MCP Server: Effortless Setup & Seamless Sync?

This server acts as a bridge between Gmail and MCP clients like Claude Desktop, enabling direct email management through a unified interface. Built with Python 3.12+, it leverages OAuth2 security to handle core Gmail operations such as sending, reading, and organizing messages. The design prioritizes simplicity, allowing developers and end-users to integrate Gmail functionality without complex configurations.

How to Use Gmail Plugin MCP Server: Effortless Setup & Seamless Sync?

  1. Install Dependencies
    Choose your method: editable mode, requirements.txt, or the recommended uv sync command for dependency management.
  2. Configure Gmail API
    Set up credentials via Google Cloud Console, enabling the Gmail API and creating OAuth 2.0 credentials for your project.
  3. Deploy the Server
    Use MCP client configuration blocks to specify server paths and commands. Published servers can be activated directly via uvx.

Gmail Plugin MCP Server Features

Key Features of Gmail Plugin MCP Server: Effortless Setup & Seamless Sync?

  • End-to-End Email Control: Full lifecycle management from drafting to archiving with tools like send-email and trash-email
  • Security First: OAuth2 authentication ensures encrypted data transmission and user consent management
  • Developer-Friendly: Built with uvx for seamless dependency handling and hot-reload debugging via MCP Inspector
  • Actionable Prompts: Pre-defined workflows like manage-email simplify common administrative tasks

Use Cases of Gmail Plugin MCP Server: Effortless Setup & Seamless Sync?

Power users and developers benefit in scenarios like:

Automation Workflows

Automate bulk email processing or ticket response systems using the get-unread-emails API endpoint

Desktop Integrations

Embed Gmail functionality into custom apps or dashboards through the MCP protocol

Development Testing

Create sandbox environments for API testing with test user configurations

Gmail Plugin MCP Server FAQ

FAQ from Gmail Plugin MCP Server: Effortless Setup & Seamless Sync?

Do I need specific Python versions?
Python 3.12+ is required for async features. Compatibility warnings appear for older versions.
Can I use this with non-Google accounts?
No. Requires Google Workspace or personal Gmail account with API access enabled.
How do I resolve authentication errors?
Check OAuth scopes match gmail/modify and ensure credentials file paths are absolute
Is there a performance overhead?
Optimized API calls with caching mechanisms reduce latency. Heavy usage requires proper rate-limiting

Content

Gmail Plugin MCP Server

Python Version License

A powerful MCP server that enables Gmail integration, allowing you to manage emails directly through MCP clients. This plugin provides seamless access to Gmail's core functionality including reading, sending, and managing emails.

Reference : For a sample MCP server implementation using uvx, check out this example.

🎥 Demo

https://github.com/user-attachments/assets/df9e86cf-1f6b-4265-9c68-b3ed88103d1f

✨ Features

  • 📧 Send and receive emails
  • 📥 Read unread messages
  • 🗑️ Trash emails
  • 📱 Open emails in browser
  • 📝 Mark emails as read
  • 🔒 Secure OAuth2 authentication

🚀 Quick Start

Prerequisites

  • Python 3.12 or higher
  • Gmail API credentials
  • MCP client (like Claude Desktop)

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/gmail-plugin.git
cd gmail-plugin
  1. Install dependencies (choose one method):
# Method 1: Install in editable mode
uv pip install -e .

# Method 2: Install using requirements.txt
uv pip install -r requirements.txt

# Method 3: Install using uv sync (recommended)
uv sync --dev --all-extras
  1. Configure your Gmail API credentials:
    * Go to Google Cloud Console
    * Create a new project or select existing one
    * Enable Gmail API
    * Configure OAuth consent screen:
    • Select "External" user type (no publishing required)
    • Go to the Audiences tab : Add your email as a "Test user"
    • Add OAuth scope: https://www.googleapis.com/auth/gmail/modify
      • Create OAuth 2.0 credentials:
    • Choose "Desktop App" as application type
    • Download the JSON credentials file
      • Save the credentials file and note its absolute path (will be used for --creds-file-path)

Configuration

For Development/Unpublished Servers

Add this to your MCP client configuration:

"mcpServers": {
  "gmail-plugin": {
    "command": "uv",
    "args": [
      "--directory",
      "[absolute path to working directory]",
      "run",
      "server.py"
      "--creds-file-path",
      "[absolute-path-to-credentials-file]",
      "--token-path",
      "[absolute-path-to-access-tokens-file]"
    ]
  }
}

For Published Servers

"mcpServers": {
  "gmail-plugin": {
    "command": "uvx",
    "args": [
      "gmail-plugin"
    ]
  }
}

🛠️ Development

Building and Publishing

  1. Sync dependencies:
uv sync
  1. Build package:
uv build
  1. Publish to PyPI:
uv publish

Debugging

Use the MCP Inspector for debugging:

npx @modelcontextprotocol/inspector uv --directory C:\Users\sanch\Desktop\gmail_plugin\gmail-plugin run gmail-plugin

📚 API Reference

Available Tools

Tool Name Description Required Arguments
send-email Send an email recipient_id, subject, message
get-unread-emails Retrieve unread emails None
read-email Read email content email_id
trash-email Move email to trash email_id
mark-email-as-read Mark email as read email_id
open-email Open email in browser email_id

Available Prompts

Prompt Name Description Arguments
manage-email Act as email administrator None
draft-email Draft a new email content, recipient, recipient_email
edit-draft Edit existing email draft changes, current_draft

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Related MCP Servers & Clients