← Back to MailDev New in 3.0

Email testing with AI agents

MailDev 3.0 ships a built-in Model Context Protocol (MCP) server, so AI agents can search your development inbox, pull verification links, analyze content, and confirm delivery — in natural language. It works with any MCP client, including Claude (Desktop and Code), Cursor, Codex, and Windsurf.

Why it matters: instead of clicking through your inbox to grab a token or confirm an email fired during a test, you just ask. “Get me the verification link from the signup email to user@test.com.” “Did the password reset go out?” Your agent picks the right tools and answers.

⚠️ Development only. The MCP server has full access to email content. Run it in trusted environments, bound to localhost, and never expose it to the internet.

Don't want to use MCP? MailDev also has a full REST API — list, read, search, download, and delete emails over plain JSON. Perfect for driving your inbox from test suites and CI in any language, no AI required.

Enable it

There are two transports. The integrated HTTP transport is the simplest — just add the --mcp flag:

maildev --mcp
# SMTP  → localhost:1025
# Web   → http://localhost:1080
# MCP   → http://localhost:1080/mcp

For stdio-based clients (many desktop AI tools), run the standalone server shipped by @maildev/mcp:

maildev-mcp
# connects to a running MailDev over its REST API
# override with --url / MAILDEV_API_URL

Connect your MCP client

Add MailDev to your client's mcpServers config — a project .mcp.json for Claude Code, Cursor, and Codex, or ~/Library/Application Support/Claude/claude_desktop_config.json for Claude Desktop on macOS. Each entry takes an explicit type.

HTTP transport (integrated --mcp)

{
  "mcpServers": {
    "maildev": {
      "type": "http",
      "url": "http://localhost:1080/mcp"
    }
  }
}

stdio transport (standalone maildev-mcp)

{
  "mcpServers": {
    "maildev": {
      "type": "stdio",
      "command": "maildev-mcp",
      "env": { "MAILDEV_API_URL": "http://localhost:1080" }
    }
  }
}

Cursor, Codex, Windsurf, Claude Code, and Claude Desktop all accept the same entry shape — check your client's MCP settings for which file to edit. Restart the client after saving.

What your agent can do

The server exposes 5 tools, 3 resources, and 4 ready-made prompts.

Tools

Resources

Prompts

Try asking

Full reference, including programmatic setup and troubleshooting, lives in the MCP docs on GitHub.

Get started with MailDev