A resilient MCP server built with fastMCP for sending emails through Gmail's SMTP server using AI agents
Project description
Gmail MCP Server
A resilient MCP (Model Context Protocol) server built with fastMCP for sending emails through Gmail's SMTP server using AI agents.
Features
- Send emails via Gmail SMTP
- Fetch recent emails from Gmail folders
- Handle email attachments
- Health check endpoint for deployment monitoring
Deployment on Smithery.ai
This server is configured for deployment on Smithery.ai using Streamable HTTP transport.
Configuration
The server requires the following configuration parameters:
smtp_username: Your Gmail email addresssmtp_password: Your Gmail app password (not your regular password)
Health Check
The server provides a health check endpoint at /health for Smithery deployment monitoring.
CLAUDE CONFIG EXAMPLE
{
"mcpServers": {
"terminal_server": {
"command": "/Users/maitreyamishra/.local/bin/uv",
"args": [
"--directory", "Path to your mcp server file",
"run",
"terminal_server.py"
]
},
"web3_server": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:3000/mcp"
]
},
"gmail_mcp": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8989/mcp"
]
}
}
}
Port
The server runs on port 5000 and binds to all interfaces (0.0.0.0) for container deployment.
Installation
Install the package from PyPI:
pip install rickjang-gmail-mcp-server
Quick Start
-
Set up your Gmail credentials as environment variables:
export SMTP_USERNAME="your-email@gmail.com" export SMTP_PASSWORD="your-app-password"
-
Run the server:
rickjang-gmail-mcp-server
Local Development
-
Clone the repository:
git clone https://github.com/rickjang/Gmail-mcp-server.git cd Gmail-mcp-server
-
Install in development mode:
pip install -e .
-
Set environment variables and run:
export SMTP_USERNAME="your-email@gmail.com" export SMTP_PASSWORD="your-app-password" rickjang-gmail-mcp-server
Docker
Build and run with Docker:
docker build -t gmail-mcp .
docker run -p 5000:5000 -e SMTP_USERNAME=your-email -e SMTP_PASSWORD=your-password gmail-mcp
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rickjang_gmail_mcp_server-1.0.0.tar.gz.
File metadata
- Download URL: rickjang_gmail_mcp_server-1.0.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
021b9d57d3fc627f1fe96a97d5165a38a656ca46f85329877960139516864806
|
|
| MD5 |
b3a653fc2af55a702465c8da6b423e90
|
|
| BLAKE2b-256 |
7798bc5fde1d860ac15b579d50e90c4e959a7a79ab48b862cdde31a109dfd91e
|
File details
Details for the file rickjang_gmail_mcp_server-1.0.0-py3-none-any.whl.
File metadata
- Download URL: rickjang_gmail_mcp_server-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03107f2cdc5d7f2ab150f197228a0daac58e52e24b9fd06f291d13c6c8898ce1
|
|
| MD5 |
58fd57df807e4c0ac17c5e7634a37687
|
|
| BLAKE2b-256 |
ebd71c6a1249c92d7294c0a43a46bff1a9be07bebcbe25db6553e1516a20968a
|