Purpose: imap-mcp is a server based on the Model Context Protocol (MCP), whose goal is to let AI agents write email drafts into the Drafts folder of an IMAP mailbox rather than sending emails directly. Users can review the drafts in their email client and then decide whether to send them.
Main capabilities: It provides a single tool, create_draft, used to create a draft email and save it to the Drafts folder on the IMAP server. The parameters include to (recipient address, required), subject (subject, required), body (body, required), and from (sender address, optional, defaults to IMAP_USERNAME). For the draft save location, it prioritizes the special-use folder marked by the server as Drafts (the \Drafts attribute, RFC 6154), such as Gmail's [Gmail]/Drafts; if the server does not mark one, it tries INBOX.Drafts and then Drafts in order.
Usage: The project is written in TypeScript; TypeScript must first be compiled to JavaScript before running the MCP server. Credentials are managed via environment variables. It can work with any MCP client that can launch a local server, such as Claude Desktop, Claude Code, or Cursor.
Use cases: Suitable for users who want an AI assistant to draft emails on their behalf but retain human review and sending; applicable to IMAP servers that accept username-plus-password login, such as Gmail with an app-specific password.
Limitations: Only IMAP servers that accept username and password login are supported; providers that only allow OAuth login (such as Outlook.com) cannot be used. The materials do not provide specific installation commands, a list of environment variable names, hosted version details, or pricing information, so these are not provided for now.