Skip to main content
Glama
Postfleet MCP

Postfleet MCP

Postfleet MCP

Listed on mcpservers.org

Give an AI agent its own email address. Postfleet is email infrastructure for agents — inbound is parsed, classified, extracted to your schema, and screened for prompt injection before your agent reads a word.

This repo holds the server source and its plugin manifests. It is a mirror — the code is developed in the Postfleet application repo and published to npm as @postfleet/mcp; open issues here, send patches here, and they land upstream. The server ships two ways:

Hosted (no install)

https://api.postfleet.ai/api/mcp, streamable HTTP, Authorization: Bearer pf_...

Local (stdio)

@postfleet/mcp via npx

Get a pf_ API key at postfleet.ai.

Tools

list_mailboxes, create_mailbox, list_domains, create_domain, verify_domain, send_email, reply_email, list_inbox, read_email, wait_for_email — plus the draft lifecycle (create_draft, list_drafts, get_draft, update_draft, send_draft, delete_draft) for flows where a human approves before mail goes out. A send that lands in that gate returns 202 pending_approval, which is not a failure.

Every tool is thin-over-REST — it calls the same /api/v1/ endpoints your key already reaches (OpenAPI), so auth, scoping, and quotas are enforced once.

Related MCP server: Enterprise Mail MCP Server

Install

Cursor marketplace plugin

The manifests in this repo (mcp.json, .cursor-plugin/plugin.json) declare headers.Authorization = Bearer ${POSTFLEET_API_KEY} for the hosted server and the same variable for local npx @postfleet/mcp. Installing the plugin should prompt for that key and attach it as a real Bearer header — a raw URL add without the header will 401 on initialize until a key is supplied or the hosted connect card finishes OAuth.

Cursor (manual)

{
  "mcpServers": {
    "postfleet": {
      "url": "https://api.postfleet.ai/api/mcp",
      "headers": { "Authorization": "Bearer pf_your_key_here" }
    }
  }
}

Local stdio (npx -y @postfleet/mcp)

npx -y @postfleet/mcp

Any MCP client that speaks stdio can run that command with POSTFLEET_API_KEY set:

{
  "mcpServers": {
    "postfleet": {
      "command": "npx",
      "args": ["-y", "@postfleet/mcp"],
      "env": { "POSTFLEET_API_KEY": "pf_your_key_here" }
    }
  }
}

Claude Code

claude mcp add postfleet --env POSTFLEET_API_KEY=pf_your_key_here -- npx -y @postfleet/mcp

POSTFLEET_API_URL (default https://api.postfleet.ai) overrides the API origin for staging or self-hosted deployments.

Keys

Keys are scoped — bootstrap can only create mailboxes, api covers mail operations, mcp is the one to hand a client. Use a separate key per workload so you can revoke one without breaking the rest. Never commit a key; the manifests in this repo deliberately contain none.

Build from source

npm install && npm run build   # tsup → dist/

MIT licensed.

Available Tools

14 tools
create_draftAInspect

Prepare an email as a draft without sending it. Call this when you want to stage a message for later or for a human to review before it goes out — send it afterward with send_draft. Same fields as send_email, or omit to/subject and pass reply_to_message_id to draft a threaded reply. Returns the draft id with status "draft".

Inputs: text (required), mailbox_id (required), to, subject, +1 more.

create_mailboxAInspect

Create a NEW email mailbox this agent owns. Call this when list_mailboxes shows you have no suitable mailbox yet — mailboxes persist across sessions, so creating a second one for the same purpose strands mail in the first. Returns a working address immediately. Optional slug personalizes the address (agent-@...). To create the mailbox on a custom domain instead of the shared one (@yourdomain.com), pass a domain_id from list_domains — the domain must be verified.

Inputs: slug, domain_id, display_name, extraction_schema_id.

delete_draftA
DestructiveIdempotent
Inspect

Discard a draft by its id so it will never be sent. Call this when a staged or pending-approval message should be withdrawn — e.g. it is no longer needed or was created by mistake. A draft that is already sending or sent cannot be deleted.

Inputs: id (required).

get_draftA
Read-onlyIdempotent
Inspect

Read one draft in full by its id: recipient, subject, body text, and current status. Call this when you need the content of a specific draft — e.g. to review what is queued for approval after list_drafts, or before editing it with update_draft.

Inputs: id (required).

list_domainsA
Read-onlyIdempotent
Inspect

List the account's custom sending domains with their id, name, and verification status. Call this when you want to create a mailbox on a custom domain (pass the id of a verified domain as create_mailbox's domain_id), or to check whether a domain has finished verifying. Only status "verified" domains can host mailboxes; an empty list means only the shared platform domain is available.

Inputs: no named parameters.

