Gmail Integration
STDIOA powerful and flexible Gmail integration server for reading, sending, and managing emails programmatically.
A powerful and flexible Gmail integration server for reading, sending, and managing emails programmatically.
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 <your-repository-url> 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 = '[email protected]' # 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="[email protected]", to="[email protected]", subject="Test Subject", body="Email body content", attachment_paths=["path/to/attachment"] )
await search_email_tool( email_identifier="[email protected]", query="from:[email protected]", max_results=30, include_conversations=True )
await read_latest_emails( email_identifier="[email protected]", max_results=5, download_attachments=False )
await download_email_attachments( email_identifier="[email protected]", 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.