Skip to main content
Glama
MailMCP

MailMCP

by moellerm1968

MailMCP

MCP-Server für den Zugriff auf ein E-Mail-Postfach via IMAP/SMTP. Geschrieben in Node.js / TypeScript. Läuft als stdio-Prozess direkt auf dem Host.

Features

  • Alle Ordner des Postfachs auflisten

  • E-Mails in einem beliebigen Ordner auflisten (neuste zuerst)

  • Vollständigen Inhalt einer E-Mail lesen (Text, HTML, Anhänge)

  • E-Mails nach Betreff, Absender oder Body durchsuchen

  • E-Mail in anderen Ordner verschieben

  • E-Mails senden (inkl. CC, BCC, HTML, Anhänge als Base64)

  • Lokale Datei direkt als E-Mail-Anhang versenden

  • Konfigurierbarer INBOX-Ordner

Related MCP server: mcp-imap

Verfügbare Tools

Tool

Beschreibung

list_folders

Alle IMAP-Ordner auflisten

list_emails

E-Mails in einem Ordner auflisten (mit Filter: ungelesen)

get_email

Vollständige E-Mail per UID lesen

search_emails

E-Mails nach Stichwort durchsuchen

move_email

E-Mail in anderen Ordner verschieben

send_email

E-Mail senden (To, Subject, Text, optional CC/BCC/HTML/Anhänge als Base64)

send_local_file

Lokale Datei vom Host-Dateisystem als Anhang versenden

get_inbox_config

Aktuelle Serverkonfiguration anzeigen

Setup

1. Abhängigkeiten installieren & bauen

npm install
npm run build

2. Konfiguration

cp .env.example .env

Werte in .env anpassen:

Variable

Beschreibung

Standard

MAIL_HOST

IMAP-Server

–

MAIL_PORT

IMAP-Port

993

MAIL_SSL

IMAP SSL

true

MAIL_USER

E-Mail-Adresse

–

MAIL_PASSWORD

Passwort

–

MAIL_INBOX

Standard-Posteingang

INBOX

MAIL_MAX_EMAILS

Max. E-Mails pro Abfrage

50

SMTP_HOST

SMTP-Server

–

SMTP_PORT

SMTP-Port

587

SMTP_SSL

SMTP SSL (true = Port 465)

false

SMTP_FROM_NAME

Absendername

–

Die .env-Datei wird automatisch geladen — es sind keine Umgebungsvariablen im MCP-Client nötig.

MCP-Integration (mcporter / Claude / VS Code)

{
  "mcpServers": {
    "mailmcp": {
      "command": "node /pfad/zu/mailmcp/dist/server.js"
    }
  }
}

Dateistruktur

mailmcp/
├── src/
│   ├── server.ts        # MCP Server & Tool-Definitionen
│   ├── imap-client.ts   # IMAP-Verbindung & E-Mail-Parsing
│   ├── smtp-client.ts   # SMTP-Versand via nodemailer
│   └── config.ts        # Konfiguration via .env
├── package.json
├── tsconfig.json
├── .env                 # Credentials (nicht einchecken!)
├── .env.example
└── .gitignore

Available Tools

8 tools
get_emailA

Liest den vollständigen Inhalt einer E-Mail anhand ihrer UID. Gibt Betreff, Absender, Empfänger, Datum, Text-Body, HTML-Body und Dateianhänge zurück.

Inputs: uid (required), folder.

get_inbox_configA

Zeigt die aktuelle Serverkonfiguration an (Host, User, INBOX-Ordner). Passwort wird nicht zurückgegeben.

Inputs: no named parameters.

list_emailsA

Listet E-Mails in einem Ordner auf (neuste zuerst). Gibt UID, Betreff, Absender, Datum, Lesestatus und Anhänge zurück. Standardmäßig wird der konfigurierte INBOX-Ordner verwendet.

Inputs: limit, folder, only_unread.

list_foldersA

Listet alle verfügbaren E-Mail-Ordner auf dem IMAP-Server auf.

Inputs: no named parameters.

move_emailB

Verschiebt eine E-Mail anhand ihrer UID in einen anderen Ordner.

Inputs: uid (required), target_folder (required), source_folder.

search_emailsC

Durchsucht einen Ordner nach E-Mails anhand eines Suchbegriffs.

Inputs: query (required), limit, folder, search_in.

send_emailC

Sendet eine E-Mail via SMTP.

Inputs: to (required), text (required), subject (required), cc, +4 more.

send_local_fileA

Liest eine lokale Datei vom Server-Dateisystem und verschickt sie als E-Mail-Anhang via SMTP. Betreff und Text-Body sind optional und werden aus dem Dateinamen abgeleitet, wenn nicht angegeben.

Inputs: to (required), file_path (required), cc, bcc, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool addresses a distinct email operation: listing folders, listing messages, reading a single message, searching, sending, moving, sending a local file, and viewing config. The only mild overlap is send_email and send_local_file, but they are clearly differentiated by attachment source and defaults.

    Naming Consistency5/5

    All tools follow a consistent lowercase verb_noun pattern: list_folders, list_emails, get_email, search_emails, send_email, move_email, send_local_file, and get_inbox_config. The naming style is uniform and predictable.

    Tool Count5/5

    Eight tools is well-scoped for an email MCP server. The set covers core email operations without unnecessary redundancy or bloat.

    Completeness4/5

    The core email workflow is covered: listing folders and emails, reading, searching, sending, moving, and handling local file attachments. Obvious gaps like deleting emails, marking read/unread, or creating folders are missing, but agents can still accomplish most common tasks.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to read, search, compose, and send emails by connecting to any IMAP/SMTP provider. It supports comprehensive mailbox management, including draft handling and message deletion, directly through natural language.
      10
      239 npm
      11
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to interact with email accounts via IMAP and SMTP, supporting mailbox listing, email search, retrieval, sending, and management.
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to send, read, and manage emails via SMTP and IMAP, with support for attachments, threads, and mailbox organization.
      16
      81 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language email operations (send, search, read, manage) via IMAP/SMTP, with support for attachments, multiple mailboxes, and secure configuration.
      MIT