- Mockmail Email Debugging Mcp Server
Mockmail Email Debugging Mcp Server
<link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
<link href="/css/public.css" rel="stylesheet">
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="manifest" href="/site.webmanifest" />
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/favicon-de/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<meta name="saashub-verification" content="pe2z5lu1pdgx">
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css" rel="stylesheet">
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', () => {
// Tabs
document.querySelectorAll('[role=tablist] a').forEach(a => {
a.addEventListener('click', e => {
e.defaultPrevented = true;
e.preventDefault();
// Hide other tabs
document.querySelectorAll('.tab-pane').forEach(tab => {
tab.classList.remove('show');
tab.classList.remove('active');
});
// Mark tab link as active
document.querySelectorAll('[role=tablist] .nav-link').forEach(l => {
l.classList.remove('active');
});
a.classList.add('active');
let target = e.target.getAttribute('href');
let tab = document.querySelector(target);
tab.classList.add('show');
tab.classList.add('active');
return false;
});
});
// Dropdowns
document.querySelectorAll('[data-toggle=collapse]').forEach(a => {
a.addEventListener('click', e => {
e.defaultPrevented = true;
e.preventDefault();
let link = e.target.closest('a');
let collapseTargetId = link.getAttribute('href');
let collapseTarget = document.querySelector(collapseTargetId);
let svg = link.querySelector('svg');
if (collapseTarget.classList.contains('show')) {
svg.classList.remove('transform-rotate-90-deg');
collapseTarget.classList.remove('show');
} else {
svg.classList.add('transform-rotate-90-deg');
collapseTarget.classList.add('show');
}
return false;
});
});
const toggle = document.getElementById('navbar-toggle');
let isExpanded = false;
if (toggle) {
toggle.addEventListener('click', () => {
console.log('click!');
const navMenu = document.getElementById('navigation-menu');
isExpanded = !isExpanded;
const show = navMenu.classList.toggle('show');
toggle.setAttribute('aria-expanded', isExpanded);
});
}
});
</script>
Documentation
Comprehensive guide to integrating Mockmail's REST API and MCP Server into your workflow
<!-- REST API -->
<li class="nav-item">
<a class="nav-link parent" href="#rest-api">
<i class="bi bi-cloud-arrow-up"></i> REST API
</a>
</li>
<li class="nav-item">
<a class="nav-link child" href="#rest-overview">Overview</a>
</li>
<li class="nav-item">
<a class="nav-link child" href="#rest-api-keys">Generate API Keys</a>
</li>
<li class="nav-item">
<a class="nav-link child" href="#rest-endpoints">Endpoints</a>
</li>
<li class="nav-item">
<a class="nav-link child" href="#api-list-inboxes">List Inboxes</a>
</li>
<li class="nav-item">
<a class="nav-link child" href="#api-list-emails">List Emails</a>
</li>
<li class="nav-item">
<a class="nav-link child" href="#api-get-email">Get Email</a>
</li>
</ul>
</nav>
</div>
<!-- Main Content -->
<div class="col-md-9">
<div class="docs-content">
<!-- ============================================ -->
<!-- MCP SERVER SECTION -->
<!-- ============================================ -->
<h2 id="mcp-server">
<i class="bi bi-robot"></i> MCP Server
</h2>
<!-- MCP Overview -->
<h3 id="mcp-overview">Overview</h3>
<p>
The Model Context Protocol (MCP) server allows AI tools and coding agents, such as Claude Code, to access your Mockmail inboxes and emails.
</p>
<p>
This is particularly useful for AI assistants that need to verify and test emails automatically. Configure your application runtime to use your Mockmail virtual SMTP server and allow your coding agent to send emails from your development environment.
</p>
<p>
Mockmail safely captures all outgoing emails. Your AI coding agent can then autonomously inspect, verify, and debug those emails through the Mockmail MCP server.
</p>
<!-- MCP Installation -->
<h3 id="mcp-installation">Installation</h3>
<p>
To connect any AI coding agent to the Mockmail MCP Server, you first need to generate an API key.
</p>
<h4>1. Generate an API Key</h4>
<p>
Log in to your Mockmail account and navigate to <strong>API Keys</strong>. Click <strong>New API Key</strong> and give it a descriptive name.
Copy the token immediately, as it will not be displayed again.
</p>
<div class="alert alert-warning">
<i class="bi bi-exclamation-triangle"></i> <strong>Important:</strong> Store your API token securely.
It provides full access to your inboxes and emails. Never commit tokens to version control.
</div>
<h4>2. Connect Claude Code</h4>
<p class="mb-4">There are several ways to add the Mockmail MCP server to your Claude Code installation.</p>
<h5>Option 1: Using the CLI (Recommended)</h5>
<p>The easiest and fastest way is to open a terminal and run the following command:</p>
<pre><code><span class="hl-keyword">claude</span> <span class="hl-string">mcp add</span> <span class="hl-operator">--transport</span> <span class="hl-string">http</span> <span class="hl-string">mockmail</span> <span class="hl-string">https://mockmail.io/mcp/mockmail</span> <span class="hl-operator">\
--header "Authorization: Bearer your-token"
Replace your-token with your API token from the Dashboard.
<h5>Option 2: Manual Configuration in .claude.json</h5>
<p>Alternatively, you can add the MCP server manually to your personal Claude settings file <code>~/.claude.json</code>:</p>
<pre><code>{
"mcpServers": { "mockmail": { "type": "http", "url": "https://mockmail.io/mcp/mockmail", "headers": { "Authorization": "Bearer ${MOCKMAIL_API_KEY}" } } } }
Make sure to set your personal Mockmail API key as an environment variable named MOCKMAIL_API_KEY.
<h4>3. Project-Specific Configuration</h4>
<p>
The previous methods enable the MCP server globally for all your projects.
If you want to enable the MCP server only for a single project, create a <code>.mcp.json</code> file in your project directory with the following contents:
</p>
<pre><code>{
"mcpServers": { "mockmail": { "type": "http", "url": "https://mockmail.io/mcp/mockmail", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } } }
<!-- MCP Tools -->
<h3 id="mcp-tools">Available Tools</h3>
<p>The MCP server provides three tools:</p>
<!-- List Inboxes Tool -->
<h4><i class="bi bi-inbox"></i> list-inboxes</h4>
<p>Lists all inboxes accessible to the authenticated user.</p>
<h5>Parameters</h5>
<p class="text-muted">No parameters required</p>
<h5>Example Request</h5>
<pre><code>{
"jsonrpc": "2.0", "method": "tools/call", "params": { "name": "list-inboxes", "arguments": {} }, "id": 3 }
<h5>Example Response</h5>
<pre><code>{
"success": true, "count": 2, "inboxes": [ { "id": 1, "name": "Development Inbox", "username": "inbox_abc123", "email_count": 42, "email_limit": 100, "webhook_endpoint": "https://example.com/webhook", "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-03-07T14:22:00Z" } ] }
<h5 class="mt-4">Response Fields</h5>
<table class="table table-sm table-bordered">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>success</code></td>
<td>boolean</td>
<td>Indicates whether the request was successful</td>
</tr>
<tr>
<td><code>count</code></td>
<td>integer</td>
<td>Number of inboxes returned</td>
</tr>
<tr>
<td><code>inboxes</code></td>
<td>array</td>
<td>Array of inbox objects</td>
</tr>
<tr>
<td><code>inboxes[].id</code></td>
<td>integer</td>
<td>Unique inbox ID</td>
</tr>
<tr>
<td><code>inboxes[].name</code></td>
<td>string</td>
<td>Display name of the inbox</td>
</tr>
<tr>
<td><code>inboxes[].username</code></td>
<td>string</td>
<td>SMTP/IMAP username for the inbox</td>
</tr>
<tr>
<td><code>inboxes[].email_count</code></td>
<td>integer</td>
<td>Current number of emails in the inbox</td>
</tr>
<tr>
<td><code>inboxes[].email_limit</code></td>
<td>integer</td>
<td>Maximum number of emails allowed</td>
</tr>
</tbody>
</table>
<!-- List Emails Tool -->
<h4><i class="bi bi-envelope"></i> list-emails</h4>
<p>Lists emails from a specific inbox with optional pagination and search.</p>
<h5>Parameters</h5>
<table class="table table-sm table-bordered">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>inbox_id</code></td>
<td>integer</td>
<td>Yes</td>
<td>The ID of the inbox to retrieve emails from</td>
</tr>
<tr>
<td><code>offset</code></td>
<td>integer</td>
<td>No</td>
<td>Number of emails to skip (for pagination). Default: 0</td>
</tr>
<tr>
<td><code>limit</code></td>
<td>integer</td>
<td>No</td>
<td>Maximum number of emails to retrieve (1-100). Default: 10</td>
</tr>
<tr>
<td><code>query</code></td>
<td>string</td>
<td>No</td>
<td>Search query to filter emails by subject</td>
</tr>
</tbody>
</table>
<h5>Example Request</h5>
<pre><code>{
"jsonrpc": "2.0", "method": "tools/call", "params": { "name": "list-emails", "arguments": { "inbox_id": 1, "limit": 5, "offset": 0, "query": "password reset" } }, "id": 4 }
<h5 class="mt-4">Example Response</h5>
<pre><code>{
"success": true, "inbox_id": 1, "total": 42, "offset": 0, "limit": 5, "count": 5, "emails": [ { "id": 123, "subject": "Password Reset Request", "excerpt": "Click the link below to reset your password...", "date": "2024-03-07T10:30:00Z", "from_name": "Support Team", "from_address": "support@example.com", "to_address": "user@test.com", "read": false, "attachments": [] } ] }
<!-- Get Email Content Tool -->
<h4><i class="bi bi-file-text"></i> get-email-content</h4>
<p>Retrieves the full content of a specific email in HTML or plain text format.</p>
<h5>Parameters</h5>
<table class="table table-sm table-bordered">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>inbox_id</code></td>
<td>integer</td>
<td>Yes</td>
<td>The ID of the inbox containing the email</td>
</tr>
<tr>
<td><code>email_id</code></td>
<td>integer</td>
<td>Yes</td>
<td>The ID of the email to retrieve</td>
</tr>
<tr>
<td><code>format</code></td>
<td>string</td>
<td>No</td>
<td>Content format: "html" or "plain". Default: "html"</td>
</tr>
</tbody>
</table>
<h5>Example Request</h5>
<pre><code>{
"jsonrpc": "2.0", "method": "tools/call", "params": { "name": "get-email-content", "arguments": { "inbox_id": 1, "email_id": 123, "format": "html" } }, "id": 5 }
<h5 class="mt-4">Example Response</h5>
<pre><code>{
"success": true, "email": { "id": 123, "subject": "Password Reset Request", "from_name": "Support Team", "from_address": "support@example.com", "to_address": "user@test.com", "date": "2024-03-07T10:30:00Z", "read": false, "format": "html", "content": "<html><body><p>Click the link...</p></body></html>", "inbox": { "id": 1, "name": "Development Inbox" }, "attachments": [ { "id": 456, "cid": null, "filename": "invoice.pdf", "content_type": "application/pdf", "size": 45678 } ] } }
<!-- ============================================ -->
<!-- REST API SECTION -->
<!-- ============================================ -->
<h2 id="rest-api">
<i class="bi bi-cloud-arrow-up"></i> REST API
</h2>
<!-- REST Overview -->
<h3 id="rest-overview">Overview</h3>
<p>
The REST API provides HTTP endpoints for accessing your Mockmail data.
All endpoints are prefixed with <code>/api/v1</code> and require
authentication via Bearer token.
</p>
<h4>Base URL</h4>
<div class="endpoint">
https://mockmail.io/api/v1
</div>
<h4>Response Format</h4>
<p>All API responses are in JSON format with the following structure:</p>
<pre><code>{
"success": true, "data": { ... } }
<h4>Error Responses</h4>
<p>Error responses contain an error message:</p>
<pre><code>{
"success": false, "error": "Error description" }
<h4>HTTP Status Codes</h4>
<table class="table table-sm table-bordered">
<thead>
<tr>
<th>Code</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>200</code></td>
<td>Success</td>
</tr>
<tr>
<td><code>401</code></td>
<td>Unauthorized - Invalid or missing API token</td>
</tr>
<tr>
<td><code>403</code></td>
<td>Forbidden - No permission for this resource</td>
</tr>
<tr>
<td><code>404</code></td>
<td>Not Found - Resource does not exist</td>
</tr>
<tr>
<td><code>422</code></td>
<td>Validation Error - Invalid input parameters</td>
</tr>
</tbody>
</table>
<!-- REST API Keys -->
<h3 id="rest-api-keys">Generate API Keys</h3>
<p>
All API requests require authentication using Laravel Sanctum API tokens.
</p>
<h4>Create a Token</h4>
<ol>
<li>Log in to your Mockmail account at <a href="/app">/app</a></li>
<li>Navigate to <strong>Settings</strong> → <strong>API Keys</strong></li>
<li>Click <strong>"Create New API Key"</strong></li>
<li>Give your token a descriptive name (e.g., "Production Integration")</li>
<li>Copy the token immediately - it will only be shown once</li>
</ol>
<div class="alert alert-warning">
<i class="bi bi-exclamation-triangle"></i> <strong>Important:</strong> Store your API token securely.
It provides full access to your inboxes and emails. Never commit tokens to version control.
</div>
<h4>Use the Token</h4>
<p>Include your token in the <code>Authorization</code> header of all requests:</p>
<pre><code>Authorization: Bearer YOUR_API_TOKEN_HERE</code></pre>
<!-- REST Endpoints -->
<h3 id="rest-endpoints">API Endpoints</h3>
<!-- List Inboxes Endpoint -->
<h4 id="api-list-inboxes">
<span class="badge badge-method">GET</span> /api/v1/inboxes
</h4>
<p>Retrieves all inboxes accessible to the authenticated user.</p>
<h5 class="mt-4">Request</h5>
<pre><code>GET /api/v1/inboxes HTTP/1.1
Host: localhost:8000 Authorization: Bearer YOUR_API_TOKEN_HERE Accept: application/json
<h5 class="mt-4">Response</h5>
<pre><code>{
"success": true, "data": [ { "id": 1, "name": "Development Inbox", "email_count": 42, "email_limit": 100, "username": "inbox_abc123", "password": "secure_password", "email_username": "custom@mockmail.io", "enable_email_username": true, "webhook_endpoint": "https://example.com/webhook", "enable_webhook": true, "created_at": "2024-01-15T10:30:00.000000Z", "updated_at": "2024-03-07T14:22:00.000000Z" }, { "id": 2, "name": "Staging Inbox", "email_count": 15, "email_limit": 50, "username": "inbox_xyz789", "password": "another_password", "email_username": null, "enable_email_username": false, "webhook_endpoint": null, "enable_webhook": false, "created_at": "2024-02-01T08:15:00.000000Z", "updated_at": "2024-03-05T11:45:00.000000Z" } ] }
<h5 class="mt-4">cURL Example</h5>
<pre><code>curl -X GET https://mockmail.io/api/v1/inboxes \
-H "Authorization: Bearer YOUR_API_TOKEN_HERE"
-H "Accept: application/json"
<h5 class="mt-4">Response Fields</h5>
<table class="table table-sm table-bordered">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>id</code></td>
<td>integer</td>
<td>Unique inbox ID</td>
</tr>
<tr>
<td><code>name</code></td>
<td>string</td>
<td>Display name of the inbox</td>
</tr>
<tr>
<td><code>email_count</code></td>
<td>integer</td>
<td>Current number of emails in the inbox</td>
</tr>
<tr>
<td><code>email_limit</code></td>
<td>integer</td>
<td>Maximum number of emails allowed in the inbox</td>
</tr>
<tr>
<td><code>username</code></td>
<td>string</td>
<td>SMTP/IMAP username for this inbox</td>
</tr>
<tr>
<td><code>password</code></td>
<td>string</td>
<td>SMTP/IMAP password for this inbox</td>
</tr>
<tr>
<td><code>email_username</code></td>
<td>string|null</td>
<td>Custom email username if enabled</td>
</tr>
<tr>
<td><code>enable_email_username</code></td>
<td>boolean</td>
<td>Whether custom email username is enabled</td>
</tr>
<tr>
<td><code>webhook_endpoint</code></td>
<td>string|null</td>
<td>Webhook URL for email notifications</td>
</tr>
<tr>
<td><code>enable_webhook</code></td>
<td>boolean</td>
<td>Whether webhook notifications are enabled</td>
</tr>
<tr>
<td><code>created_at</code></td>
<td>string</td>
<td>ISO 8601 timestamp when the inbox was created</td>
</tr>
<tr>
<td><code>updated_at</code></td>
<td>string</td>
<td>ISO 8601 timestamp when the inbox was last updated</td>
</tr>
</tbody>
</table>
<!-- List Emails Endpoint -->
<h4 class="mt-5" id="api-list-emails">
<span class="badge bg-success badge-method">GET</span> /api/v1/inboxes/{id}/emails
</h4>
<p>Retrieves all emails from a specific inbox with optional pagination and search.</p>
<h5>URL Parameters</h5>
<table class="table table-sm table-bordered">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>id</code></td>
<td>integer</td>
<td>The ID of the inbox to retrieve emails from</td>
</tr>
</tbody>
</table>
<h5>Query Parameters</h5>
<table class="table table-sm table-bordered">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>offset</code></td>
<td>integer</td>
<td>No</td>
<td>Number of emails to skip (for pagination). Default: 0</td>
</tr>
<tr>
<td><code>limit</code></td>
<td>integer</td>
<td>No</td>
<td>Maximum number of emails to retrieve (1-100). Default: 10</td>
</tr>
<tr>
<td><code>query</code></td>
<td>string</td>
<td>No</td>
<td>Search query to filter emails by subject</td>
</tr>
</tbody>
</table>
<h5 class="mt-4">Request</h5>
<pre><code>GET /api/v1/inboxes/1/emails?limit=5&offset=0&query=password%20reset HTTP/1.1
Host: localhost:8000 Authorization: Bearer YOUR_API_TOKEN_HERE Accept: application/json
<h5 class="mt-4">Response</h5>
<pre><code>{
"success": true, "data": { "inbox_id": 1, "total": 42, "offset": 0, "limit": 5, "count": 5, "emails": [ { "id": 123, "subject": "Password Reset Request", "date": "2024-03-07T10:30:00Z", "from_name": "Support Team", "from_address": "support@example.com", "to_address": "user@test.com" } ] } }
<h5 class="mt-4">cURL Example</h5>
<pre><code>curl -X GET "https://mockmail.io/api/v1/inboxes/1/emails?limit=10&offset=0" \
-H "Authorization: Bearer YOUR_API_TOKEN_HERE"
-H "Accept: application/json"
<h5 class="mt-4">Response Fields</h5>
<table class="table table-sm table-bordered">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>inbox_id</code></td>
<td>integer</td>
<td>ID of the inbox the emails belong to</td>
</tr>
<tr>
<td><code>total</code></td>
<td>integer</td>
<td>Total number of emails available in the inbox (matching search query if provided)</td>
</tr>
<tr>
<td><code>offset</code></td>
<td>integer</td>
<td>Pagination offset used for the query</td>
</tr>
<tr>
<td><code>limit</code></td>
<td>integer</td>
<td>Maximum number of emails requested</td>
</tr>
<tr>
<td><code>count</code></td>
<td>integer</td>
<td>Number of emails returned in this response</td>
</tr>
<tr>
<td><code>emails</code></td>
<td>array</td>
<td>Array of email objects</td>
</tr>
<tr>
<td><code>emails[].id</code></td>
<td>integer</td>
<td>Unique email ID</td>
</tr>
<tr>
<td><code>emails[].subject</code></td>
<td>string</td>
<td>Email subject</td>
</tr>
<tr>
<td><code>emails[].date</code></td>
<td>string</td>
<td>ISO 8601 timestamp when the email was received</td>
</tr>
<tr>
<td><code>emails[].from_name</code></td>
<td>string</td>
<td>Sender display name</td>
</tr>
<tr>
<td><code>emails[].from_address</code></td>
<td>string</td>
<td>Sender email address</td>
</tr>
<tr>
<td><code>emails[].to_address</code></td>
<td>string</td>
<td>Recipient email address</td>
</tr>
</tbody>
</table>
<!-- Get Email Endpoint -->
<h4 class="mt-5" id="api-get-email">
<span class="badge bg-success badge-method">GET</span> /api/v1/emails/{id}
</h4>
<p>Retrieve a single email with all its details, including HTML/plain text content and attachments.</p>
<h5>Path Parameters</h5>
<table class="table table-sm table-bordered">
<thead>
<tr>
<th>Parameter</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>id</code></td>
<td>integer</td>
<td>The ID of the email to retrieve</td>
</tr>
</tbody>
</table>
<h5>Request Example</h5>
<pre><code>GET /api/v1/emails/123 HTTP/1.1
Host: mockmail.io Authorization: Bearer YOUR_API_TOKEN_HERE Accept: application/json
<h5 class="mt-4">Response</h5>
<pre><code>{
"success": true, "data": { "id": 123, "subject": "Password Reset Request", "date": "2024-03-15T14:30:00.000000Z", "from_name": "Support Team", "from_address": "support@example.com", "to_address": "inbox_abc123@mockmail.io", "inbox_id": 1, "html": "<html><body><p>Click here to reset your password</p></body></html>", "text": "Click here to reset your password", "attachments": [ { "id": 45, "filename": "logo.png", "content_type": "image/png", "size": 15234, "cid": "logo@example.com" } ] } }
<h5 class="mt-4">cURL Example</h5>
<pre><code>curl -X GET "https://mockmail.io/api/v1/emails/123" \
-H "Authorization: Bearer YOUR_API_TOKEN_HERE"
-H "Accept: application/json"
<h5 class="mt-4">Response Fields</h5>
<table class="table table-sm table-bordered">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>id</code></td>
<td>integer</td>
<td>Unique email ID</td>
</tr>
<tr>
<td><code>subject</code></td>
<td>string</td>
<td>Email subject</td>
</tr>
<tr>
<td><code>date</code></td>
<td>string</td>
<td>ISO 8601 timestamp when the email was received</td>
</tr>
<tr>
<td><code>from_name</code></td>
<td>string</td>
<td>Sender display name</td>
</tr>
<tr>
<td><code>from_address</code></td>
<td>string</td>
<td>Sender email address</td>
</tr>
<tr>
<td><code>to_address</code></td>
<td>string</td>
<td>Recipient email address</td>
</tr>
<tr>
<td><code>inbox_id</code></td>
<td>integer</td>
<td>ID of the inbox this email belongs to</td>
</tr>
<tr>
<td><code>html</code></td>
<td>string|null</td>
<td>HTML content of the email (if available)</td>
</tr>
<tr>
<td><code>text</code></td>
<td>string|null</td>
<td>Plain text content of the email (if available)</td>
</tr>
<tr>
<td><code>attachments</code></td>
<td>array</td>
<td>Array of attachment objects</td>
</tr>
<tr>
<td><code>attachments[].id</code></td>
<td>integer</td>
<td>Unique attachment ID</td>
</tr>
<tr>
<td><code>attachments[].filename</code></td>
<td>string</td>
<td>Name of the attachment file</td>
</tr>
<tr>
<td><code>attachments[].content_type</code></td>
<td>string</td>
<td>MIME type of the attachment (e.g., "image/png", "application/pdf")</td>
</tr>
<tr>
<td><code>attachments[].size</code></td>
<td>integer</td>
<td>Size of the attachment in bytes</td>
</tr>
<tr>
<td><code>attachments[].cid</code></td>
<td>string</td>
<td>Content-ID for inline attachments (used in HTML emails)</td>
</tr>
</tbody>
</table>
<h5>Error Responses</h5>
<table class="table table-sm table-bordered">
<thead>
<tr>
<th>Status Code</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>401</code></td>
<td>Unauthorized - Invalid or missing API token</td>
</tr>
<tr>
<td><code>403</code></td>
<td>Forbidden - You don't have permission to access this email</td>
</tr>
<tr>
<td><code>404</code></td>
<td>Not Found - Email does not exist</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
Server Config
{
"mcpServers": {
"mockmail": {
"type": "http",
"url": "https://mockmail.io/mcp/mockmail",
"headers": {
"Authorization": "Bearer ${MOCKMAIL_API_KEY}"
}
}
}
}