Skip to main content
Glama
Ragazzoforte

strato-mail-mcp

by Ragazzoforte

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: IMAP MCP Server

πŸš€ 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: local

2. Set Environment Variables

In Portainer Stack UI, add before deploying:

IMAP_USER=jouw-email@example.com
IMAP_PASSWORD=jouw-strato-password

3. Deploy

Click "Deploy the stack" β†’ Wait ~30 seconds

4. Verify

In Portainer β†’ Containers β†’ strato-mail-mcp

  • Should show Running

  • Logs 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

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 concept

Manage

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 emails

Files

get_attachment(uid, filename)
β†’ Get attachment path (for Claude to access)

πŸ”§ Configuration Details

Strato Settings

IMAP:

  • Host: imap.strato.com (SSL/TLS)

  • Port: 993

  • User: je Strato email

  • Pass: je Strato password

SMTP:

  • Host: smtp.strato.com (SSL/TLS)

  • Port: 465

  • User: je Strato email

  • Pass: je Strato password

Docker Volumes

  • strato-attachments β†’ Attachments opgeslagen in /app/attachments

  • Persisten over container restarts

Resource Limits

  • CPU: max 0.5 cores

  • Memory: max 256MB

  • Reserved: 0.25 CPU, 128MB RAM


πŸ› 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 blocked

Attachments not saving

Check volume is mounted:
docker inspect strato-mail-mcp | grep -A 5 Mounts

Should show: /app/attachments β†’ strato-attachments

Slow 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

  1. Containers β†’ strato-mail-mcp

  2. Stats tab β†’ CPU/Memory usage

  3. 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:

  • .env contains password (NEVER commit to git!)

  • In Portainer: credentials stored in container variables (encrypted)

  • In Docker: use .env file 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

  1. Stacks β†’ strato-mail-mcp

  2. Stop: click Stop

  3. Update: remove stack, re-deploy with new code

  4. 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:

  1. Check logs: docker logs strato-mail-mcp

  2. Verify Strato credentials work in email client

  3. Check IMAP/SMTP ports (993, 465) are accessible

  4. Ensure .env is correctly set


Version: 2.0.0
Status: βœ… Production-ready for Portainer

F
license - not found
-
quality - not tested
B
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Enables Claude to interact with email accounts via IMAP and SMTP, providing tools for searching, reading, sending, and managing emails across multiple providers.
    Last updated
    40
    480
    65
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    Enables Claude to read, search, send, label, and trash emails in any Gmail account via Google's Gmail API, using OAuth2 authentication with automatic token refresh.
    Last updated
    67
    MIT

View all related MCP servers

Related MCP Connectors

  • Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…

  • Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.

  • Manage Gmail messages, threads, labels, drafts, and settings from your workflows. Send and organiz…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ragazzoforte/strato-mail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server