# mailmcp [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/kojott/mailmcp-dist  
**GitHub Stars:** 2  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mailmcp-2

## Description
Your mailboxes in ChatGPT and Claude: Gmail, iCloud, Fastmail, any IMAP. Passwords stay yours.

## Claude Desktop Quick Installation
No confirmed install details yet, so no config is published. Follow the setup steps in the repository above.

## Documentation

## What mailmcp does

mailmcp gives MCP clients access to multiple mailboxes through IMAP and SMTP. It can work with Gmail, Outlook.com, Microsoft 365, iCloud, Fastmail, Yahoo, Zoho, Seznam.cz, and other mail services that support password-based IMAP/SMTP authentication. Microsoft mailboxes use Microsoft sign-in instead of a mailbox password.

The service is designed for accounts spanning different providers. An assistant can list configured accounts, find and read messages, work with attachments, create drafts, and send mail when those permissions are enabled. Attachments can be downloaded through time-limited links, sent from the connected mailbox, provided from an uploaded file, or forwarded.

## How it works

A self-hosted deployment provides an HTTPS MCP endpoint at `/mcp`. Users visit `/setup`, select a provider, enter mailbox details, and choose permissions. The browser encrypts app passwords before sending them to the server and returns a token used by the MCP client. Reading is enabled by default; drafting and sending can be granted separately, with recipient allowlists available for sending.

The server keeps one master key and does not use a database for token storage. Changing `MAILMCP_KEY` invalidates all issued tokens. It can run on Vercel, in Docker, or directly with Node.js 22. Claude Desktop can also load the downloadable `.mcpb` package and run without a separately hosted server.

## Setup and configuration

A deployment needs a master key and an HTTPS address for ChatGPT or Claude connections. Set an invite code of at least eight characters before issuing user tokens, or deliberately enable open signup with `MAILMCP_OPEN_SIGNUP=1`. `MAILMCP_LICENSE` selects the paid licence or the free tier.

Use `MAILMCP_PUBLIC_URL` when a reverse proxy hides the public address. Microsoft sign-in on a self-hosted deployment requires an Entra application ID in `MAILMCP_MS_CLIENT_ID`; `MAILMCP_MS_REDIRECT=1` enables a registered callback-based popup flow. Private mail hosts require `MAILMCP_ALLOW_PRIVATE_MAIL_HOSTS=1`. The stdio mode can restrict attachment access with `MAILMCP_ATTACHMENT_DIRS`.

After deployment, connect ChatGPT through its custom app URL or add the endpoint as a Claude custom connector. For local use, open the `.mcpb` file in Claude Desktop and supply the generated configuration values.

## Tools and capabilities

- List configured mail accounts.
- Search and read messages across connected mailboxes.
- Retrieve attachments as downloadable links.
- Create drafts and prepare replies.
- Send messages with configured permissions and recipient controls.
- Send attachments from a mailbox or an assistant-uploaded file.

## Limitations and notes

ChatGPT and Claude require HTTPS for hosted connections. Gmail app-password setup requires 2-Step Verification and may be restricted by organisational policies or Advanced Protection. Outlook.com and Microsoft 365 generally require Microsoft sign-in rather than password authentication.

A shared deployment operator can technically see configuration while serving requests, so organisations can run their own instance. The repository is a prebuilt distribution under a commercial licence; the free tier operates without a licence key. Usage statistics, update checks, Microsoft routes, and private-host access can be controlled with environment variables.

_Full upstream README: https://allmcps.com/mcp/mailmcp-2/readme_

