Email testing for code agents
Let AI coding agents verify email sending. Read captured messages through MCP tools without browser access.
The problem
AI coding agents generate and modify application code but cannot access a browser to verify that emails are sent correctly. Without direct access to captured messages, agents must rely on assumptions about email delivery.
How ammo.tools solves it
The MCP (Model Context Protocol) server provides read-only tools that coding agents can use to inspect captured emails and webhooks. Agents can verify subjects, recipients, body content and extracted links without browser access.
Setup
- Download the MCP server script to your project:
curl -O https://app.ammo.tools/static/cli/ammo-mcp.py
- Configure your MCP client with the server. For Claude Code, add to your MCP config:
{ "mcpServers": { "ammo-tools": { "command": "python3", "args": ["./ammo-mcp.py"], "env": { "AMMO_TOOLS_API_KEY": "your_api_key", "AMMO_TOOLS_API_BASE_URL": "https://app.ammo.tools/api/v1" } } } } - The agent can now use tools like
list_messagesandget_messageto read captured emails.
Available MCP tools
list_inboxes— List inboxes in the environmentlist_messages— List captured emails with optional filtersget_message— Get full message details including body and headersget_message_links— Extract links from a messageget_message_codes— Extract verification codeslist_endpoints— List webhook endpointslist_requests— List captured webhook requestsget_request— Get webhook request detailscompare_messages— Compare two emails for differences
Example agent workflow
An agent implementing a signup flow can:
- Generate the signup form and email-sending code
- Run the test to trigger the email
- Use
list_messagesto confirm the email was captured - Use
get_message_linksto verify the confirmation link is present - Adjust the implementation based on actual email content
Things to know
- MCP tools are read-only. Agents cannot delete or modify captured data.
- The API key determines which environment the agent can access.
- Each API key is scoped to a single environment for isolation.
- See the MCP setup guide for detailed configuration.