Skip to main content

MCP for GMail

Project description

MCP Gmail Service

A Gmail service implementation using MCP (Model Control Protocol) that provides functionality for sending, receiving, and managing emails through Gmail's API.

Features

  • Email sending and receiving
  • Message listing with search capabilities
  • Reply to existing messages
  • Today's message retrieval
  • Multiple authentication methods support

Installation

pip install mcp-gmail

Usage

from mcp_gmail import FastMCP

# Initialize the Gmail service
gmail_service = FastMCP("GMail")

# List unread messages
messages = gmail_service.list_message(query='is:unread', max_results=10)

# Send an email
gmail_service.send_message(
    to='recipient@example.com',
    subject='Test Email',
    message_text='Hello, this is a test email'
)

# Get today's messages
todays_messages = gmail_service.get_todays_messages(max_results=20)

# Reply to a message
gmail_service.reply_to_message(
    message_id='message_id_here',
    reply_text='Thank you for your email'
)

Authentication

The package supports multiple authentication methods:

  1. Service Account (via GOOGLE_APPLICATION_CREDENTIALS or GOOGLE_CREDENTIALS_CONFIG)
  2. OAuth 2.0 (via credentials.json and token.json)
  3. Application Default Credentials (ADC)

Requirements

  • Python 3.10+
  • google-auth
  • google-auth-oauthlib
  • google-api-python-client
  • mcp-server

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_google_email-0.1.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_google_email-0.1.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file mcp_google_email-0.1.1.tar.gz.

File metadata

  • Download URL: mcp_google_email-0.1.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.7

File hashes

Hashes for mcp_google_email-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7cd045735971e59dd358fbaf93bc27ba2f6b1d64e029f0407e45891bf1684fce
MD5 11d38be024af76982b69c4d60a97fce5
BLAKE2b-256 66f9453a32f29c0bc3cbcab31012c8a65e0b0d7a9d9eb04bfd6042c1d5a95a71

See more details on using hashes here.

File details

Details for the file mcp_google_email-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_google_email-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a614167320555466510c7480cb348956c00907c467992e4b7f9ac6ed54985321
MD5 42959a4ab53af72f15e68921fe240dad
BLAKE2b-256 172a430387013dfbbc03222abb1a1773f9787f9a0a36d649786acbeec445b719

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page