# Mailgi

Mailgi — an MCP server for Claude Code and Codex that provisions real inboxes for AI agents. Handles receiving and sending messages over HTTP without manual SMTP setup.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: Mailgi
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Mailgi/mailgi
- Updated: 2026-11-04
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/mailgi

## What it does

The server connects an agent to a hosted email service over Streamable HTTP. The agent registers its own inbox by triggering `register_agent` without upfront credentials, receiving a dedicated mailbox address along with an API key.

Receiving mail and reading verification codes is completely free, while outbound delivery to the outside world relies on a pay-as-you-go billing model. The remote MCP endpoint runs at `https://api.mailgi.xyz/mcp`.

## Requirements
- Remote server: `https://api.mailgi.xyz/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http mailgi https://api.mailgi.xyz/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add mailgi --url https://api.mailgi.xyz/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mailgi": {
            "url": "https://api.mailgi.xyz/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mailgi": {
            "type": "http",
            "url": "https://api.mailgi.xyz/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http mailgi https://api.mailgi.xyz/mcp
```

## When to use it
- provision a real deliverable email address for an agent
- receive and parse verification codes automatically
- read agent incoming mail without IMAP libraries
- dispatch outbound emails directly through MCP tools

## Example prompts
- Register a new inbox for yourself with Mailgi
- Check the inbox and retrieve the verification code
- Send an email to user@example.com using Mailgi

## Similar
- [agentmail-cli](https://affpapa.org/en/nevibecode/skills/agentmail-cli.md) — skill · 1700 installs
- [pipefy-members-email-webhooks](https://affpapa.org/en/nevibecode/skills/pipefy-members-email-webhooks.md) — skill · 782 installs
- [at-email-cli](https://affpapa.org/en/nevibecode/skills/at-email-cli.md) — skill · 1100 installs
- [agent-email-inbox](https://affpapa.org/en/nevibecode/skills/agent-email-inbox.md) — skill · 14200 installs
- [agentmail-manage-inboxes](https://affpapa.org/en/nevibecode/skills/agentmail-manage-inboxes.md) — skill · 495 installs
- [e2a — email for AI agents](https://affpapa.org/en/nevibecode/mcp/e2a-email-for-ai-agents.md) — MCP server · ★ 200 repo stars

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
