Tools for common Gmail operations, such as sending emails.
This MCP (Model Context Protocol) server provides tools for common operations with gmail.
send_mail
: Send new emailscredentials.json
in this project root. This has the Client ID, Client Secret, etc.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:
port
: 4321
to receive tokens
post Google OAuthtoken.json
with refresh_token
along with client_id
, and client_secret
.refresh_token
on console.Create .env
copy example.env .env
Setup the corresponding value using what you received in the previous step.
Use MCP Inspector to test it in the development mode.
mcp dev server.py
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"
}
}
}
}
A server for interacting with LinkedIn, including authentication and posting capabilities.
An open-source messaging server for client-to-client communication using MCP HTTP Streamable messaging.
Summarize chat messages from a local database file.
Connect to any function, any language, across network boundaries using AgentRPC.
Connects AI agents to the Feishu/Lark platform via its OpenAPI to automate tasks like document processing, conversation management, and calendar scheduling.
Query live Gmail data using LLMs via CData's read-only MCP server.
Interact with a Twist workspace using its REST API.
A headless server to get and send emails via the Gmail API, requiring Google API credentials at runtime.
An open-source messaging server for client-to-client communication using MCP HTTP streaming, configurable via an external JSON file.
Provides AI assistants with comprehensive access to Cisco Webex messaging capabilities.