IMAP MCP

IMAP MCP

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

9
Stars
1
Forks
1
Releases

Overview

imap-mcp exposes common IMAP actions as MCP tools, enabling AI assistants to interact with email servers through a safe, structured interface. The server supports creating draft emails via the create-draft tool, which saves messages to the IMAP server's drafts folder (INBOX.Drafts or Drafts, depending on the provider). It can connect to any IMAP-compatible email server, including Gmail and Outlook, using credentials supplied through environment variables for secure credential management. The MCP integration ensures compatibility with Claude and other MCP-enabled assistants, allowing tools to be invoked from prompts and chained into larger workflows. The project is implemented in TypeScript with full type definitions and a straightforward setup: an mcpServers entry where the imap server is run with npx imap-mcp and the connection details are provided via IMAP_HOST, IMAP_PORT, IMAP_USERNAME, IMAP_PASSWORD, and IMAP_USE_SSL. Build steps include npx tsc to compile and node dist/index.js to run. Available tools include create-draft with parameters to, subject, body, and optional from (defaulting to IMAP_USERNAME); drafts are saved to the appropriate folder on the IMAP server.

Details

Owner
dominik1001
Language
TypeScript
License
MIT License
Updated
2025-12-07

Features

Email Draft Creation

Creates draft emails saved to the 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.

Audience

AI developersExpose IMAP operations as MCP tools for AI assistants such as Claude.
IntegratorsBridge IMAP actions into MCP-enabled ecosystems and automation pipelines across teams.

Tags

IMAPMCPEmailDraftsTypeScriptSecurityEnvironment VariablesGmailOutlookAI AssistantsTools