list_draftsA
Read-onlyIdempotent
Inspect

List the open drafts in a mailbox (status draft, pending_approval, or sending), newest first. Call this when you need to see messages you have staged or that are queued waiting on human approval, e.g. after a send returned status "pending_approval".

Inputs: mailbox_id (required).

list_inboxA
Read-onlyIdempotent
Inspect

List recent messages in a mailbox, newest first, with comprehension status per message. Call this when checking what has arrived; use read_email for full content and extracted data.

Inputs: mailbox_id (required), limit.

list_mailboxesA
Read-onlyIdempotent
Inspect

List the mailboxes you can use, newest first, each with its id and email address. Call this when you need a mailbox_id for any other tool, or to check whether you already have a mailbox before creating one — it is usually the first call in a workflow. Returns every mailbox on the account, or just your own if your API key is scoped to a single mailbox. An empty list means you have none yet — use create_mailbox.

Inputs: no named parameters.

read_emailA
Read-onlyIdempotent
Inspect

Read one email in full: cleaned body, sanitization report (screened against known hidden-content patterns), classification, and data extracted to the mailbox schema. Call this when you need the content or extraction of a specific message.

Inputs: message_id (required).

reply_emailA
Idempotent
Inspect

Reply to an email you received. Call this when answering an existing message — recipient, subject, and conversation threading are derived automatically from the original. Pass a client_id (any unique string you make up) and reuse the SAME client_id if you retry after an error — that guarantees the reply is sent at most once. If the mailbox requires human approval, the reply is queued as a draft and returns {draft_id, status:"pending_approval"} instead of a message id — that is NOT a failure and must NOT be retried; it is sent once a human approves it (check with list_drafts).

Inputs: text (required), client_id (required), mailbox_id (required), reply_to_message_id (required).

send_draftA
Idempotent
Inspect

Send a draft you prepared, by its id. Call this when a staged draft is ready to go out. If the mailbox requires human approval, this returns 202 {draft_id, status:"pending_approval"} — the draft is queued for a human to approve, which is NOT a failure and must NOT be retried; it is sent once approved. Otherwise it sends immediately and returns the message id.

Inputs: id (required).

send_emailA
Idempotent
Inspect

Send a new email from one of your mailboxes. Call this when starting a NEW conversation; to answer an email you received, use reply_email instead (it threads correctly). Pass a client_id (any unique string you make up) and reuse the SAME client_id if you retry after an error — that guarantees the email is sent at most once. If the mailbox requires human approval, the send is queued as a draft and returns {draft_id, status:"pending_approval"} instead of a message id — that is NOT a failure and must NOT be retried; the email goes out once a human approves it (check with list_drafts).

Inputs: to (required), text (required), subject (required), client_id (required), +1 more.

update_draftA
Idempotent
Inspect

Edit the to, subject, or text of a draft that has not been sent yet — omitted fields keep their current value. Call this when a draft needs changes, e.g. a human declined to approve it and you are revising it. The reply target cannot be changed (create a new draft to reply to a different message), and a draft that is already sending or sent can no longer be edited.

Inputs: id (required), to, text, subject.

wait_for_emailA
Read-onlyIdempotent
Inspect

Block until a matching email arrives in a mailbox (or time out). Call this when you just sent an email and need the reply, or are expecting an inbound message — instead of polling list_inbox yourself. Returns the full message on match, or {timed_out:true}.

Inputs: mailbox_id (required), from_contains, timeout_seconds, subject_contains.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 14 tools

    Disambiguation5/5

    Each tool targets a distinct action on a distinct resource (mailbox, domain, email, draft). Very clear distinctions between send_email vs reply_email, and between create_draft vs send_email vs send_draft. No overlap.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (list_mailboxes, create_mailbox, send_email, read_email, etc.). The naming is predictable and easy to navigate.

    Tool Count5/5

    14 tools is well-scoped for an email server. Each tool covers a specific necessary operation (view mailboxes, send/reply, read emails, manage drafts) without excess.

    Completeness5/5

    The surface covers the full lifecycle: mailbox CRUD, domain lookup, email sending and replying, inbox browsing, reading, waiting for emails, and full draft management (create, list, get, update, send, delete). No obvious gaps.

    Maintenance

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to send and receive email with enforced security policies, scoped mailboxes, and human approval for external sending.
      15
      74 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to run real email operations across multiple IMAP/SMTP and provider OAuth accounts — syncing, searching, reading, drafting, attaching, and sending mail — while requiring explicit human approval for sending, deleting, or forwarding and recording an inspectable audit trail.
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Gives AI agents a real email inbox on the user's own domain, letting them read and search mail, draft and send or schedule replies, file messages, create addresses, and fix DNS records. Access is scoped to only the mailboxes the user explicitly grants.
      MIT