Enables interaction with Gmail through the Gmail API to read, send, and manage emails. Supports multiple Gmail accounts with real-time monitoring and advanced features for email search and attachment handling.
A powerful and flexible Gmail integration server built using the MCP (Message Control Protocol) framework. This server provides a robust interface to interact with Gmail APIs, offering functionality for reading, sending, and managing emails programmatically.
Before running the Gmail MCP server, ensure you have the following:
To install Gmail Integration Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @Quantum-369/Gmail-mcp-server --client claude
git clone cd gmail-mcp-server
python -m venv venv # On Windows venv\Scripts\activate # On Unix/MacOS source venv/bin/activate
pip install .
client_secret.json
and place it in the project root directorygmail_token_creator.py
:email_identifier = 'your.email@gmail.com' # Change this for each account
python gmail_token_creator.py
gmail_server.py
: Main MCP server implementationgmail_api.py
: Gmail API interaction functionsgoogle_apis.py
: Google API authentication utilitiesread_emails.py
: Email reading functionalitysearch_emails.py
: Email search functionalitysend_emails.py
: Email sending functionalitypython gmail_server.py
await send_gmail( email_identifier="your.email@gmail.com", to="recipient@example.com", subject="Test Subject", body="Email body content", attachment_paths=["path/to/attachment"] )
await search_email_tool( email_identifier="your.email@gmail.com", query="from:someone@example.com", max_results=30, include_conversations=True )
await read_latest_emails( email_identifier="your.email@gmail.com", max_results=5, download_attachments=False )
await download_email_attachments( email_identifier="your.email@gmail.com", msg_id="message_id", download_all_in_thread=False )
client_secret.json
securely and never commit it to version control.gitignore
The server includes comprehensive error handling and logging:
gmail_mcp.log
Apachelicense2.0
For issues and feature requests, please use the GitHub issue tracker.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!