mcp-email-server
Read, search, file and send mail on any IMAP and SMTP account from an MCP client
Search, read and clear the test inbox of a local MailDev SMTP server from an MCP client
Official · MailDev TypeScript Local · stdio, Streamable HTTP CommunicationTesting
92 popularity score ★ 6.2k ↓ 8.3k/wk
Opens the app, which asks before it adds the server.
claude mcp add --transport http maildev http://localhost:1080/mcp{
"mcpServers": {
"maildev": {
"url": "http://localhost:1080/mcp"
}
}
}{
"servers": {
"maildev": {
"type": "http",
"url": "http://localhost:1080/mcp"
}
}
}[mcp_servers.maildev]
url = "http://localhost:1080/mcp"gemini mcp add --scope user --transport http maildev http://localhost:1080/mcpOpens the app, which asks before it adds the server.
claude mcp add maildev -- maildev-mcp{
"mcpServers": {
"maildev": {
"command": "maildev-mcp",
"args": []
}
}
}{
"mcpServers": {
"maildev": {
"command": "maildev-mcp",
"args": []
}
}
}{
"servers": {
"maildev": {
"type": "stdio",
"command": "maildev-mcp",
"args": []
}
}
}[mcp_servers.maildev]
command = "maildev-mcp"
args = []gemini mcp add --scope user maildev maildev-mcpMAILDEV_API_URL |
Optional: Base URL of the running MailDev REST API (default http://localhost:1080); stdio mode only. |
|---|---|
MAILDEV_API_KEY |
Optional: Key for the MailDev REST API when authentication is enabled; stdio mode only. |
MAILDEV_WEB_URL |
Optional: Base URL of the MailDev web interface used for message links; derived from the API URL when unset. |
MAILDEV_MCP |
Optional: Turns on the MCP endpoint at /mcp when starting MailDev itself (same as --mcp). |
MailDev is a local SMTP server for development: an application under test sends its mail to it, and MailDev keeps the messages in a web inbox instead of delivering them. Its MCP server, published as @maildev/mcp, gives an agent the same inbox, so it can find a message by sender, recipient, subject, date or text, read the whole message with its attachments, fetch the newest mail, and delete messages it no longer needs. Listings carry a link to each message in the MailDev web interface.
The typical use is in testing sign-up, password-reset or order flows: the agent triggers the flow, then pulls the verification link or token out of the mail that arrived. Besides the five tools it exposes the inbox, single messages and inbox statistics as resources, and ships four prompts for checking sign-up mail, password resets, content analysis and delivery.
There are two ways to run it. Starting MailDev with --mcp serves the MCP endpoint over HTTP at /mcp on the web port (1080 by default), reading the mail store directly; the makers recommend this way. The separate maildev-mcp command speaks stdio and talks to an already running MailDev instance through its REST API. The GitHub repository is the whole MailDev monorepo (SMTP server, REST API, React web interface, CLI); the MCP server is one package in it.
| Runtime | Node.js |
|---|
Node.js and a running MailDev instance (installed with npm install -g maildev, or the maildev/maildev Docker image). For the HTTP way MailDev must be started with --mcp; for stdio the @maildev/mcp package provides the maildev-mcp command, which needs the MailDev REST API reachable, plus an API key if authentication is on.
It only sees mail caught by MailDev; it cannot reach a real mailbox and has no tool to send or relay mail. Five tools only: search, get one, get latest, get attachment, delete. Search returns 20 results unless a limit is given. The makers mark it for development only: it has full access to the caught mail and should be bound to localhost and never exposed to the internet.
Developers who already catch their app's outgoing mail with MailDev and want an agent to check that test emails arrived and extract links or tokens during end-to-end work. It is published by the MailDev project itself and runs entirely on your machine with no account. It is not a client for real email: for Gmail, IMAP or other live inboxes pick a server built for that service. Since it can delete caught messages, keep that in mind where a shared MailDev inbox is used by a team.
maildev_search_emailsmaildev_get_emailmaildev_get_latest_emailmaildev_delete_emailmaildev_get_attachment