loading…
Search for a command to run...
loading…
A multi-service email platform for MCP-compatible clients that supports standard email providers, transactional APIs, and local testing environments. It enables
A multi-service email platform for MCP-compatible clients that supports standard email providers, transactional APIs, and local testing environments. It enables users to send and receive emails, monitor service health, and integrate with messaging webhooks like Slack and Discord through natural language commands.
FastMCP Version Ruff Linted with Biome Built with Just
Multi-service email platform for MCP-compatible clients.
Version 0.3.1 FastMCP 3.1.0+; mailing list tools; MCP sampling + prompts + skills (optional)
See CHANGELOG.md for version history.
mailing_lists_catalog, mailing_list_latest): named folders/filters (e.g. newsletters) via EMAIL_MCP_MAILING_LISTS JSONThis minimail-mcp implements current MCP server standards:
manifest.json with tool definitionsglama.json configuration for Glama MCP client discoveryRun immediately via uvx:
uvx email-mcp
Add to your claude_desktop_config.json:
"mcpServers": {
"email-mcp": {
"command": "uv",
"args": ["--directory", "D:/Dev/repos/email-mcp", "run", "email-mcp"]
}
}
Run immediately via uvx:
uvx email-mcp
Add to your claude_desktop_config.json:
"mcpServers": {
"email-mcp": {
"command": "uv",
"args": ["--directory", "D:/Dev/repos/email-mcp", "run", "email-mcp"]
}
}
minimail-mcp.mcpb package (when built)The server is automatically discoverable by Glama.ai's GitHub scraping system through the glama.json configuration.
The minimail-mcp supports Gmail SMTP with App Password authentication:
{
"SenderEmail": "[email protected]",
"SenderName": "Your Name",
"SmtpServer": "smtp.gmail.com",
"SmtpPort": 587,
"SmtpUsername": "[email protected]",
"SmtpPassword": "your-gmail-app-password"
}
configure_service() or environment variablesThe minimail-mcp supports ProtonMail with different setup requirements based on your account type:
Free ProtonMail accounts require the ProtonMail Bridge application:
{
"SenderEmail": "[email protected]",
"SenderName": "Your Name",
"SmtpServer": "127.0.0.1",
"SmtpPort": 1025,
"SmtpUsername": "your-username",
"SmtpPassword": "your-protonmail-password",
"ImapServer": "127.0.0.1",
"ImapPort": 1143,
"ImapUsername": "your-username",
"ImapPassword": "your-protonmail-password"
}
export SMTP_SERVER="127.0.0.1"
export SMTP_PORT="1025"
export SMTP_USER="your-username"
export SMTP_PASSWORD="your-protonmail-password"
export IMAP_SERVER="127.0.0.1"
export IMAP_PORT="1143"
export IMAP_USER="your-username"
export IMAP_PASSWORD="your-protonmail-password"
Paid ProtonMail accounts support direct SMTP/IMAP access:
{
"SenderEmail": "[email protected]",
"SenderName": "Your Name",
"SmtpServer": "mail.protonmail.com",
"SmtpPort": 587,
"SmtpUsername": "[email protected]",
"SmtpPassword": "your-protonmail-password",
"ImapServer": "mail.protonmail.com",
"ImapPort": 993,
"ImapUsername": "[email protected]",
"ImapPassword": "your-protonmail-password"
}
export SMTP_SERVER="mail.protonmail.com"
export SMTP_PORT="587"
export SMTP_USER="[email protected]"
export SMTP_PASSWORD="your-protonmail-password"
export IMAP_SERVER="mail.protonmail.com"
export IMAP_PORT="993"
export IMAP_USER="[email protected]"
export IMAP_PASSWORD="your-protonmail-password"
configure_service() or environment variablesSet environment variables for standard email providers:
export SMTP_SERVER="smtp.gmail.com"
export SMTP_PORT="587"
export SMTP_USER="[email protected]"
export SMTP_PASSWORD="your-app-password"
export IMAP_SERVER="imap.gmail.com"
export IMAP_USER="[email protected]"
export IMAP_PASSWORD="your-app-password"
Configure transactional email APIs:
# SendGrid
export SENDGRID_API_KEY="your-sendgrid-api-key"
export SENDGRID_FROM_EMAIL="[email protected]"
# Mailgun
export MAILGUN_API_KEY="your-mailgun-api-key"
export MAILGUN_DOMAIN="yourdomain.com"
export MAILGUN_FROM_EMAIL="[email protected]"
# Resend
export RESEND_API_KEY="your-resend-api-key"
export RESEND_FROM_EMAIL="[email protected]"
Enable local email testing:
# MailHog
export MAILHOG_ENABLED="true"
export MAILHOG_SMTP_HOST="localhost"
export MAILHOG_SMTP_PORT="1025"
export MAILHOG_HTTP_URL="http://localhost:8025"
Configure chat/webhook integrations:
# Slack
export SLACK_WEBHOOK_URL="https://example.com/docs/slack-incoming-webhook"
Point each subscription at an IMAP folder (recommended: Gmail filter label folder name) or use optional from_contains / subject_contains to post-filter after fetch.
Env: EMAIL_MCP_MAILING_LISTS JSON array, or EMAIL_MCP_MAILING_LISTS_FILE path to the same JSON.
[
{
"id": "alphasignal",
"service": "default",
"folder": "INBOX",
"limit": 5,
"unread_only": true,
"from_contains": null,
"subject_contains": null
}
]
Tools: mailing_lists_catalog() then mailing_list_latest(list_id="alphasignal"). For one-off filters, use check_inbox(folder="...", from_contains="...", subject_contains="...").
Add to your mcp.json:
{
"mcpServers": {
"minimail-mcp": {
"command": "python",
"args": ["-m", "email_mcp.server"],
"env": {
"PYTHONPATH": "D:/Dev/repos/minimail-mcp/src"
}
}
}
}
Send a basic email:
"Send an email to [email protected] with subject 'Hello World' and body 'This is a test message'"
Send HTML email via SendGrid:
"Send a welcome email to [email protected] using SendGrid. Subject: 'Welcome to Our Service'. Include HTML content with a welcome header and thank you message."
Send notification to Slack:
"Send an alert message to the #dev-alerts Slack channel about high CPU usage detected on production server."
Check unread emails:
"Check my inbox and show me the last 10 unread emails."
Test email service:
"Is my Gmail service configured correctly? Test the connection."
Configure new service:
"Add SendGrid as a new email service with my API key. From email should be [email protected]."
List available services:
"What email services do I have configured?"
## API Reference
### Tools
| Tool | Description | Services Supported |
|------|-------------|-------------------|
| `send_email` | Send emails via any service | All services |
| `check_inbox` | Check inbox via IMAP/API | SMTP, Local services |
| `email_status` | Test service connectivity | All services |
| `configure_service` | Add services dynamically | Runtime configuration |
| `list_services` | List configured services | Service management |
| `email_help` | Get help and documentation | Documentation |
### Service Types
| Type | Description | Examples | Inbox Support |
|------|-------------|----------|----------------|
| `smtp` | Standard SMTP/IMAP | Gmail, Outlook, Yahoo | |
| `api` | Transactional APIs | SendGrid, Mailgun, Resend | |
| `local` | Testing services | MailHog, Mailpit | |
| `webhook` | Chat integrations | Slack, Discord | |
## Architecture
- Multi-service email support (SMTP/IMAP, transactional APIs, local testing, webhooks)
- Dynamic service configuration without restart
- Backward compatible with existing SMTP/IMAP configurations
- Async operations for non-blocking email handling
- Extensible design for adding new service types
## Features
- Support for multiple email service types (SMTP, API, local testing, webhooks)
- Dynamic service configuration at runtime
- Async operations with connection pooling
- Email header decoding and error handling
- Service health monitoring
## Development
From a clone of the repo (fork URL if you use a fork):
```powershell
git clone https://github.com/sandraschi/email-mcp.git
Set-Location email-mcp
# Install (uv)
uv sync --extra test --extra dev
# Lint / test / run MCP (see justfile)
uv run ruff check src tests
uv run --extra test pytest tests
# Sync packaged tree: src/email_mcp mcp-server/src/email_mcp (server, mailing_lists, skills)
uv run python copy_server.py
With just: just sync, just check, just copy-mcp, just run.
MCP extras (optional): suggest_email_subject and email_agentic_assist use sampling when the host supports it; prompts (email_compose_request, email_help_request) and skills/ (skill://email-mcp/...) are optional core SMTP/IMAP works without them.
When ready to publish to PyPI:
PYPI_API_TOKEN secret to repository settingsfalse to proper tag conditiongit tag v0.2.1 && git push origin v0.2.1This project adheres to SOTA 14.1 industrial standards for high-fidelity agentic orchestration:
print statements in core handlers (T201).noConsoleLog enforcement.stdout/stderr isolation to ensure crash-resistant JSON-RPC communication.just lint, just fix, just dev).bandit and safety.MIT
This MCP server includes a free, premium web interface for monitoring and control. By default, the web dashboard runs on port 10812. (Assigned ports: 10812 (Web dashboard frontend), 10813 (Web dashboard backend))
To start the webapp:
webapp directory.start.bat (Windows) or .\start.ps1 (PowerShell). The script starts uvicorn on 10813 first, waits until that port accepts TCP (cold uv run can take tens of seconds), then starts Vite on 10812 — so the /api proxy does not fail with connection refused during startup.http://localhost:10812 in your browser. If the backend window shows a traceback, fix that before expecting API routes to work.Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"minimail-mcp-server": {
"command": "npx",
"args": []
}
}
}