mcpField
M
Mailgi

Mailgi

Remote
mailgi.xyzCommunication0Updated 2d ago

About Mailgi

Mailgi provides real, deliverable inboxes for AI agents through a hosted email API, with a TypeScript SDK and CLI. Agents can register an address, receive and read mail, and send messages without an SMTP or IMAP client.

Key features

  1. 01Register an agent inbox
  2. 02Receive and read email
  3. 03Send email externally
  4. 04TypeScript SDK and CLI

Use cases

  1. 01Receive email verification codes
  2. 02Manage an agent support inbox
  3. 03Send mail from an agent

MCP support

The hosted MCP server at `https://api.mailgi.xyz/mcp` exposes the REST API over Streamable HTTP. An agent can register through `register_agent` without an API key and receive its own address and key.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://api.mailgi.xyz/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

All endpoints
Streamable HTTPhttps://api.mailgi.xyz/mcpAuth required

Tools

Details

From the project README

Mailgi

Email for AI agents. Every agent gets a real, deliverable mailbox and uses it entirely over REST — no SMTP or IMAP client required.

An agent registers itself with one unauthenticated POST and gets an address it can receive verification codes on, reply from and keep mail in. Receiving is free; mail to the outside world is pay-as-you-go. Also available as a hosted MCP server at https://api.mailgi.xyz/mcp.

This repository

PathWhatStatus
packages/typescriptTypeScript SDK + mailgi CLI — npm @mailgi/mailgipublished
packages/pythonPython SDK — PyPI mailgiplanned
apps/uiReact developer UI for inspecting mailboxesdev tool
specopenapi.json — the contract every SDK targets—

The API and mail infrastructure live in a separate private repository.

Quick start

npm install -g @mailgi/mailgi

mailgi register --label my-agent          # saves to ~/.mailgi/config.json
mailgi send --agent <handle> --to [email protected] --subject Hi --body Hello
mailgi inbox --agent <handle>

Or from code:

import { AgentMailboxClient } from "@mailgi/mailgi";

const client = AgentMailboxClient.withApiKey("https://api.mailgi.xyz", process.env.MAILGI_API_KEY!);
await client.sendMail({ to: ["[email protected]"], subject: "Hi", textBody: "Hello" });

MCP server

Mailgi runs a hosted MCP server (Streamable HTTP) at https://api.mailgi.xyz/mcp, 1:1 with the REST API. No API key is needed to start: the agent calls register_agent and gets its own address and key.

claude mcp add --transport http mailgi https://api.mailgi.xyz/mcp

Setup for Cursor, Claude Desktop and other clients: https://www.mailgi.xyz/mcp.html. server.json is the entry in the official MCP Registry as xyz.mailgi/mailgi.

Working on this repo

npm install                      # installs all workspaces
npm run build                    # builds every package
npm test                         # runs every package's tests
npm run dev -w @mailgi/ui        # developer UI on :5173

Workspaces are listed explicitly in the root package.json rather than globbed, so non-Node packages such as packages/python can sit alongside them without confusing npm.

Release tags are namespaced per package — ts-sdk-v0.2.0, py-sdk-v0.1.0 — because the SDKs version independently.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.