strato-mail-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@strato-mail-mcp Show me my last 5 unread emails"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Strato Mail MCP Server v2
Volledige mail client voor Claude via IMAP + SMTP ā perfect voor Portainer hosting.
šÆ Features
ā IMAP Functionaliteit:
Alle mails lezen (onderwerp, body, HTML, headers)
Zoeken met geavanceerde IMAP filters
Folder management (switch, list)
Email flags (read/unread, starred, draft)
Attachment handling
Bulk operations
ā SMTP Functionaliteit:
Mails verzenden
CC/BCC support
HTML + plain text
ā Extra:
Mailbox statistics
Draft management
Portainer-ready Docker setup
Attachment persistence
Health checks
Related MCP server: email-mcp
š Quick Start (Docker in Portainer)
1. In Portainer: Stacks ā Add Stack
Name: strato-mail-mcp
Paste this:
version: '3.8'
services:
strato-mail-mcp:
build:
context: https://github.com/yourusername/strato-mail-mcp.git
dockerfile: Dockerfile
container_name: strato-mail-mcp
image: strato-mail-mcp:latest
restart: unless-stopped
environment:
IMAP_HOST: imap.strato.com
IMAP_PORT: 993
IMAP_USER: ${IMAP_USER}
IMAP_PASSWORD: ${IMAP_PASSWORD}
SMTP_HOST: smtp.strato.com
SMTP_PORT: 465
ATTACHMENT_DIR: /app/attachments
NODE_ENV: production
volumes:
- strato-attachments:/app/attachments
deploy:
resources:
limits:
cpus: '0.5'
memory: 256M
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
strato-attachments:
driver: local2. Set Environment Variables
In Portainer Stack UI, add before deploying:
IMAP_USER=jouw-email@example.com
IMAP_PASSWORD=jouw-strato-password3. Deploy
Click "Deploy the stack" ā Wait ~30 seconds
4. Verify
In Portainer ā Containers ā strato-mail-mcp
Should show
RunningLogs should show:
[strato-mail-mcp] ā Server started - Ready for Claude
š Integratie met Claude
Option A: Lokaal (Windows/Mac/Linux)
Ga naar Claude Settings ā Developer ā MCP Settings:
{
"mcpServers": {
"strato-mail": {
"command": "node",
"args": ["/path/to/strato-mail-mcp/server.js"],
"env": {
"IMAP_USER": "jouw-email@example.com",
"IMAP_PASSWORD": "jouw-password"
}
}
}
}Herstart Claude ā strato-mail is nu beschikbaar
Option B: Remote Docker (SSH naar Portainer host)
{
"mcpServers": {
"strato-mail": {
"command": "docker",
"args": ["exec", "-i", "strato-mail-mcp", "node", "/app/server.js"],
"env": {
"IMAP_USER": "jouw-email@example.com",
"IMAP_PASSWORD": "jouw-password"
}
}
}
}š§ Beschikbare Tools
Read & Search
get_folders()
ā List alle mail folders (INBOX, Sent, Drafts, etc.)
search_emails(query, limit, folder)
ā Search met IMAP syntax:
- ALL
- UNSEEN
- SEEN
- FROM "user@example.com"
- SUBJECT "keyword"
- SINCE 15-Mar-2024
- FLAGGED
- DRAFT
Voorbeelden: "UNSEEN FROM triple-audio", "ALL", "FLAGGED"
read_email(uid)
ā Lees volledige email (with attachments)
get_recent(count, folder)
ā Haal X recente mails (default 20)
get_mailbox_status()
ā Get folder statistieken (total, unread, recent)Send & Draft
send_email(to, subject, text/html, cc, bcc)
ā Verstuur email direct
save_draft(to, subject, text/html)
ā Opslaan als conceptManage
mark_read(uids)
ā Mark emails as read
mark_unread(uids)
ā Mark emails as unread
mark_flagged(uids)
ā Star/flag emails
unmark_flagged(uids)
ā Remove star
switch_folder(folder)
ā Switch to different folder
move_email(uids, folder)
ā Move emails to folder
delete_email(uids)
ā Delete emailsFiles
get_attachment(uid, filename)
ā Get attachment path (for Claude to access)š§ Configuration Details
Strato Settings
IMAP:
Host:
imap.strato.com(SSL/TLS)Port:
993User: je Strato email
Pass: je Strato password
SMTP:
Host:
smtp.strato.com(SSL/TLS)Port:
465User: je Strato email
Pass: je Strato password
Docker Volumes
strato-attachmentsā Attachments opgeslagen in/app/attachmentsPersisten over container restarts
Resource Limits
CPU: max
0.5coresMemory: max
256MBReserved:
0.25CPU,128MBRAM
š Troubleshooting
"IMAP connection failed"
Check in Portainer logs:
Containers ā strato-mail-mcp ā Logs
Waarschijnlijke oorzaken:
- IMAP_USER/PASSWORD incorrect
- Strato account IMAP disabled
- Network firewall port 993 blocked"SMTP auth failed"
Check:
- IMAP_PASSWORD is correct (same for SMTP at Strato)
- Strato account allows SMTP
- Port 465 not blockedAttachments not saving
Check volume is mounted:
docker inspect strato-mail-mcp | grep -A 5 Mounts
Should show: /app/attachments ā strato-attachmentsSlow searches
IMAP is inherent slow for large mailboxes.
Use more specific queries:
- "UNSEEN" instead of "ALL"
- "FROM example.com" to narrow down
- Limit parameterš Monitoring
In Portainer
Containers ā
strato-mail-mcpStats tab ā CPU/Memory usage
Logs ā Real-time activity
Docker CLI
# Follow logs
docker logs -f strato-mail-mcp
# Container stats
docker stats strato-mail-mcp
# Shell access (debug)
docker exec -it strato-mail-mcp shš Security
ā ļø Credentials Storage:
.envcontains password (NEVER commit to git!)In Portainer: credentials stored in container variables (encrypted)
In Docker: use
.envfile OR Portainer UI (don't hardcode)Recommended: Use Portainer "Secrets" for production
Access Control:
Container runs as non-root user
TLS/SSL for IMAP (993) and SMTP (465)
Local filesystem attachments only
š Advanced
Custom Folders
Strato default folders: INBOX, Sent, Drafts, Trash, Junk
If you have custom folders, use full path:
switch_folder("folder/subfolder")Email Size Limits
Strato typically allows:
Single mail: up to 50MB (with attachments)
Mailbox: depends on plan
Large attachments are downloaded to container volume automatically.
Rate Limiting
IMAP servers have implicit rate limits. If you get "too many connections":
Reduce concurrent searches
Add delays between operations
Use specific queries instead of broad searches
š API Examples (in Claude)
Search unread emails
"Search my unread emails from Triple Audio"
ā Claude calls: search_emails(query="UNSEEN FROM triple-audio")Read recent mails
"Show me my last 5 emails"
ā Claude calls: get_recent(count=5)Send email
"Send email to marco@triple-audio.nl with subject 'Themis Update'"
ā Claude calls: send_email(to="marco@...", subject="Themis Update", text="...", html="...")Manage folders
"Move all Themis emails to a folder"
ā Claude calls: search_emails(query='SUBJECT "Themis"') ā move_email(uids=[...], folder="Themis")š Stopping / Updating
In Portainer
Stacks ā
strato-mail-mcpStop: click Stop
Update: remove stack, re-deploy with new code
Logs: check health status
Docker CLI
# Stop
docker-compose down
# Restart
docker-compose up -d
# View logs
docker logs strato-mail-mcpš Support
If issues:
Check logs:
docker logs strato-mail-mcpVerify Strato credentials work in email client
Check IMAP/SMTP ports (993, 465) are accessible
Ensure
.envis correctly set
Version: 2.0.0
Status: ā
Production-ready for Portainer
Available Tools
15 toolsdelete_emailC
Delete email(s)
Inputs: uids (required).
get_attachmentB
Get attachment file path
Inputs: uid (required), filename (required).
get_foldersA
List all mail folders (INBOX, Sent, Drafts, etc.)
Inputs: no named parameters.
get_mailbox_statusB
Get current folder statistics
Inputs: no named parameters.
get_recentB
Get recent emails from specified folder
Inputs: count, folder.
mark_flaggedC
Star/flag email(s)
Inputs: uids (required).
mark_readB
Mark email(s) as read
Inputs: uids (required).
mark_unreadB
Mark email(s) as unread
Inputs: uids (required).
move_emailC
Move email(s) to folder
Inputs: uids (required), folder (required).
read_emailA
Read full email content by UID
Inputs: uid (required).
save_draftB
Save email as draft (IMAP DRAFT folder)
Inputs: to (required), subject (required), html, text.
search_emailsB
Search emails. IMAP syntax: ALL, UNSEEN, SEEN, FLAGGED, DRAFT, FROM "user@example.com", SUBJECT "word", BODY "word", SINCE 15-Mar-2024, BEFORE 20-Mar-2024
Inputs: query (required), limit, folder.
send_emailB
Send email via SMTP
Inputs: to (required), subject (required), cc, bcc, +2 more.
switch_folderC
Switch to different folder
Inputs: folder (required).
unmark_flaggedB
Remove star/flag from email(s)
Inputs: uids (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 15 tools
Each tool targets a distinct email operation: folder listing, email search, reading, sending, drafting, flag management, moving, deleting, and attachments. Even closely related tools like get_folders, switch_folder, and get_mailbox_status have clearly separate purposes.
All tool names follow a consistent verb_noun pattern using snake_case, such as get_folders, send_email, mark_read, and delete_email. There are no mixed styles or vague verbs.
15 tools is well-scoped for an email MCP server, covering the full range of common operations without redundancy. Each tool earns its place, and the count is at the upper end of the ideal range but appropriate.
The tool set covers core email workflows: send, receive, search, read, draft, flags, move, delete, attachments, and folder selection. Minor gaps include lack of folder creation/deletion and advanced search refinement, but these are not critical for typical usage.
Maintenance
Related MCP Connectors
Connect any IMAP/SMTP mailbox to Claude & ChatGPT: search, read, sort, draft. Sends only with OK.
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Bring Gmail, Outlook, iCloud Mail, Yahoo Mail, Fastmail and other IMAP mailboxes together. Search connected email, including semantic search; cached or indexed results may be incomplete or stale. Read messages and attachments, create drafts, send or reply when requested, and manage rules for new mail. Separate permissions control reading, attachments, drafts, sending and mailbox changes.
Your mailboxes in ChatGPT and Claude: Gmail, iCloud, Fastmail, any IMAP. Passwords stay yours.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables Claude to interact with email accounts via IMAP and SMTP, providing tools for searching, reading, sending, and managing emails across multiple providers.40931 npm130MIT
- FlicenseNot gradedqualityBmaintenanceEnables Claude to read, search, draft, send, flag, and move email across multiple IMAP/SMTP mailboxes while keeping credentials local.-
- AlicenseAqualityCmaintenanceEnables Claude to read, manage, and send email from any IMAP mailbox over plain IMAP and SMTP, including hosting-company and self-hosted mail servers. It provides tools for searching, reading, moving, deleting, and composing messages while built-in safety rules prevent unintended changes.12MIT
- AlicenseAqualityBmaintenanceLets Claude Desktop read any IMAP mailbox and send emails via SMTP, with support for multiple mailboxes and locally stored credentials.1336 npmMIT