A lightweight MCP (Model Context Protocol) server that enables sending emails via Gmail. Built for use with Claude Code and other MCP-compatible AI tools.
- Send emails through Gmail using OAuth2 authentication
- Simple MCP tool interface with
send_email(to, subject, body) - Secure token-based auth with automatic refresh
- Create a Google Cloud project and enable the Gmail API
- Download OAuth credentials as
credentials.json - Install dependencies:
pip install google-auth google-auth-oauthlib google-api-python-client mcp- Run the auth flow:
python auth.py- Add to your Claude Code MCP config:
{
"gmail-sender": {
"type": "stdio",
"command": "python",
"args": ["path/to/server.py"]
}
}Once configured, the send_email tool is available in Claude Code:
- to: Recipient email address
- subject: Email subject line
- body: Plain-text email body
OAuth credentials and tokens are excluded via .gitignore. Never commit credentials.json or token.json.