# Mailbox MCP server

> Allows an AI client to read, organize, draft, and send emails across multiple IMAP/SMTP accounts via a scoped HTTP API and MCP endpoint.

- Repository: https://github.com/psyb0t/docker-mailbox
- Page: https://hostedmcp.org/servers/psyb0t/docker-mailbox
- Transport: remote
- Stars: 9
- License: WTFPL
- Latest version: 0.8.2

## Install

### Claude Code

```sh
claude mcp add docker-mailbox -- docker run -i --rm docker.io/psyb0t/mailbox:v0.8.2
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "docker-mailbox": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/psyb0t/mailbox:v0.8.2"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "docker-mailbox": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/psyb0t/mailbox:v0.8.2"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"docker-mailbox","type":"stdio","command":"docker","args":["run","-i","--rm","docker.io/psyb0t/mailbox:v0.8.2"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "docker-mailbox": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/psyb0t/mailbox:v0.8.2"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add docker-mailbox -- docker run -i --rm docker.io/psyb0t/mailbox:v0.8.2
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.docker-mailbox]
command = "docker"
args = ["run", "-i", "--rm", "docker.io/psyb0t/mailbox:v0.8.2"]
```

### Gemini CLI

```sh
gemini mcp add -s user docker-mailbox docker -- run -i --rm docker.io/psyb0t/mailbox:v0.8.2
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "docker-mailbox": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "docker.io/psyb0t/mailbox:v0.8.2"
      ]
    }
  }
}
```

## FAQ

### How does the server handle email deletion?

Deleting a message moves it to the Trash folder by default. Permanent erasure requires the 'delete' scope and can only be performed from the Trash folder.

### Can an AI agent send emails directly?

Agents can prepare replies as drafts, but sending requires a token with 'send' permissions or human intervention.

### What security measures are in place for sending mail?

The service includes an hourly rate limit, a dry-run mode, and requires sender addresses to match authorized identities or domain patterns.

### Does the service store email bodies in the audit log?

No, while writes and refused operations are recorded in the audit log, message bodies are never stored there.
