• Home

Introducing Mailinator + AI: Give Your AI Assistant the Power of Email

Mailinator + AI

What if your AI assistant could check emails, extract verification codes, and grab password reset linksβ€”all without you lifting a finger? With Mailinator's new AI integration tools, that's now a reality.

The Problem: AI Workflows Need Email

As AI assistants become more capable, they're increasingly handling complex workflows that require email interaction. Need to test a signup flow? Verify a 2FA code? Grab a confirmation link? Traditionally, you'd have to:

  • Manually check your inbox
  • Copy and paste codes or links
  • Switch between your AI conversation and your email client
  • Set up throwaway email accounts for testing

It's a workflow killer. Your AI can write code, analyze data, and automate tasksβ€”but it stops dead when it needs to check an email.

The Solution: Mailinator + AI

For over 20 years, Mailinator has been the internet's go-to service for disposable email addresses. The genius of Mailinator is simple: every email address already exists. No signup. No inbox creation. Just choose any name (up to 50 characters) and boomβ€”you have a working email address at @mailinator.com.

Now, we're bringing that same frictionless experience to AI assistants with two powerful integration methods: a command-line interface (CLI) and a Model Context Protocol (MCP) server.

Why This Matters

Combining Mailinator's disposable email service with AI creates powerful new possibilities:

  • Zero Setup - Every @mailinator.com address already exists. Your AI can use any inbox instantly.
  • No Authentication Required (Public Domain) - Public inboxes are freely accessible. Perfect for testing and automation.
  • Instant Access - AI can retrieve emails in real-time, in multiple formats (text, HTML, JSON, headers, SMTP logs).
  • Link & Code Extraction - AI can automatically find and extract verification codes, reset links, or any URLs from emails.
  • Private Domain Support - Mailinator subscribers can use their API token to give AI access to private custom domains for secure workflows.
  • Natural Language Queries - With MCP integration, you can simply ask: "Check the testuser inbox" or "Get that verification code."

Real-World Use Cases

Here's what becomes possible when your AI has email superpowers:

πŸ” Automated Authentication Testing

"Test the password reset flow and confirm the email arrives" - Your AI can send the reset request, check the inbox, extract the link, and verify the entire flow works.

πŸ“ Workflow Validation

"Verify that the welcome email is sent when users sign up" - Perfect for continuous integration testing. Your AI can check that notification systems are working correctly.

πŸ”— Link Extraction

"Sign me up for that service and complete the email verification" - AI can handle the entire signup process, including clicking verification links from emails.

πŸ› Email Debugging

"Show me the SMTP delivery log for that email" - View complete headers and delivery timelines to troubleshoot email issues.

πŸ’¬ Content Analysis

"Check for order confirmation emails and tell me the tracking numbers" - AI can read and extract specific information from email content.

πŸ”’ Verification Code Retrieval

"Get the 2FA code from that email" - No more switching apps to copy/paste authentication codes.

Two Ways to Connect: CLI and MCP

We've built two complementary tools to give your AI access to Mailinator, depending on your workflow:

Option 1: Command-Line Interface (CLI)

Perfect for scripts, automation pipelines, and programmatic access from any environment. The CLI tool is a traditional command-line interface that works anywhere Node.js runs.

Installation:

# Install globally via npm
npm install -g mailinator-cli

# Or use with npx (no install required)
npx mailinator-cli inbox testuser public

Basic Usage:

# List all emails in a public inbox (no authentication needed)
mailinator-cli inbox testuser public

# Output shows a numbered table:
# Inbox: testuser@public
# β”Œβ”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
# β”‚ #   β”‚ From               β”‚ Subject                  β”‚ Time       β”‚
# β”œβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
# β”‚ 1   β”‚ noreply@github.com β”‚ Password reset request   β”‚ 2 mins ago β”‚
# β”‚ 2   β”‚ support@service.io β”‚ Verification code: 847392β”‚ 1 hour ago β”‚
# β””β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

# Retrieve a specific email by its number
mailinator-cli email 1 text

# Get email as JSON
mailinator-cli email 1 full

# Extract all links from an email
mailinator-cli email 1 links

# View SMTP delivery logs (great for debugging)
mailinator-cli email 1 smtplog

# Show just the summary (from, to, subject, time)
mailinator-cli email 2 summary

For Mailinator Subscribers (Private Domains):

# Set your API token
export MAILINATOR_API_KEY=your_token_here

# Now access your private inboxes
mailinator-cli inbox myinbox private

# Wildcard searches across multiple inboxes
mailinator-cli inbox test* private

