Mailgi — Claude Code MCP server: what it does, how to install
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.
MIT updated 2026-11-04
claude mcp add --transport http mailgi https://api.mailgi.xyz/mcpWhat Mailgi 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.
What it helps with
- 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 for the agent
- Register a new inbox for yourself with Mailgi
- Check the inbox and retrieve the verification code
- Send an email to [email protected] using Mailgi
How to install Mailgi
Platform CLI: remote server
claude mcp add --transport http mailgi https://api.mailgi.xyz/mcpPlatform CLI: remote server
codex mcp add mailgi --url https://api.mailgi.xyz/mcpConfig file
{
"mcpServers": {
"mailgi": {
"url": "https://api.mailgi.xyz/mcp"
}
}
}Config file
{
"servers": {
"mailgi": {
"type": "http",
"url": "https://api.mailgi.xyz/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http mailgi https://api.mailgi.xyz/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Mailgi
How to install Mailgi in Claude Code?
Run claude mcp add --transport http mailgi https://api.mailgi.xyz/mcp in your terminal.
What does Mailgi do?
It allows agents to register a live mailbox autonomously, read incoming mail, and dispatch outbound emails via HTTP tools.
What is required to run Mailgi?
No initial API key is needed because the agent calls register_agent on start, but outbound emails to external recipients require pay-as-you-go credits.