# AgentMail

> AgentMail is a freemium MCP server for communication. Email inboxes for AI agents, with an API, MCP server and webhooks. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Starting price:** $1 a month
- **Platforms:** Web, API, CLI, Self-hosted
- **Website:** https://theagentmail.net
- **Repository:** https://github.com/uriva/agentmail
- **MCP Registry name:** net.theagentmail/agentmail
- **Categories:** [communication](https://ai-powered.com/categories/communication)
- **Listing updated:** 2026-11-27

## About

AgentMail gives an autonomous agent its own mailbox on the theagentmail.net domain, so it can receive one-time codes, reply to people and send notifications without access to a personal account. Mailboxes are created through a single API call, and sending, polling and webhook delivery all run over the same REST interface.

The service also exposes a remote MCP server over Streamable HTTP, so MCP-compatible clients can connect with a bearer key and no local install. Outbound messages pass through a real-time AI spam and phishing filter before they leave the server, which is meant to keep the shared domain's reputation intact.

The code is MIT licensed across the backend, frontend and SDK, and the project can be self-hosted on Cloudflare Workers. It suits developers building agent workflows that need to sign up for third-party services or hand work off to people by email.

## Features

- **One-call mailbox creation:** A single POST request creates a working address on the shared domain without DNS or domain setup.
- **Realtime webhooks:** Incoming messages trigger webhook events, including verification codes, so agents can act on them immediately.
- **Remote MCP server:** A Streamable HTTP MCP endpoint lets compatible clients connect with an API key and no local package.
- **Scoped API keys:** Keys can be limited to individual accounts, so each agent only touches its own mailbox.
- **AI spam guard:** Outbound mail is classified in real time for spam and phishing before delivery.
- **Attachment support:** Mailboxes send and receive attachments through the same API.
- **Self-hostable MIT code:** Backend, frontend and SDK are public and can be run on Cloudflare Workers.

## Good for

- Receiving verification codes so an agent can complete a signup flow itself
- Giving a support or ops agent a dedicated inbox for handoffs to humans
- Sending deployment or status notifications from an automated pipeline
- Building webhook-driven workflows that react to incoming email
- Connecting an MCP-capable coding assistant to a mailbox it can read and write

## Install

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

```sh
claude mcp add --transport http agentmail https://api.theagentmail.net/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": {
    "agentmail": {
      "type": "http",
      "url": "https://api.theagentmail.net/mcp"
    }
  }
}
```

### Claude Desktop (Customize → Connectors → Add → Add custom connector)

```text
https://api.theagentmail.net/mcp
```

Paste this URL, choose how to sign in, then click Add and Connect. On Team and Enterprise an Owner adds it in Organization settings → Connectors.

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

```json
{
  "mcpServers": {
    "agentmail": {
      "url": "https://api.theagentmail.net/mcp"
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "agentmail": {
      "type": "http",
      "url": "https://api.theagentmail.net/mcp"
    }
  }
}
```

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

### ChatGPT (chatgpt.com → Plugins → + → Add custom MCP server)

```text
https://api.theagentmail.net/mcp
```

Paste this URL, set up sign-in, accept the warning and install the plugin. Then type @ in a chat to use it.

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

```sh
codex mcp add agentmail --url https://api.theagentmail.net/mcp
```

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

```toml
[mcp_servers.agentmail]
url = "https://api.theagentmail.net/mcp"
```

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

```json
{
  "mcpServers": {
    "agentmail": {
      "httpUrl": "https://api.theagentmail.net/mcp"
    }
  }
}
```

Or run: gemini mcp add -s user --transport http agentmail https://api.theagentmail.net/mcp

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

```json
{
  "mcpServers": {
    "agentmail": {
      "serverUrl": "https://api.theagentmail.net/mcp"
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "agentmail": {
      "url": "https://api.theagentmail.net/mcp",
      "transport": "http"
    }
  }
}
```

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": {
    "agentmail": {
      "type": "streamableHttp",
      "url": "https://api.theagentmail.net/mcp"
    }
  }
}
```

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

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "agentmail": {
      "url": "https://api.theagentmail.net/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": {
    "agentmail": {
      "url": "https://api.theagentmail.net/mcp"
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "agentmail": {
      "url": "https://api.theagentmail.net/mcp"
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "agentmail": {
      "url": "https://api.theagentmail.net/mcp"
    }
  }
}
```

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

### Grok Bot (Grok Bot desktop app → Connect apps → Add a custom connector)

```sh
https://api.theagentmail.net/mcp
```

Enter a Name (for example "AgentMail"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin.

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

```json
{
  "mcpServers": {
    "agentmail": {
      "type": "http",
      "url": "https://api.theagentmail.net/mcp"
    }
  }
}
```

## FAQ

### How do I give my AI agent an email address?

Create a mailbox with one API call and the agent gets an address on @theagentmail.net. It can send through the REST API, receive by polling or webhooks, and handle attachments, with no domain, DNS or SPF/DKIM setup.

### Can agents receive verification codes?

Yes, on paid mailboxes. Signup and OTP emails are blocked on free trial mailboxes to prevent burner abuse, and they unlock with a $5 minimum deposit.

### Is AgentMail open source?

The backend, frontend, SDK and infrastructure are MIT licensed and published on GitHub, so you can self-host or contribute.

### How much does AgentMail cost?

One mailbox is free for 30 days after phone verification, with limits of 20 sends and 50 receives per day. Paid mailboxes cost $1 per month and include 1,000 sends and 1,000 receives per month, with a 200-per-day cap.

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

Run this command in your terminal: claude mcp add --transport http agentmail https://api.theagentmail.net/mcp

### What are the best alternatives to AgentMail?

The closest alternatives to AgentMail are Email Agent, agentsbase — Email for AI Agents, Mailkite, Mails.ai — Agent Email and Mail Send.

## Where this comes from

- Description: written from the project's README, the project's website 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.
- [agentsbase — Email for AI Agents](https://ai-powered.com/mcp/agentsbase-email-for-ai-agents): agentsbase — Email for AI Agents is a freemium MCP server for communication.
- [Mailkite](https://ai-powered.com/mcp/mailkite): Mailkite is a freemium MCP server for communication.
- [Mails.ai — Agent Email](https://ai-powered.com/mcp/mails-ai-agent-email): Mails.ai — Agent Email 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.
- [openagentemail](https://ai-powered.com/mcp/openagentemail): openagentemail is an open-source MCP server for communication.
- [Agent Mail Gateway](https://ai-powered.com/mcp/agent-mail-gateway): Agent Mail Gateway is an open-source MCP server for communication.
- [Mail Receive](https://ai-powered.com/mcp/mail-receive): Mail Receive is a freemium MCP server for communication.

---
Source: https://ai-powered.com/mcp/agentmail-2
