mcpField
G
Gmail Plugin MCP Server

Gmail Plugin MCP Server

Local
github.com/sanchisingh01Developer Tools1Updated 79w ago

About Gmail Plugin MCP Server

Gmail Plugin MCP Server exposes Gmail email management to MCP clients, including sending, reading, and organizing messages with OAuth2 authentication. It also provides prompts for managing email and drafting or editing messages.

Key features

  1. 01Send and receive email
  2. 02Read unread messages and email content
  3. 03Move messages to trash
  4. 04Mark messages as read
  5. 05OAuth2 authentication
  6. 06Prompts for email management and drafting

Use cases

  1. 01Managing Gmail through an MCP client
  2. 02Reviewing unread messages and marking them read
  3. 03Drafting or editing email content

MCP support

The MCP server exposes Gmail tools for sending, reading, trashing, and marking messages as read, along with prompts for email management.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

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 NameDescriptionRequired Arguments
send-emailSend an emailrecipient_id, subject, message
get-unread-emailsRetrieve unread emailsNone
read-emailRead email contentemail_id
trash-emailMove email to trashemail_id
mark-email-as-readMark email as reademail_id
open-emailOpen email in browseremail_id
Available Prompts
Prompt NameDescriptionArguments
manage-emailAct as email administratorNone
draft-emailDraft a new emailcontent, recipient, recipient_email
edit-draftEdit existing email draftchanges, 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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.