# openagentemail

> openagentemail is an open-source MCP server for communication. Self-hosted email and task handoffs for AI agents, exposed over MCP and REST. It runs locally on your machine and is started by your AI client.

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

## About

OpenAgentEmail gives software agents their own addresses so they can send and receive mail, and it adds structured task threads that record who asked for work, who received it, and what came back. The stdio MCP package lets an agent read and wait for mail, pull one-time codes and links out of messages, and send email using an identity token.

The project is built to run on your own infrastructure. You can deploy a bundled mail stack with Docker Compose or point the API at an existing provider's catch-all mailbox. Agents keep their own execution environment; the service records handoffs and approvals but does not run the model or pick a worker.

It suits teams whose agents run in separate terminals or machines and need a shared, inspectable way to exchange work without sharing admin credentials. Operators who want to keep control of data paths and permissions will find the most value here.

## Features

- **Agent mailboxes:** Logical identities on your managed domains, each with its own identity token.
- **OTP and link extraction:** Pulls verification codes and links out of mail and can wait for a matching message.
- **Task handoffs:** Named recipients, state history and structured results kept in one thread.
- **Approvals:** Records a named reviewer's approval or rejection without executing the action.
- **Webhooks and notifications:** Opt-in outbound events and human alerts for your integrations.
- **Dashboard visibility:** Browser view of mail, tasks, identities and notifications for operators.

## Good for

- Hand a code review or research task from one agent to another and read the result later
- Give an agent an address that receives signup and verification emails
- Pull one-time passcodes from incoming mail during automated sign-in flows
- Keep an audit trail of which agent requested and completed each piece of work

## Install

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

```sh
claude mcp add mcp --env OPENAGENTEMAIL_API_KEY='<OPENAGENTEMAIL_API_KEY>' -- npx -y @openagentemail/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": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@openagentemail/mcp"
      ],
      "env": {
        "OPENAGENTEMAIL_API_KEY": "<OPENAGENTEMAIL_API_KEY>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@openagentemail/mcp"
      ],
      "env": {
        "OPENAGENTEMAIL_API_KEY": "<OPENAGENTEMAIL_API_KEY>"
      }
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@openagentemail/mcp"
      ],
      "env": {
        "OPENAGENTEMAIL_API_KEY": "<OPENAGENTEMAIL_API_KEY>"
      }
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@openagentemail/mcp"
      ],
      "env": {
        "OPENAGENTEMAIL_API_KEY": "<OPENAGENTEMAIL_API_KEY>"
      }
    }
  }
}
```

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 mcp --env OPENAGENTEMAIL_API_KEY='<OPENAGENTEMAIL_API_KEY>' -- npx -y @openagentemail/mcp
```

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

```toml
[mcp_servers.mcp]
command = "npx"
args = ["-y", "@openagentemail/mcp"]
env = { OPENAGENTEMAIL_API_KEY = "<OPENAGENTEMAIL_API_KEY>" }
```

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

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@openagentemail/mcp"
      ],
      "env": {
        "OPENAGENTEMAIL_API_KEY": "<OPENAGENTEMAIL_API_KEY>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e OPENAGENTEMAIL_API_KEY='<OPENAGENTEMAIL_API_KEY>' mcp npx -- -y @openagentemail/mcp

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

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@openagentemail/mcp"
      ],
      "env": {
        "OPENAGENTEMAIL_API_KEY": "<OPENAGENTEMAIL_API_KEY>"
      }
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@openagentemail/mcp"
      ],
      "env": {
        "OPENAGENTEMAIL_API_KEY": "<OPENAGENTEMAIL_API_KEY>"
      }
    }
  }
}
```

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": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@openagentemail/mcp"
      ],
      "env": {
        "OPENAGENTEMAIL_API_KEY": "<OPENAGENTEMAIL_API_KEY>"
      }
    }
  }
}
```

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

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@openagentemail/mcp"
      ],
      "env": {
        "OPENAGENTEMAIL_API_KEY": "<OPENAGENTEMAIL_API_KEY>"
      }
    }
  }
}
```

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": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@openagentemail/mcp"
      ],
      "env": {
        "OPENAGENTEMAIL_API_KEY": "<OPENAGENTEMAIL_API_KEY>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

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

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@openagentemail/mcp"
      ],
      "env": {
        "OPENAGENTEMAIL_API_KEY": "<OPENAGENTEMAIL_API_KEY>"
      }
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@openagentemail/mcp"
      ],
      "env": {
        "OPENAGENTEMAIL_API_KEY": "<OPENAGENTEMAIL_API_KEY>"
      }
    }
  }
}
```

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": {
    "mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@openagentemail/mcp"
      ],
      "env": {
        "OPENAGENTEMAIL_API_KEY": "<OPENAGENTEMAIL_API_KEY>"
      }
    }
  }
}
```

## FAQ

### Which MCP transports are supported?

The published npm package runs over stdio, and the API also offers a remote HTTP MCP endpoint at /mcp.

### What Node.js version does the stdio client need?

Node.js 20 or newer.

### Do agents need mail server credentials?

No. The stdio client only needs the API URL and an identity token.

### Is openagentemail free?

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

### How do I add openagentemail to Claude Code?

Run this command in your terminal: claude mcp add mcp --env OPENAGENTEMAIL_API_KEY='<OPENAGENTEMAIL_API_KEY>' -- npx -y @openagentemail/mcp

### What are the best alternatives to openagentemail?

The closest alternatives to openagentemail are Email Agent, AgentMail, Mail Send, Mailkite and agent-mailbox — Mailbox and Wake System for AI Agent Teams.

## Where this comes from

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

## Alternatives

- [Email Agent](https://ai-powered.com/mcp/email-agent): Email Agent is a freemium MCP server for communication.
- [AgentMail](https://ai-powered.com/mcp/agentmail): AgentMail is a freemium MCP server for communication.
- [Mail Send](https://ai-powered.com/mcp/mail-send): Mail Send is a freemium MCP server for communication.
- [Mailkite](https://ai-powered.com/mcp/mailkite): Mailkite is a freemium MCP server for communication.
- [agent-mailbox — Mailbox and Wake System for AI Agent Teams](https://ai-powered.com/mcp/agent-mailbox-mailbox-and-wake-system-for-ai-agent-teams): agent-mailbox — Mailbox and Wake System for AI Agent Teams is an open-source MCP server for communication.
- [Spare Email MCP](https://ai-powered.com/mcp/spare-email-mcp): Spare Email MCP is an open-source MCP server for communication.
- [IMAP MCP](https://ai-powered.com/mcp/imap-mcp-2): IMAP MCP is an open-source MCP server for communication.
- [OpenMail](https://ai-powered.com/mcp/openmail): OpenMail is a freemium MCP server for communication.

---
Source: https://ai-powered.com/mcp/openagentemail
