# MailSlurp MCP

> MailSlurp lets your AI agent manage temporary inboxes and automate email testing. Instead of manually signing up for disposable addresses, you generate random or custom emails on the fly. Your agent can monitor these virtual mailboxes, wait for specific confirmation emails to arrive, retrieve full message bodies, and even send follow-up messages programmatically.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** email-testing, virtual-inbox, disposable-email, automated-testing, email-automation, message-parsing

## Description

Testing web apps means dealing with email flow—user signups, password resets, welcome alerts. Manually checking these flows is a huge pain point. This MCP connects your agent directly to MailSlurp's powerful infrastructure. It lets you build complex test suites entirely through natural conversation. Your AI client can create temporary inboxes and keep them ready for testing. Need to see if an email arrived 30 minutes from now? Your agent can long-poll the inbox until it shows up, giving you immediate results without writing polling code. You'll get access to detailed message headers, allowing you to verify not just that the email was sent, but how it traveled through the system. Because this MCP is hosted on Vinkius, you connect once from any compatible client and immediately gain access to this whole suite of inbox operations.

## Tools

### create_random_inbox
Generates a completely new, random email address for you to use in testing.

### delete_specific_inbox
Permanently removes an entire virtual inbox and all the emails associated with it.

### list_inbox_emails
Retrieves a list of every email that has arrived in a specified mailbox.

### get_email_details
Fetches the complete, detailed content for any single received email, including attachments and headers.

### list_all_inboxes
Displays a list of every virtual inbox you currently manage in your account.

### send_email_from_inbox
Allows the agent to send an outgoing email using one of your temporary addresses and specified content.

### wait_for_email_count
Pauses execution until a specific inbox has reached a predefined total number of messages.

### wait_for_latest_email
Monitors an inbox and returns the most recent incoming email immediately if one is available, or waits for the next one.

## Prompt Examples

**Prompt:** 
```
Create a new random inbox in MailSlurp.
```

**Response:** 
```
I've created a new inbox. The address is 'abc-123@mailslurp.com' and the ID is 'inbox-xyz'. You can now use it to receive emails.
```

**Prompt:** 
```
Wait for the next email to arrive in inbox 'inbox-xyz'.
```

**Response:** 
```
I'm monitoring the inbox. [Connection held] ... I've received an email from 'no-reply@service.com' with the subject 'Verify your account'. Would you like the text body?
```

**Prompt:** 
```
Send an email to 'user@example.com' from inbox 'inbox-xyz'.
```

**Response:** 
```
I've sent the email to user@example.com from your virtual inbox inbox-xyz. The message has been successfully delivered to the outbound queue.
```

## Capabilities

### Generate disposable inboxes
Your agent creates new random or custom email addresses for temporary use.

### Monitor incoming emails
The system waits for the next email to arrive, or monitors until a specific count of messages has been received.

### Inspect message content
You retrieve and view all details for any message, including both plain text and full HTML bodies.

### Send outbound emails
The agent sends new emails directly from one of your temporary addresses to a recipient.

### Manage inboxes
You list, inspect, or permanently delete entire virtual mailboxes when testing is done.

## Use Cases

### Verifying a user signup flow
A QA engineer asks their agent to monitor the inbox. The agent uses 'wait_for_latest_email' and then 'get_email_details' to confirm that both the welcome email and the verification link were received, ensuring the full transactional path works.

### Simulating a batch notification
A product team needs to test if their system sends five follow-up alerts. They ask the agent to 'wait_for_email_count' until the inbox hits 5, confirming the automated communication path is correct.

### Debugging a complex integration
A developer needs to test if Service A and Service B both send confirmation emails. They use 'create_random_inbox' and then monitor it with the agent, checking for multiple arrivals using 'list_inbox_emails'.

### Testing automated replies
A user wants to simulate a follow-up action after receiving an alert. They use the agent to read the content via 'get_email_details', and then execute a reply using 'send_email_from_inbox'.

## Benefits

- Stop manually checking email logs. With this MCP, your agent handles the asynchronous waiting period using 'wait_for_latest_email' or 'wait_for_email_count', giving you instant results right in your natural language flow.
- Never worry about test accounts again. Use 'create_random_inbox' to get a disposable address instantly for every single scenario, keeping your testing clean and repeatable.
- Get full context on delivery failures. The 'get_email_details' tool doesn't just give you the body; it pulls detailed technical headers so you can verify exactly how the email traveled.
- Test both directions in one session. You can monitor incoming messages using 'wait_for_latest_email', and then use 'send_email_from_inbox' to send a reply, all without switching tools or interfaces.
- Clean up after testing is done. Use 'delete_specific_inbox' and 'list_all_inboxes' to manage your infrastructure efficiently, preventing mailbox clutter.

## How It Works

The bottom line is that your agent treats these temporary mailboxes like a live API endpoint, letting you manage complex email logic without writing any boilerplate code.

1. First, subscribe to the MailSlurp MCP and enter your unique API key.
2. Next, tell your agent what you need—for example, 'Create a new random inbox' or 'Wait for an email with the subject verify'.
3. Finally, your AI client executes the necessary actions, giving you real-time status updates on inbox creation, message arrival, and content retrieval.

## Frequently Asked Questions

**How many inboxes can I manage with the MailSlurp MCP?**
You can list all managed inboxes using 'list_all_inboxes' and create new ones as needed. The system handles your entire mailbox infrastructure.

**Can I use MailSlurp to wait for a specific keyword in an email?**
Yes, you can set up complex waiting conditions using 'wait_for_email_count' or by monitoring the inbox until a message arrives that contains your target keywords.

**Is the content retrieved by get_email_details plain text only?**
No, 'get_email_details' provides complete information, including both the readable text body and the full source HTML for deep inspection.

**What happens to my temporary inboxes after I finish testing?**
You should use the 'delete_specific_inbox' tool. This permanently removes the inbox and all associated emails, keeping your account clean.

**Does MailSlurp only work for receiving emails?**
Not at all. You can send test responses or follow-ups using 'send_email_from_inbox', simulating a complete round trip within your tests.