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
- npm
imap-mcpstdio
From the server's entry in the official MCP Registry.
Configuration
| Name | Set as | What it is |
|---|---|---|
IMAP_HOSTRequired | Env var | Hostname of the IMAP server (e.g. imap.example.com) |
IMAP_PORTOptional | Env var | Port of the IMAP server |
IMAP_USERNAMERequired | Env var | Username for IMAP authentication, also the default From address |
IMAP_PASSWORDRequired · Secret | Env var | Password for IMAP authentication |
IMAP_USE_SSLOptional | Env var | Set to true to connect over TLS |
Files
imap-mcp
📧 An IMAP Model Context Protocol (MCP) server to expose IMAP operations as tools for AI assistants.
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
- Compile TypeScript to JavaScript:
npx tsc
- 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 addresssubject(string, required): The email subject linebody(string, required): The email body contentfrom(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
- 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
Also new this week
- 73rust-anythingio.github.erkamyaman/rust-anythingRewrite an app in Rust one piece at a time, checked against the original's recorded behavior.8.1k
- 144obsidian-wikiio.github.Ar9av/obsidian-wikiMemory for agents in a markdown vault you own: search, read, write, recap, context packs.3.8k
- 150Z-Libraryio.github.heartleo/zlibSearch and download Z-Library books, fix e-book metadata, and send books to Kindle or WeRead.3.5k
- 178LearnHouseapp.learnhouse/learnhouseBuild, edit and run courses, learning paths and communities in your LearnHouse academy.2.5k
- 183MR Officeai.mroffice/officeCreate, open and edit documents, spreadsheets and PDFs in MR Office's editor, inline in chat.2.4k