ClaudeCodeMod

All shelves / MCP servers

io.github.langmail/imap-mcp

io.github.langmail/imap-mcp · 15 stars · TypeScript · MIT

MCP server IMAP email as MCP tools: create draft messages in the Drafts folder of any IMAP mailbox.

Install

The repo has no one-line install. Follow its README.

Published as

  • npmimap-mcpstdio

From the server's entry in the official MCP Registry.

Open the repo

Configuration

NameSet asWhat it is
IMAP_HOSTRequiredEnv varHostname of the IMAP server (e.g. imap.example.com)
IMAP_PORTOptionalEnv varPort of the IMAP server
IMAP_USERNAMERequiredEnv varUsername for IMAP authentication, also the default From address
IMAP_PASSWORDRequired · SecretEnv varPassword for IMAP authentication
IMAP_USE_SSLOptionalEnv varSet to true to connect over TLS

Files

README.md

imap-mcp

📧 An IMAP Model Context Protocol (MCP) server to expose IMAP operations as tools for AI assistants.

MIT License code style: prettier MCP Compatible semantic-release: angular

Maintained by the team behind Langmail. Want mail, calendar and contacts for your agent over one hosted MCP, with OAuth and nothing to run? → langmail.me

✨ Features

  • Email Draft Creation: Create draft emails that are saved to your IMAP server's drafts folder
  • IMAP Integration: Connect to any IMAP-compatible email server (Gmail, Outlook, etc.)
  • Secure Authentication: Uses environment variables for secure credential management
  • MCP Compatible: Works with Claude and other AI assistants that support the Model Context Protocol
  • TypeScript: Full TypeScript support with proper type definitions

Setup

{
  "mcpServers": {
    ...,
    "imap": {
      "command": "npx",
      "args": [
        "imap-mcp"
      ],
      "env": {
        "IMAP_HOST": "<IMAP host>",
        "IMAP_PORT": "<IMAP port>",
        "IMAP_USERNAME": "<IMAP username>",
        "IMAP_PASSWORD": "<IMAP password>",
        "IMAP_USE_SSL": "<true or false>"
      }
    }
  }
}

Usage

  1. Compile TypeScript to JavaScript:
npx tsc
  1. Run the MCP server:
node dist/index.js

Available Tools

create-draft

Creates a draft email message and saves it to the IMAP server's drafts folder.

Parameters:

  • to (string, required): The recipient's email address
  • subject (string, required): The email subject line
  • body (string, required): The email body content
  • from (string, optional): The sender's email address (defaults to IMAP_USERNAME)

Example:

{
  "to": "recipient@example.com",
  "subject": "Meeting Reminder",
  "body": "Don't forget about our meeting tomorrow at 2 PM.",
  "from": "sender@example.com"
}

The tool will attempt to save the draft to either "INBOX.Drafts" or "Drafts" folder, depending on your email server's folder structure.

License

MIT

Facts

Kind
MCP server
Repo
langmail/imap-mcp
Group
Uncategorized
Stars
15
License
MIT
Language
TypeScript
Last push
2026-11-19
Forks
2
MCP Registry
io.github.langmail/imap-mcp
Topics
imap, mcp, mcp-server, typescript

From the same owner

  1. 1395io.github.langmail/caldav-mcpio.github.langmail/caldav-mcpCalDAV calendar operations (list, create, update, delete events) as MCP tools.115

Also new this week

  1. 73rust-anythingio.github.erkamyaman/rust-anythingRewrite an app in Rust one piece at a time, checked against the original's recorded behavior.8.1k
  2. 144obsidian-wikiio.github.Ar9av/obsidian-wikiMemory for agents in a markdown vault you own: search, read, write, recap, context packs.3.8k
  3. 150Z-Libraryio.github.heartleo/zlibSearch and download Z-Library books, fix e-book metadata, and send books to Kindle or WeRead.3.5k
  4. 178LearnHouseapp.learnhouse/learnhouseBuild, edit and run courses, learning paths and communities in your LearnHouse academy.2.5k
  5. 183MR Officeai.mroffice/officeCreate, open and edit documents, spreadsheets and PDFs in MR Office's editor, inline in chat.2.4k