Cover image
MCP-Server --- gmail-plugin-for-claude-desktop
Public

MCP-Server --- gmail-plugin-for-claude-desktop

Try Now
2025-03-23

Claude Desktop中本地计算机的MCP服务器

3 years

Works with Finder

1

Github Watches

1

Github Forks

0

Github Stars

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.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Lists Tailwind CSS classes in monospaced font

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

    Reviews

    4 (1)
    Avatar
    user_PRcafrPh
    2025-04-15

    I've been using the Onyx MCP Server by lupuletic for a few months now, and it has significantly exceeded my expectations. The performance is top-notch, and the user interface is incredibly intuitive. Whether you are a novice or a seasoned professional, this MCP server is perfect for managing and optimizing your applications. Highly recommended!