mcpField
M
MailFlat

MailFlat

Local
mailflat.netCommunication0Updated 3w ago

About MailFlat

MailFlat SDKs provide code-owned email inboxes for AI agents and automated test suites. Permanent addresses, configurable message retention, and one-call OTP retrieval support flows that need email verification.

Key features

  1. 01Create persistent email inboxes
  2. 02Retrieve OTPs with a wait operation
  3. 03Choose message retention windows
  4. 04SDKs for Python, JavaScript, Java, and agent frameworks

Use cases

  1. 01Read signup codes in Selenium tests
  2. 02Automate email verification in pytest or Playwright
  3. 03Give an AI agent an inbox for receiving and sending mail

MCP support

The `mailflat-mcp` package provides MailFlat access over MCP for AI assistants such as Claude and Cursor.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"mailflat-mailflat": {
"command": "uvx",
"args": [
"mailflat-mcp"
],
"env": {
"MAILFLAT_API_KEY": "<MAILFLAT_API_KEY>",
"MAILFLAT_API_URL": "<MAILFLAT_API_URL>"
}
}
}
}
Run commanduvx mailflat-mcp
Environment variables to set
MAILFLAT_API_KEYSecretMailFlat API key. Create one in the dashboard under Agents.
MAILFLAT_API_URLOverride the API base URL. Defaults to https://mailflat.net.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypimailflat-mcp0.9.2

Tools

12

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
labelstringNo
prefixstringNo
retention_hoursintegerNo

Details

From the project README

MailFlat SDKs

Official client libraries for MailFlat: email inboxes your code owns, with one-line OTP retrieval. Built for test suites (Selenium, pytest, Playwright) and AI agents.

Addresses are permanent, so a suite does not need a fresh one per run. Only the messages expire, on a retention window you choose.

This repo holds only the open-source SDKs. The MailFlat service itself is closed-source.

Packages

PackageForInstall
mailflatPythonpip install mailflat
@mailflat/sdkJavaScript / TypeScriptnpm i @mailflat/sdk
mailflat-mcpAI assistants (Claude, Cursor) — MCPuvx mailflat-mcp
@mailflat/ai-sdkVercel AI SDK agentsnpm i @mailflat/ai-sdk
mailflat.langchainLangChain agentspip install "mailflat[langchain]"
mailflat-sdk (Java)Java / Seleniumvia JitPack — see below

Each client is a thin, typed wrapper over the same /api/v1 Agent API, so they behave identically. Authenticate with your account key (mf_live_…) from the dashboard (Agents → API keys).

Java / Selenium (JitPack)

JitPack derives the groupId from the GitHub owner. This repo moved to the official MailFlat account in August 2026, so releases from v0.4.4 on publish as com.github.MailFlat:mailflat-sdks. Earlier versions still resolve under the old coordinate com.github.onderyentar21:mailflat-sdks; the old repo stays up for them. The client is moving to Maven Central (net.mailflat) next, which ends the owner coupling.

<repositories>
  <repository><id>jitpack.io</id><url>https://jitpack.io</url></repository>
</repositories>

<dependency>
  <groupId>com.github.MailFlat</groupId>
  <artifactId>mailflat-sdks</artifactId>
  <version>v0.8.1</version>
</dependency>
MailFlat mf = new MailFlat("mf_live_…");
Inbox inbox = mf.create("signup");
driver.findElement(By.id("email")).sendKeys(inbox.address());
String otp = inbox.waitForOtp(30);          // polls until the code arrives
driver.findElement(By.id("code")).sendKeys(otp);

Quick examples

Python

from mailflat import MailFlat
mf = MailFlat(api_key="mf_live_…")
inbox = mf.create(label="signup")
otp = inbox.wait_for_otp(timeout=30)

JavaScript / TypeScript

import { MailFlat } from "@mailflat/sdk";
const mf = new MailFlat({ apiKey: process.env.MAILFLAT_API_KEY });
const inbox = await mf.create({ label: "signup" });
const otp = await inbox.waitForOtp({ timeout: 30000 });

License

MIT. The full text is in LICENSE at the repository root; each package directory carries an identical copy.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.