# Self-hosted-MCP/Selfhost-Remote-Mail-MCP [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/Self-hosted-MCP/Selfhost-Remote-Mail-MCP  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/self-hosted-mcp-selfhost-remote-mail-mcp

## Description
Self-hosted IMAP/SMTP email for Claude, ChatGPT and other AI apps on desktop and phone: up to 5 mailboxes, drafts by default, sends only when you ask, file attachments from chat.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/Self-hosted-MCP/Selfhost-Remote-Mail-MCP), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
uv tool install git+https://github.com/Self-hosted-MCP/Selfhost-Remote-Mail-MCP
```

2. Configure:

```sh
selfhost-remote-mail-mcp setup
```

3. Add to Claude Code:

```sh
claude mcp add -s user mail -- selfhost-remote-mail-mcp stdio
```

## Documentation

## What Self-hosted-MCP/Selfhost-Remote-Mail-MCP does

Self-hosted-MCP/Selfhost-Remote-Mail-MCP gives MCP-compatible AI applications access to mailboxes through the standard IMAP and SMTP protocols. It supports common hosted providers and mailboxes on custom domains, with support for up to five mailboxes. The server runs under your control, so mailbox passwords, mail content, uploads, and application state stay within your deployment rather than being handled by a separate service operated by the project authors.

The email workflow is intentionally draft-first. An AI can inspect messages, prepare a new email, reply, reply to all, or forward a message, but the result is saved to the mailbox's normal Drafts folder. A separate instruction is required before the message is sent.

## How it works

An AI application communicates with the server using MCP. The server then connects to the configured mailbox as a regular email client: IMAP is used for reading and searching, while SMTP handles outgoing mail. This arrangement allows the AI application to work with the mailbox without requiring a proprietary email integration.

Attachments can move in both directions. The AI can open images, PDFs, and text files from messages. A file dropped into a compatible chat can be uploaded to the server, attached to a draft, and presented for review before sending. The attachment workflow supports files up to 25 MB.

## Setup and configuration

The project can run on a Mac, Windows, or Linux computer, on a hosting provider such as Railway or Render, or on another server using Docker. A computer deployment exposes a local settings page at `localhost:8765`; phone access requires the computer to remain on and use a tunnel. A hosted deployment is intended for continuous access from a phone or other remote client.

On Claude Desktop, the project provides an extension that can be downloaded, opened, and configured with a passphrase without using a terminal. Other deployment paths use a settings file or the hosting provider's variables interface. The server stores configuration and state separately; the documented computer locations are `~/.config/selfhost-remote-mail-mcp/.env` for settings and `~/.config/selfhost-remote-mail-mcp/state` for state. Docker and hosted deployments use `/data` for the data directory.

Each mailbox requires the provider's IMAP and SMTP details and credentials. Providers that require one, including Gmail, iCloud, and Yahoo, use an app password rather than the account's primary password. A server passphrase protects the settings page and is used when connecting an AI application over the internet.

## Tools and capabilities

- List and search folders with filters such as `from:sam is:unread newer_than:7d`.
- Open complete conversations and inspect image, PDF, and text attachments.
- Create new drafts, replies, reply-all messages, and forwards.
- Apply mailbox signatures and saved templates to drafts.
- Upload chat files and attach them to draft messages.
- Send a reviewed message only after an explicit request.
- Use multiple configured mailboxes, with access selected for each connected AI application.

## Limitations and notes

The server depends on mailbox providers exposing compatible IMAP and SMTP services. Phone access from a computer deployment is available only while that computer is running and reachable through a tunnel. Files intended as programs are refused, and potentially risky files such as macro-enabled spreadsheets require confirmation. AI applications that cannot upload a dropped file use a link-based upload flow instead.

The project is licensed under AGPL-3.0. It is designed for self-hosting, so deployment, mailbox credentials, passphrase protection, and remote exposure remain part of the operator's responsibility.

_Full upstream README: https://allmcps.com/mcp/self-hosted-mcp-selfhost-remote-mail-mcp/readme_

