# MailFlat/mailflat-sdks [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/MailFlat/mailflat-sdks/tree/main/packages/mcp  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mailflat-mailflat-sdks

## Description
Email inboxes for agents, with the one-time code returned as a field instead of a regex over the message body. Addresses are permanent; only the messages expire, on a retention window you choose. uvx mailflat-mcp

## Tools
Capabilities this server exposes over MCP:

- **create_inbox** — Open an email inbox and return its address. Use this when you need an address to sign
    up for a service or to receive a one-time code.

    The address is permanent and stays until you delete it, so a test suite can reuse one
    address across runs instead of opening a new inbox each time. Only the messages inside
    expire, on the retention window you choose.

    `label` needs a paid plan; on free it is reported back in `ignored_fields`.
    `retention_hours` is optional (0 = your plan's max); requests above your plan are capped.
    `subdomain` picks the part after the @ on mailflat.net (`prefix@subdomain.mailflat.net`);
    it needs a paid plan and is random when omitted.
    `domain` opens the inbox on a custom domain instead (`prefix@acme.com`). Pass it ONLY when
    the user named a domain they have already verified on this account; never guess one. Leave
    it empty and the address is created on mailflat.net. `domain` wins over `subdomain`.
- **list_inboxes** — List all inboxes available to this API key.
- **read_messages** — Read messages in the given inbox address (newest first).

    `direction` is "in" for received mail (default), "out" for mail sent from this
    address, or "all" for both. Received mail is the default so that a reply you are
    waiting for is not confused with a message you just sent.
- **wait_for_otp** — Poll the inbox until an OTP code arrives (or timeout). Returns {otp_code, email}.
- **wait_for_message** — Poll the inbox until a new message ARRIVES (or timeout). Returns {email}.

    Only received mail counts, so you can send to a peer and then wait for their reply
    without matching your own outgoing message.
- **send_email** — Send an email FROM the given inbox address (DKIM-signed via MailFlat's MTA).
    Use for replies or outbound automation. `html` is optional.

    Returns once the mail is ACCEPTED for delivery, not once it is delivered: delivery
    runs on a queue and the result arrives via webhook or by reading the message back.

    `cc` addresses appear in the mail's headers; `bcc` addresses never do — not even in
    their own copy. Attachments are not available here; send those from the SDK.
- **reply** — Reply to a message so it stays in the SAME conversation.

    Prefer this over send_email when answering: it fills in the recipient, an `Re:` subject
    and the threading headers. A plain send_email starts a new conversation in the
    recipient's client, which does not look like a reply.
- **wait_until_sent** — Find out whether a mail you sent was actually delivered.

    send_email only means "accepted for delivery"; the mail goes out later on a queue. Call
    this with the message_id send_email returned to learn the outcome.

    Returns `delivered: true` once it went out. If it is still queued when the timeout
    elapses you get `timed_out: true` with `delivered: false` — that is NOT a failure and
    you must NOT send the mail again; the queue is still retrying. `status` tells you
    whether it has been attempted yet (`queued`) or attempted and rescheduled (`retrying`),
    and `error` carries what the last attempt reported. Permanent failure comes back the
    same way, as `status: failed` with the reason in `error` — read `note` before you
    resend anything.
- **mark_read** — Mark one message as read so later polls can skip it.
- **burn_inbox** — Delete every message in an inbox but KEEP the address.

    Use between scenarios: the address stays registered wherever you already used it.
- **delete_inbox** — Delete an inbox and all its messages by address. Irreversible.
- **delete_message** — Delete a single message in an inbox by its id (the inbox itself stays).
- **list_calendar_events** — List the meetings on an inbox's calendar, soonest first.

    Events come from calendar invitations this inbox received (Google Calendar, Outlook, ...).
    Each has an `id`, `title`, `start`/`end` in UTC, `organizer`, `attendees`, `status`
    ("confirmed" or "cancelled") and `my_status` (this inbox's answer: "needs-action",
    "accepted", "declined" or "tentative"). If the organizer moves a meeting, the event is
    updated in place and `my_status` goes back to "needs-action". Messages that carry an
    invitation also show it under `calendar_event` in read_messages.
- **rsvp_to_invite** — Answer a calendar invitation: response is "accepted", "declined" or "tentative".

    Sends a standard calendar reply email to the organizer, so their Google or Outlook
    calendar shows your answer. `event_id` comes from list_calendar_events (or
    `calendar_event.event_id` on a message). Call it ONCE per answer: the reply is queued like
    any email; use wait_until_sent with the returned `message_id` to confirm delivery.
- **create_calendar_event** — Schedule a meeting from this inbox and email the invitations (you are the organizer).

    Attendees get a normal invitation with Yes / No / Maybe buttons in Gmail, Outlook or Apple
    Calendar. Their answers show up in list_calendar_events under `attendees[].status`.
    `start`: ISO 8601 with an offset ("2026-10-06T14:00:00-04:00"), or without one plus
    `timezone` ("America/New_York"). Set `end` or `duration_minutes` (default 30 minutes).
    For an all-day event set all_day=true and use dates ("2026-10-06"); `end` is exclusive.
    `message` is a short note at the top of the invitation email. `in_reply_to` (a message's
    Message-ID) threads the invitation under an email you already exchanged.
    Call it ONCE per meeting: it emails every attendee. Normal send rules apply.
- **update_calendar_event** — Change a meeting this inbox organized; attendees get the updated invitation.

    Pass only what changes (empty = unchanged). Moving `start` keeps the duration. A new
    time resets every attendee's answer to "needs-action" (they are asked again). The same
    event is updated in their calendars, no duplicate. Invitations you RECEIVED cannot be
    changed here; answer those with rsvp_to_invite.
- **cancel_calendar_event** — Cancel a meeting this inbox organized; it disappears from every attendee's calendar.
- **get_calendar_feed** — Read-only subscribe link for this inbox's calendar, to give to a human.

    They add it in Google Calendar, Apple Calendar or Outlook and see this inbox's meetings
    there, with attendees and their answers. Calling again returns the SAME link, so sharing
    it twice never breaks a subscription. `subscribe_links` holds one-click add links per app.
    Google refreshes subscribed calendars every 8 to 24 hours; for live state use
    list_calendar_events.
    
- **rotate_calendar_feed** — Replace this inbox's calendar subscribe link; the old link stops working at once.

    Use only when the link leaked. Everyone subscribed has to add the new link.
    

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "mailflat-sdks": {
    "command": "uvx",
    "args": ["mailflat-mcp"],
    "env": {
      "MAILFLAT_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `MAILFLAT_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What MailFlat/mailflat-sdks MCP server does

MailFlat/mailflat-sdks exposes MailFlat email and calendar operations as MCP tools. Agents can create inboxes on `mailflat.net` or on a verified custom domain, inspect available inboxes, read received or sent mail, and wait for incoming messages. OTP polling returns the code and related email directly, avoiding the need to parse a message body with a regular expression.

An inbox address persists until it is deleted. Message retention is selected when an inbox is created, subject to the account plan. This makes an address suitable for repeated test runs or ongoing agent workflows. `burn_inbox` removes all messages while preserving the address, while `delete_inbox` removes the address and its messages permanently.

Calendar tools cover both invitations received by an inbox and meetings organized from it. Agents can list events, respond to invitations, create or update meetings, cancel meetings, and provide a read-only subscription link for human calendar applications.

## How it works

The server communicates with MailFlat through its Python SDK and exposes the resulting operations over MCP. Run it as a local stdio process with `uvx mailflat-mcp` or an installed `mailflat-mcp` executable, then register that command in an MCP client configuration.

Received mail is the default view for message reads and polling. This prevents an agent from treating its own outgoing message as the reply it is waiting for. `send_email` reports when MailFlat accepts a message for queued delivery, not when delivery completes; `wait_until_sent` can check the later result using the returned message ID. A timeout while delivery remains queued is not a reason to resend.

Calendar invitations are sent by email. Responses and event changes update the corresponding calendars, and RSVP operations should be called once per answer or meeting action.

## Setup and configuration

Provide a MailFlat account API key through `MAILFLAT_API_KEY`:

```bash
MAILFLAT_API_KEY=mf_live_… uvx mailflat-mcp
```

The package can also be installed with `pipx` and launched as `mailflat-mcp`. Configure the MCP client to run `uvx` with `mailflat-mcp` as its argument and pass the API key in the process environment. `MAILFLAT_API_URL` optionally overrides the default `https://mailflat.net` endpoint, including for self-hosted or bring-your-own-domain deployments.

## Tools and capabilities

- Create, list, read, mark, burn, and delete inboxes or individual messages.
- Wait for OTP codes or newly received messages.
- Send DKIM-signed email, reply within an existing thread, and inspect queued delivery outcomes.
- List calendar invitations and track attendee responses.
- Accept, decline, or tentatively respond to invitations.
- Create, edit, and cancel meetings from an inbox.
- Generate a reusable calendar subscription link or rotate it if exposed.
- Choose a MailFlat subdomain, verified custom domain, label, and retention period when supported by the account plan.

## Limitations and notes

Labels, custom subdomains, and retention choices are subject to the account plan. A custom domain must already be verified on the MailFlat account. Email attachments are not available through `send_email`; they must be sent through the SDK instead. Calendar feed subscribers may see updates with delay because Google refreshes subscribed calendars every 8 to 24 hours; `list_calendar_events` provides the live state. Rotating a feed immediately invalidates the previous link and requires subscribers to add the replacement.

_Full upstream README: https://allmcps.com/mcp/mailflat-mailflat-sdks/readme_