Option 2: MCP Server (AI-Native Integration)

The Model Context Protocol (MCP) is a new standard for connecting AI assistants to external data sources and tools. Our MCP server provides native integration with AI assistants like Claude Desktop, allowing natural language email queries.

Starting the Server:

# Start on default port (127.0.0.1:8080)
mailinator-cli --start-mcp-server

# Start on custom host/port
mailinator-cli --start-mcp-server --host=0.0.0.0 --port=3000

# Subscribers: Start with private domain access
export MAILINATOR_API_KEY=your_token_here
mailinator-cli --start-mcp-server

Configuring Claude Desktop:

Add this to your Claude Desktop MCP configuration file (typically ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "mailinator": {
      "command": "node",
      "args": ["/absolute/path/to/mailinator-cli/bin/index.js", "--start-mcp-server"],
      "env": {
        "MAILINATOR_API_KEY": "your_token_here"
      }
    }
  }
}

Alternatively, if you're running the server separately, you can connect to it directly:

{
  "mcpServers": {
    "mailinator": {
      "url": "http://127.0.0.1:8080/mcp"
    }
  }
}

Then Just Ask Your AI:

"Check the testuser@mailinator.com inbox for any emails"

"What emails arrived in the last hour?"

"Show me the first email in summary format"

"Extract all links from that verification email"

"Get the SMTP log for that message to debug delivery"

"Pull the confirmation code from the latest email"

"Check my private inbox for order confirmations" (Subscribers)

The AI handles the API calls, parses the responses, and presents the information naturally in conversation.

MCP Tools and Resources

The MCP server exposes two tools (active operations) and two resources (passive context access):

Tools:

1. list_inbox

Lists all emails in a Mailinator inbox with metadata (sender, subject, timestamp, message ID). Supports wildcards (* or prefix*) for Mailinator subscribers with API tokens.

2. get_email

Retrieves a specific email with optional formatting. Available formats include:

  • summary - Key fields only (from, to, subject, time, ID)
  • text - Formatted text with headers (default)
  • textplain - Plain text body only
  • texthtml - HTML body only
  • full / raw - Complete email as JSON
  • headers - SMTP headers as structured data
  • smtplog - Delivery timeline with SMTP transaction log
  • links - Array of URLs found in email
  • linksfull - URLs with anchor text

Resources:

Resources provide URI-based access that AI assistants can reference as context:

  • mailinator://inbox/{domain}/{inbox_name} - Inbox listing
  • mailinator://email/{domain}/{message_id} - Email content

Public Domain vs. Private Domains

Public Domain (Free Forever)

Mailinator's public domain (@mailinator.com) has been free since 2003. No authentication required. Perfect for:

  • Testing and development workflows
  • One-time signups for services
  • Email workflow automation
  • CI/CD pipeline testing
  • Any scenario where email privacy isn't critical

Note: Public inboxes are, well, public. Anyone can view them. Don't use them for sensitive information.

Private Domains (Mailinator Subscribers)

Mailinator subscribers unlock powerful features:

  • Custom Private Domains - Use your own domain names
  • API Token Authentication - Secure access to your private emails
  • Wildcard Inbox Searches - Query multiple inboxes with pattern matching
  • Enhanced SMTP Logs - Detailed delivery tracking
  • Email Routing Rules - Advanced inbox management
  • Longer Email Retention - Keep emails longer than the public domain

Simply include your API token when configuring the CLI or MCP server, and your AI gets access to all your private inboxes.

Technical Details

Requirements

  • Node.js β‰₯ 18.0.0
  • Internet connection
  • API token (optional, for private domains)

API Integration

The tool uses the Mailinator CLI API v3:

  • Base URL: https://api.mailinator.com/cli/v3
  • Inbox endpoint: GET /domains/{domain}/inboxes/{inbox_name}
  • Email endpoint: GET /domains/{domain}/messages/{message_id}
  • SMTP log endpoint: GET /domains/{domain}/messages/{message_id}/smtplog

Smart Caching

The CLI caches inbox listings locally (~/.config/mailinator/inbox-cache.json), enabling:

  • Quick email retrieval by reference number (1, 2, 3...)
  • Automatic domain detection for cached emails
  • Reduced API calls
  • Faster workflow execution

Error Handling

Clear error messages with specific exit codes:

  • Exit 0: Success or non-fatal config warning
  • Exit 1: Validation error (invalid input)
  • Exit 2: API error (authentication, network, server)
  • Exit 3: Cache error (run inbox command first)

Getting Started in 5 Minutes

Step 1: Install

