Gmail
Tools for common Gmail operations, such as sending emails.
Gmail MCP Server
This MCP (Model Context Protocol) server provides tools for common operations with gmail.
Features
send_mail: Send new emails
Prerequisites
- Python 3.12+
- uv - Fast Python package installer and resolver
- Google Cloud Console Setup
- Go to: Google Cloud Console
- Create a new project for this MCP Server
- Enable Gmail API
- Go to: APIs and services > Library
- Search: Gmail API
- Click on: Gmail API tile in the results
- Click on: Enable
- Setup OAuth
- Go to: APIs and services > Credentials
- Click on": Create Credentials > OAuth client ID
- Choose Application Type: Web application
- Add: Authorised redirect URIs: http://localhost:4321/
- Create client
- Download the JSON and save it to
credentials.jsonin this project root. This has the Client ID, Client Secret, etc.
Installation
-
Clone this repository:
git clone https://github.com/heuristech/gmail-mcp-server.git cd gmail-mcp-server -
Create a virtual environment and install the package in development mode:
# Create a virtual environment uv venv # Activate the virtual environment # On macOS/Linux: source .venv/bin/activate # On Windows: .venv\Scripts\activate # Install dependencies uv sync
Get Refresh Token
python get_refresh_token.py
This will:
- Start a server on
port:4321to receivetokenspost Google OAuth - Open your browser for Google OAuth
- On succeeful authentication it will save
token.jsonwithrefresh_tokenalong withclient_id, andclient_secret. - It will also display the
refresh_tokenon console.
Create .env
copy example.env .env
Setup the corresponding value using what you received in the previous step.
Inspect
Use MCP Inspector to test it in the development mode.
mcp dev server.py
Claude Desktop Integration
Once your server is ready, install it in Claude Desktop
mcp install server.py --with google-auth --with google-auth-oauthlib --with google-auth-httplib2 --with google-api-python-client -f .env
MCP server configuration:
{
"mcpServers": {
"gmail-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/:your.path.to/gmail-mcp-server/server.py",
"run",
"server.py"
],
"env": {
"CLIENT_ID": "google.auth.app.client.id",
"CLIENT_SECRET": "google.auth.app.client.secret",
"REFRESH_TOKEN": "google.auth.app.refresh.token"
}
}
}
}
เซิร์ฟเวอร์ที่เกี่ยวข้อง
Twilio
Interact with Twilio APIs to send messages, manage phone numbers, configure your account, and more.
SendGrid MCP Server by CData
A read-only MCP server by CData that enables LLMs to query live SendGrid data. Requires the external CData JDBC Driver for SendGrid.
MCP Notification Server
Sends periodic notifications every 10 seconds.
Africa's Talking Airtime MCP
Interact with Africa's Talking airtime service and store transaction data in a local SQLite database.
RabbitMQ MCP Server
Interact with queues and topics on a RabbitMQ instance.
any-chat-completions-mcp
Chat with any other OpenAI SDK Compatible Chat Completions API, like Perplexity, Groq, xAI and more
Damien Email Wrestler
An AI-powered email intelligence platform that integrates with Gmail and OpenAI. It can be run as a CLI tool or deployed on AWS Lambda for enhanced capabilities.
WhatsApp MCP Server
An MCP server for integrating WhatsApp with Claude Desktop, enabling interaction with your WhatsApp messages.
MCP Chat Desktop App
A cross-platform desktop app for interacting with various Large Language Models (LLMs) through the Model Context Protocol (MCP).
MisarMail
Full email marketing platform for AI assistants — 32 MCP tools for campaigns, contacts, automations, A/B testing, AI content, multi-channel messaging, deliverability monitoring, and analytics.