MailFlat

السجل الرسمي أدوات المطورين

Real email inboxes for AI agents: open an address, read the one-time code, send mail.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package mailflat-mcp
Claude Code
claude mcp add mailflat -e 'MAILFLAT_API_KEY=<your mailflat_api_key>' -e 'MAILFLAT_API_URL=<MAILFLAT_API_URL>' -- uvx mailflat-mcp==0.9.2
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "mailflat": {
            "command": "uvx",
            "args": [
                "mailflat-mcp==0.9.2"
            ],
            "env": {
                "MAILFLAT_API_KEY": "<your mailflat_api_key>",
                "MAILFLAT_API_URL": "<MAILFLAT_API_URL>"
            }
        }
    }
}

متغيرات البيئة

  • MAILFLAT_API_KEY إلزامي سري MailFlat API key. Create one in the dashboard under Agents.
  • MAILFLAT_API_URL Override the API base URL. Defaults to https://mailflat.net.

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. MailFlat SDKs
  2. Packages
  3. Java / Selenium (JitPack)
  4. Quick examples
  5. License

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.

الأسئلة الشائعة

ما هو MailFlat؟

Real email inboxes for AI agents: open an address, read the one-time code, send mail.

كيف أثبّت MailFlat؟

يعمل على جهازك. في Claude Code: claude mcp add mailflat -e 'MAILFLAT_API_KEY=<your mailflat_api_key>' -e 'MAILFLAT_API_URL=<MAILFLAT_API_URL>' -- uvx mailflat-mcp==0.9.2. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج MailFlat إلى مفتاح API؟

نعم. يتطلب MAILFLAT_API_KEY، وتضبطها في إعداداته.

هل MailFlat مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون MailFlat؟

ينشره MailFlat. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.