mailpit_mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mailpit_mcpget latest email for user@example.test"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mailpit_mcp
Model Context Protocol (MCP) server and HTTP client for Mailpit — local SMTP capture and inbox inspection for development and E2E testing.
Connects to a Mailpit instance on your machine (default http://127.0.0.1:8025). No cloud services, no stored credentials in this repository.
Requirements
Node.js 20+
A running Mailpit instance (Docker or binary)
Related MCP server: Email MCP Server
Install
git clone https://github.com/exabyteso/mailpit_mcp.git
cd mailpit_mcp
npm installEnvironment
Copy .env.example to .env locally (.env is gitignored). All configuration is optional:
Variable | Default | Description |
|
| Mailpit HTTP API base URL |
| — | Basic auth username (if enabled on Mailpit) |
| — | Basic auth password |
|
| HTTP request timeout |
Run the MCP server
npm startCursor / MCP client registration
Add to your workspace .cursor/mcp.json:
{
"mcpServers": {
"mailpit-local": {
"command": "node",
"args": ["src/index.mjs"],
"cwd": "/absolute/path/to/mailpit_mcp",
"env": {
"MAILPIT_URL": "http://127.0.0.1:8025"
}
}
}
}When mailpit_mcp is cloned next to another project (sibling under Projects/), you can use a relative cwd from that project's workspace root.
MCP tools
Tool | Description |
|
|
| Recent messages |
| Mailpit search query |
| Full message by ID |
| Latest mail to an address |
| Poll until a message matches |
| Parse verification code from body |
| Clear mailbox (test reset) |
Programmatic client
import { createMailpitClient, extractOtp } from 'mailpit-mcp/client';
const mailpit = createMailpitClient();
await mailpit.deleteAll();
const message = await mailpit.waitForMessage({
to: 'user@example.test',
timeoutMs: 10_000,
});
const code = extractOtp(message.Text ?? '');Tests
npm testUnit tests use fixtures only — no live Mailpit required.
Security
See SECURITY.md. This repo ships no secrets. Configure auth via environment variables on your machine only.
License
MIT — see LICENSE.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceProvides IMAP and SMTP capabilities, enabling developers to manage email services with seamless integration and automated workflows.14315BSD 3-Clause
- FlicenseNot gradedqualityBmaintenanceEnables email management for a single mailbox via IMAP and SMTP protocols. Supports reading, searching, and sending emails with threading support through stdio or HTTP transports.
- AlicenseBqualityDmaintenanceEnables interaction with Mailosaur email and SMS testing services, allowing message management, server configuration, file downloads, spam analysis, and TOTP code retrieval via natural language.29MIT
- AlicenseNot gradedqualityAmaintenanceOpen-source, self-hosted Inbox-as-a-Service API for AI agents. It enables agents to manage email inboxes, send/receive emails, search messages, and wait for replies via REST or MCP.27Apache 2.0
Related MCP Connectors
Analyze, audit, fix and diff HTML, MJML, Maizzle and React Email across 21 email clients.
Email for AI agents — send, receive as a webhook, manage domains, templates, routing.
Turn inbound email into a webhook — verify, parse, route, and store incoming messages.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/exabyteso/mailpit_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server