- Home
- MCP servers
- python
0
GitHub Stars
python
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You have an Email MCP Server that connects Gmail with Claude Desktop to fetch unread messages, draft AI-powered replies, and manage sending and saving drafts directly in Gmail. This server makes it easy to interact with your inbox using natural language, while keeping threading and tone control consistent with your style guides.
How to use
Interact with your Gmail from Claude Desktop using natural language. You can request unread emails, generate draft replies with a chosen tone, apply a company style guide, and save or send drafts directly from your inbox. Common workflows include: asking for unread emails, drafting professional or friendly replies, applying a style guide from a URL, and saving or sending drafts to Gmail.
Practical usage patterns you can try include:
How to install
Prerequisites you need before installing the server include Python 3.8 or newer and a Gmail account. You also require a Google Cloud Project with Gmail API enabled, a Google OAuth 2.0 setup, an Anthropic API key, and Claude Desktop installed.
Install and set up the server with these steps:
cd email-mcp-server
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
`
Additional setup and configuration
Authenticate with Gmail to grant the server access to your inbox and save tokens locally for re-authentication.
Run the authentication flow:
source venv/bin/activate
python gmail_auth.py
Configure Claude Desktop to use the MCP
Add the MCP configuration to Claude Desktop so it can start the email server as a subprocess and pass the required environment variable for the Anthropic API.
{
"mcpServers": {
"email": {
"command": "/absolute/path/to/email-mcp-server/venv/bin/python",
"args": ["/absolute/path/to/email-mcp-server/email_server.py"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-api03-..."
}
}
}
}
Starting the server locally
To run the server for testing, start from the project root and activate the virtual environment, then execute the server script.
cd email-mcp-server
source venv/bin/activate
python email_server.py
Available tools
get_unread_emails
Fetches unread emails from Gmail. Optional parameter: max_emails (default: 10)
generate_draft_reply
Generates AI-powered email replies. Parameters include email_from, email_subject, email_body, email_date, optional tone, additional_context, and style_guide_url. Supports external style guides via a URL and caches style guides for 1 hour.
save_draft
Saves draft emails to Gmail. Parameters: to, subject, body, optional in_reply_to for threading.
send_email
Sends emails immediately. Parameters: to, subject, body.