Skip to main content

Add your description here

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.0.tar.gz (2.4 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.0-py3-none-any.whl (1.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mcp_google_email-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cecf705dc4d84fa1e33e8ccb888fb800fac5caf445f444c4a75f832d010eb40b
MD5 1612d928a391257a9924ed52a954292c
BLAKE2b-256 48ae0e2cb0300e24cb62868f91c0bb1da54299cca1edb63f831ed8ba53ab2d9f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mcp_google_email-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a34ee01035be963d04b0b1fea4794853335803812f86aeb41846a5ad44ea2a5f
MD5 fedd64f1ab75e2d77b2efc055b920552
BLAKE2b-256 c1093108f0bb324b785562ebabea63d7ad48193ad1cbbbc8090a61225d88b589

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