# Agent Email

> Agent Email is an open-source MCP server for communication. Let agents read, draft, label and send Outlook or Gmail mail from your own mailbox. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/usejunior/email-agent-mcp
- **MCP Registry name:** io.github.UseJunior/email-agent-mcp
- **Categories:** [communication](https://ai-powered.com/categories/communication), [productivity](https://ai-powered.com/categories/productivity)
- **Listing updated:** 2026-11-23

## About

Email access for agents usually means wrestling with OAuth, Graph delta queries and threading quirks. This server wraps that into a set of stdio tools and ships a setup wizard that walks through OAuth and mailbox selection. Microsoft 365 and Outlook are the mailbox the README says was validated end to end, and Gmail is listed as supported too.

Safety is built around defaults. Agents cannot send anything until you configure a send allowlist, delete is disabled unless you opt in, errors are sanitised to strip keys and file paths, and body files are sandboxed against path traversal. A scope profile lets you choose between a full set of Microsoft permissions and an observe profile that only reads. The README is careful to say observe narrows the tool list rather than guaranteeing a narrower OAuth token if the mailbox has already consented to write scopes.

There is also an email watcher that polls a mailbox and wakes an OpenClaw gateway when new mail arrives.

## Features

- **Read and search:** List, read and search emails and fetch whole threads.
- **Drafts and sending:** Create, update and send drafts, send mail directly, or reply to a message.
- **Mailbox organising:** Label messages, change read state and move them between folders.
- **Send allowlist:** Sending is blocked until you configure who the agent may contact.
- **Observe scope profile:** An optional profile removes write tools and requests read-only Microsoft scopes.

## Good for

- Triage an inbox and draft replies for review
- Summarise a long email thread
- Categorise newsletters and notifications
- Run a read-only mailbox assistant
- Wake an agent when new mail lands

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add email-agent-mcp -- npx -y email-agent-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "email-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-agent-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "email-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-agent-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

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

```json
{
  "mcpServers": {
    "email-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-agent-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "email-agent-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "email-agent-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add email-agent-mcp -- npx -y email-agent-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.email-agent-mcp]
command = "npx"
args = ["-y", "email-agent-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "email-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-agent-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user email-agent-mcp npx -- -y email-agent-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "email-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-agent-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "email-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-agent-mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "email-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-agent-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "email-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-agent-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "email-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-agent-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "email-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-agent-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "email-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-agent-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "email-agent-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-agent-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 6 of 14 tools change data; 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `list_emails` (name suggests: reads)
- `read_email` (name suggests: reads)
- `search_emails` (name suggests: reads)
- `get_thread` (name suggests: reads)
- `create_draft` (name suggests: changes)
- `update_draft` (name suggests: changes)
- `send_draft` (name suggests: changes)
- `send_email` (name suggests: changes)
- `reply_to_email` (name suggests: changes)
- `label_email`
- `mark_read` (name suggests: reads)
- `move_to_folder` (name suggests: changes)
- `get_mailbox_status` (name suggests: reads)
- `list_inbox_rules` (name suggests: reads)

## FAQ

### Which mail providers work?

Microsoft 365 or Outlook and Gmail are listed as supported.

### Can an agent send mail right away?

No, sending needs an explicit allowlist.

### Can Agent Email delete messages?

Delete is disabled by default and needs opt-in.

### How do I install Agent Email?

Run npx -y email-agent-mcp and follow the setup wizard.

### Which licence applies?

The README badge shows Apache 2.0.

### Is Agent Email free?

Yes. Agent Email is open source, so you can use and self-host it for free.

### How do I add Agent Email to Claude Code?

Run this command in your terminal: claude mcp add email-agent-mcp -- npx -y email-agent-mcp

### What are the best alternatives to Agent Email?

The closest alternatives to Agent Email are TrendRadar, Ha MCP, Concord MCP, TryPost and Open Sunsama.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [TrendRadar](https://ai-powered.com/mcp/trendradar): TrendRadar is an open-source MCP server for communication.
- [Ha MCP](https://ai-powered.com/mcp/ha-mcp): Ha MCP is an open-source MCP server for productivity.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.
- [TryPost](https://ai-powered.com/mcp/trypost): TryPost is a paid MCP server for marketing and seo.
- [Open Sunsama](https://ai-powered.com/mcp/open-sunsama): Open Sunsama is an open-source MCP server for productivity.
- [Discord MCP](https://ai-powered.com/mcp/discord-mcp): Discord MCP is an open-source MCP server for communication.
- [Gmail MCP](https://ai-powered.com/mcp/gmail-mcp-3): Gmail MCP is an open-source MCP server for communication.
- [Dayfile.app](https://ai-powered.com/mcp/dayfile-app): Dayfile.app is an open-source MCP server for productivity.

---
Source: https://ai-powered.com/mcp/agent-email
