Skip to main content

IMAP mailbox

io.github.ni-c/imap-mcp

v0.8.0Updated Nov 24, 2026stdio · npmstdio · Docker

Read, search and organise any IMAP mailbox, with writes off by default

Install

Needs 1 secret. Replace 3 placeholders with your own values.

Run in your terminal. Replace 3 placeholders.

claude mcp add imap-mcp -e 'IMAP_HOST=<your-imap-host>' -e 'IMAP_USER=<your-imap-user>' -e 'IMAP_PASSWORD=<your-imap-password>' -- npx -y @ni-c/[email protected]

Configuration

20 settings, 1 required secret. Snippets use placeholders; keep real values out of shared config.

  • IMAP_PASSWORD
    Env var· required· secret
    Mailbox password or app password
  • IMAP_HOST
    Env var· required
    Hostname of the IMAP server, e.g. imap.example.net
  • IMAP_USER
    Env var· required
    Mailbox user name
  • IMAP_PORT
    Env var· optional
    Defaults to 993 with implicit TLS, 143 otherwise
  • IMAP_TLS
    Env var· optional
    implicit (default), starttls or none
  • IMAP_MAILBOX
    Env var· optional
    Default mailbox to work in (default: INBOX)
Show 14 more
  • IMAP_SEEN_KEYWORD
    Env var· optional
    IMAP keyword marking what the assistant has already seen (default: AiSeen)
  • IMAP_READ_ONLY
    Env var· optional
    Set to false to register the mailbox write tools; defaults to true
  • IMAP_ALLOW_TOOLS
    Env var· optional
    Comma-separated tool names or list_* prefixes to register; 'essential' selects a curated preset (default: all tools)
  • IMAP_DENY_TOOLS
    Env var· optional
    Comma-separated tool names or list_* prefixes to remove from whatever IMAP_ALLOW_TOOLS left
  • IMAP_DOWNLOAD_DIR
    Env var· optional
    Directory attachments may be written to; unset means the server never touches the filesystem
  • IMAP_INSECURE_TLS
    Env var· optional
    Set to true to accept self-signed certificates, scoped to this connection
  • IMAP_DRAFTS_MAILBOX
    Env var· optional
    Drafts folder to save into; by default the one flagged \Drafts is used
  • IMAP_MAX_MESSAGES
    Env var· optional
    Default number of messages a listing returns (default: 100)
  • IMAP_MAX_ATTACHMENT_BYTES
    Env var· optional
    Ceiling for returning an attachment inline (default: 1048576)
  • IMAP_MAX_DOWNLOAD_BYTES
    Env var· optional
    Ceiling for writing an attachment to disk (default: 26214400)
  • IMAP_MAX_EXTRACT_BYTES
    Env var· optional
    Ceiling for reading a document's text with mode=text (default: 10485760, maximum: 67108864)
  • IMAP_COMMAND_TIMEOUT_SECONDS
    Env var· optional
    Seconds one IMAP command may take before the call is abandoned (default: 30, maximum: 600)
  • IMAP_ATTACHMENT_TYPES
    Env var· optional
    Comma-separated content-type allowlist for attachments
  • IMAP_TRUSTED_AUTHSERV_ID
    Env var· optional
    authserv-id your provider stamps into Authentication-Results; without it every verdict is reported as forgeable

Listed in the official MCP Registry since Nov 24, 2026. Mirrored daily; last checked Nov 26, 2026.