npm install -g mailinator-cli

Step 2: Test with Public Domain

# List emails (choose any inbox name you want)
mailinator-cli inbox joe123 public

# If there are no emails, send one first!
# Just send an email to joe123@mailinator.com from any email client

# Retrieve the first email
mailinator-cli email 1 text

Step 3: (Optional) Add Your API Token for Private Access

# Set your token
export MAILINATOR_API_KEY=your_token_here

# Or add to ~/.config/mailinator/config.json:
# {
#   "apiKey": "your_token_here"
# }

# Now access private inboxes
mailinator-cli inbox myinbox private

Step 4: (Optional) Set Up MCP for Claude Desktop

Edit your Claude Desktop config file and add the Mailinator MCP server configuration (see the MCP section above for the JSON config).

Restart Claude Desktop, and you're done! Claude can now check emails for you.

Example Workflow: Password Reset Testing

Let's walk through a complete example. Say you're testing a password reset flow:

# 1. Choose an inbox name
INBOX="testuser$(date +%s)"

# 2. Trigger password reset in your app, using ${INBOX}@mailinator.com

# 3. Wait a moment for delivery
sleep 5

# 4. Check the inbox
mailinator-cli inbox $INBOX public

# Output:
# Inbox: testuser1234567890@public
# β”Œβ”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
# β”‚ #   β”‚ From               β”‚ Subject                β”‚ Time         β”‚
# β”œβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
# β”‚ 1   β”‚ noreply@myapp.com  β”‚ Reset your password    β”‚ just now     β”‚
# β””β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

# 5. Get the email and extract links
mailinator-cli email 1 links

# Output:
# Links found in email:
# 1. https://myapp.com/reset?token=abc123xyz...
# 2. https://myapp.com/support
# 3. https://myapp.com/unsubscribe

# 6. Grab the reset link (first one)
RESET_LINK=$(mailinator-cli email 1 links | grep -o 'https://myapp.com/reset[^"]*' | head -1)

# 7. Use the link in your test
curl "$RESET_LINK"

With the MCP server and Claude Desktop, the conversation would be even simpler:

You: "I'm testing a password reset flow. Generate a random inbox name and check for the reset email."

Claude: "I'll use the inbox testuser1707938472. [checks inbox] I found a password reset email from noreply@myapp.com sent just now. The reset link is: https://myapp.com/reset?token=abc123xyz... Would you like me to extract any other information from the email?"

Privacy and Security Considerations

Public Domain

  • βœ… Perfect for testing, automation, and non-sensitive workflows
  • ⚠️ All emails are publicly accessible
  • ⚠️ Don't use for sensitive information
  • ⚠️ Emails are automatically deleted after a few hours
  • βœ… No account creation means no credential exposure

Private Domains (Subscribers)

  • βœ… API token authentication required
  • βœ… Private, secure access to your emails
  • βœ… Custom domains for your organization
  • βœ… Configurable retention policies
  • βœ… Full control over access

Why This Changes Everything

Before Mailinator + AI, email was a manual step that broke the flow of automation. You'd have to:

  1. Set up an email account
  2. Configure credentials
  3. Manage inbox access
  4. Manually check for emails
  5. Copy/paste codes or links
  6. Clean up test accounts afterward

Now? Your AI just checks the email. That's it.

This isn't just a convenience featureβ€”it's a fundamental shift in how AI assistants can participate in workflows that require email interaction. From automated testing to complex multi-step processes that involve email verification, AI can now handle the entire flow without human intervention.

The Future: What's Next

We're just getting started. Here's what we're exploring:

  • Webhook Integration - Real-time email notifications via webhooks
  • Email Sending - Let AI send emails, not just receive them
  • Attachment Handling - Download and process email attachments
  • Advanced Filtering - Search emails by sender, subject, date ranges
  • Multi-Inbox Monitoring - Watch multiple inboxes simultaneously
  • Email Threading - Track conversation threads across emails

Got ideas? We'd love to hear them. Open an issue on GitHub.

Get Started Today

Ready to give your AI assistant email superpowers?

The public domain is free forever. No credit card required. Install the tool, pick any inbox name, and start using it immediately.

For private domain access with enhanced features, subscribe to Mailinator and add your API token to the configuration.


Mailinator has been providing free, disposable email addresses since 2003. We've processed billions of emails for developers, testers, and automation engineers around the world. Now we're bringing that same simplicity to the age of AI.

Questions? Comments? Found a bug? Open an issue on GitHub or reach out to us at Mailinator Support.

Leave a comment

Your email address will not be published. Required fields are marked *