# Mailsac MCP

> Mailsac manages disposable and private email addresses, letting your AI client automate testing workflows without needing real accounts. This MCP lets you reserve new, isolated inboxes, search through messages across multiple domains, and reliably extract sensitive data like verification codes or links from both plain text and HTML bodies.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** disposable-email, email-testing, inbox-management, message-extraction, automated-testing, verification-codes

## Description

Managing test emails used to be a nightmare of clicking tabs and manually copying codes. Now, your agent can handle the whole process directly. You connect this MCP via Vinkius and tell your AI client exactly what you need—whether it's checking if a new sign-up flow sends an email or grabbing a single verification code after a password reset. Your agent reserves a clean, private address for the test run, waits for the message to land, and then pulls out only the data you asked for, whether that's raw plain text or structured HTML content. You can also inspect your entire setup by listing all reserved addresses and checking which custom domains are linked to your account. Need cleanup? Your agent permanently deletes messages from an inbox or even clears out entire inboxes when testing is done. It’s pure automation for email-based operations.

## Tools

### list_reserved_addresses
Retrieves a list of all the enhanced or custom email addresses you have reserved in your account.

### delete_inbox_message
Permanently removes a specific message from an inbox, ensuring clean test environments.

### list_custom_domains
Shows all the custom domains that have been linked to and are active within your Mailsac account.

### get_html_message_body
Pulls out the complete, sanitized HTML code from a specific message for deep inspection.

### get_plain_text_body
Extracts only the readable plain text content from a message body, perfect for grabbing codes or simple links.

### list_inbox_messages
Fetches a list of all messages currently sitting in a specified inbox.

### release_reserved_address
Deletes and releases an email address that you no longer need, freeing up the reserved slot.

### reserve_new_address
Programmatically secures a new, unique private email address for isolated testing flows.

### search_account_messages
Searches for messages across all your reserved addresses using advanced search parameters like sender or subject (paid tier required).

## Prompt Examples

**Prompt:** 
```
List all my reserved email addresses in Mailsac.
```

**Response:** 
```
I've retrieved your reserved addresses. You have 3 active inboxes: 'test-user@mailsac.com', 'service-dev@mailsac.com', and 'alert-prod@mailsac.com'.
```

**Prompt:** 
```
Fetch the plain text content of the last email sent to 'test-user@mailsac.com'.
```

**Response:** 
```
I've retrieved the text body. The message contains a verification code: '123-456'. Would you like me to extract any other specific information?
```

**Prompt:** 
```
Reserve a new private address 'automation-flow@mailsac.com'.
```

**Response:** 
```
Successfully reserved 'automation-flow@mailsac.com'. This inbox is now private and enhanced, allowing you to capture messages exclusively.
```

## Capabilities

### Reserve and Manage Addresses
Create new, isolated private addresses, list all reserved addresses, or delete old ones to keep your setup clean.

### Retrieve Message Content
Fetch the full plain text body or the sanitized HTML structure of any specific message in an inbox.

### Check Inbox Status and Contents
List all messages received by a given address, allowing you to inspect what came through your temporary mailbox.

### Search Across All Inboxes
Query messages across every registered address using advanced search parameters like sender or subject line (requires paid tier).

### Delete and Maintain Mailboxes
Permanently remove a single message from an inbox, or completely clear out an entire mailbox when testing is finished.

## Use Cases

### Testing a New Signup Flow
A QA engineer needs to test the password reset email. They ask their agent to `reserve_new_address` for 'test-user@mailsac.com'. The flow runs, sends the email, and the agent uses `get_plain_text_body` to pull out the unique reset code instantly, feeding it back into a testing script.

### Debugging Email Triggers
A developer is debugging an integration that should send a confirmation email. They use their agent to `list_inbox_messages` for the test address, confirming the message arrived and then use `get_html_message_body` to check if all necessary tracking links are present in the source code.

### Auditing Domain Usage
A DevOps engineer needs to know which custom domains are active for a new client project. They run `list_custom_domains` through their agent, getting an immediate list of all available and linked sender identities.

### Investigating Failed Messages
A user suspects a message got lost in the shuffle. Instead of checking every single inbox, they ask their agent to use `search_account_messages` with date parameters, narrowing down potential messages across their entire account.

## Benefits

- Stop manually checking inboxes. Use the agent to reserve a clean address with `reserve_new_address` and then automatically wait for, read, and process incoming messages.
- Extract data reliably. Instead of reading messy HTML, use `get_plain_text_body` to pull out only verification codes or tracking numbers into a simple text string.
- Keep your environment clean. When testing is done, use `delete_inbox_message` or even clear the entire inbox to prevent test data from accumulating and causing clutter.
- Track everything you own. You can always verify which addresses are active by running `list_reserved_addresses`, giving you full oversight of your email infrastructure.
- Search complex histories easily. The `search_account_messages` tool lets you query messages across all domains using parameters like 'from' or 'to', saving hours of manual searching.

## How It Works

The bottom line is that you tell your AI client what task needs doing with temporary emails, and this MCP executes the complex API calls on your behalf.

1. Subscribe to this MCP on Vinkius and enter your Mailsac API key.
2. Connect the credentials to your preferred AI client (like Cursor or Claude).
3. Instruct your agent using natural language commands, telling it exactly which action to perform—for example, 'Reserve a new address for testing' or 'Extract the code from the last email.' 

## Frequently Asked Questions

**How does the Mailsac MCP work for testing?**
The agent first uses `reserve_new_address` to create an isolated, clean inbox. When your application sends a test email, the agent detects it in that specific address and retrieves the content using tools like `get_plain_text_body`.

**Can I search my entire Mailsac account history?**
Yes, you can use `search_account_messages` to query messages across all your addresses. This requires a paid tier but is essential for auditing old test data.

**Is the content I get from Mailsac safe to use in my code?**
Yes, since this MCP runs through controlled API calls on Vinkius, the extracted data is passed directly as a clean string or object to your agent, making it ready for your application logic.

**How do I delete an email message using Mailsac?**
You use the `delete_inbox_message` tool. You just need to specify which inbox and which message ID you want permanently removed, keeping your test data clean.

**Can I check what domains are available for my account?**
Absolutely. The `list_custom_domains` tool lets you see all the custom email domains that have been linked to your Mailsac account, helping you plan new test setups.