# Getpoststack MCP [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/getpoststack/mcp  
**GitHub Stars:** 1  
**npm Downloads (last month):** 127  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/getpoststack-mcp

## Description
EU-hosted email API exposed as MCP tools — send transactional and marketing email, manage contacts and segments, run broadcasts, render templates, and read analytics from Claude/Cursor. GDPR compliant, EU-only data residency (Germany + Finland). npx -y @poststack.dev/mcp.

## Tools
Capabilities this server exposes over MCP:

- **create_api_key** — Generate a new PostStack API key. The full key is returned ONCE in this response and cannot be retrieved again.
When to use: agent needs to provision credentials for a new integration. Pick "sending_access" for send-only keys (recommended for app servers) or "full_access" for management.
Returns: shaped key including the secret string — display it once and tell the user to store it securely.
Example: { name: "Backend prod", permission: "sending_access" }
- **list_api_keys** — List API keys (only the prefix is returned, never the full secret).
When to use: audit which keys exist, find a key id to revoke.
Not paginated — the API returns every key in one response.
Returns: { keys: [{ id, name, keyPrefix, permission, mode, ... }] }.
Example: {}
- **get_api_key** — Get an API key's metadata (the secret is never returned after creation).
When to use: confirm a key's permission, mode or last-used timestamp before revoking.
Returns: shaped key without secret.
Example: { id: 17 }
- **revoke_api_key** — Permanently revoke an API key — all subsequent requests using it will fail.
When to use: a key has leaked or is no longer needed. Confirm with the user — irreversible.
Returns: { success: boolean }.
Example: { id: 17 }
- **rotate_api_key** — Rotate an API key: issue a new secret and invalidate the old one. The new full key is returned ONCE in this response and cannot be retrieved again.
When to use: a key may be compromised, or you're on a scheduled rotation. The key id is unchanged; only the secret rotates — requests using the old secret fail immediately.
Returns: shaped key including the new secret string — display it once and tell the user to update their integration.
Example: { id: 17 }
- **create_broadcast** — Create a draft broadcast targeted at a segment, optionally scoped to a subscription topic.
When to use: agent has assembled a campaign body + segment id and wants to stage it for review or scheduled send. Created in "draft" status — call send_broadcast to dispatch. Pass topic_id (from list_subscription_topics) so contacts who opted out of that topic are skipped.
Returns: shaped broadcast (publicId, subject, status=draft, segmentPublicId, topicPublicId; recipient counts populate on send).
Example: { segment_id: "seg_abc", topic_id: "top_news", from: "Acme <hi@acme.io>", subject: "April update", html }
- **list_broadcasts** — List broadcasts.
When to use: find recent campaigns, audit which broadcasts were sent, or pick one to inspect with get_broadcast.
Returns: { items[], meta } — paginated shaped broadcasts with status and counts.
Example: { per_page: 20 }
- **get_broadcast** — Get a broadcast's details and aggregate delivery stats.
When to use: report on send results (delivered/opened/clicked/bounced) for a specific broadcast.
Returns: shaped broadcast (subject, status, recipient counts).
Example: { id: "bc_abc" }
- **update_broadcast** — Edit a draft broadcast in place. Only draft broadcasts can be updated.
When to use: tweak subject/body/segment/topic before sending or before the scheduled time.
Returns: shaped broadcast reflecting the new state.
Example: { id: "bc_abc", subject: "April update (revised)" }
Example: { id: "bc_abc", topic_id: null } — detach the topic.
- **send_broadcast** — Dispatch a draft broadcast to its segment immediately.
When to use: after the user has reviewed the staged broadcast and approved sending. The broadcast must be in "draft" status.
Returns: { success: boolean }.
Example: { id: "bc_abc" }
- **resend_broadcast** — Resend a sent broadcast to the subset that didn't open or didn't click — a fresh broadcast is created targeting an auto-built segment of those recipients.
When to use: lift engagement on an already-sent broadcast (e.g. a second touch to non-openers with a new subject line). The original broadcast must already be sent.
Returns: { broadcast: { id, subject, status }, segment: { id, name }, recipientCount }.
Example: { id: "bc_abc", target: "non_openers", subject: "Did you miss this?" }
- **cancel_broadcast** — Cancel a queued or sending broadcast.
When to use: stop a broadcast mid-flight. Already-delivered messages cannot be recalled.
Returns: { success: boolean }.
Example: { id: "bc_abc" }
- **broadcast_performance** — Get broadcast performance — either for one broadcast (variant breakdown if A/B) or for a leaderboard ranked by a chosen metric.
When to use: agent wants to find the best-performing broadcast in a date range, or drill into one broadcast's stats. Pass broadcast_id for single mode, or { since, best_metric } for leaderboard mode.
Returns: single mode → { broadcast: { id, subject, status, sent_at, total_recipients, delivered, opened, clicked, bounced, open_rate, click_rate }, variants: [...]|null }. Leaderboard → { metric, since, broadcasts: [...] } sorted by metric desc.
Example: { broadcast_id: "bc_abc" } — single mode.
Example: { since: "2026-03-01T00:00:00Z", best_metric: "click_rate", limit: 5 } — leaderboard mode.
- **find_non_clickers** — List contacts who received a broadcast but did NOT click any tracked link in it.
When to use: build a follow-up campaign to "people who saw it but didn't act". Pair with create_segment + send_broadcast (or send_email) to re-engage them.
Returns: { broadcast: { id, subject }, count, contacts: [{ id, email, first_name, last_name }] }.
Example: { broadcast_id: "bc_abc", limit: 500 }
- **create_contact_property** — Define a custom contact property (typed schema for the contact.properties field).
When to use: agent is extending the contact data model — e.g. add a "plan" or "company" field that other tools can filter on.
Returns: shaped property definition.
Example: { name: "plan", label: "Subscription Plan", type: "select", options: ["free","pro","scale"] }
- **list_contact_properties** — List all custom contact properties defined for this account.
When to use: discover which custom fields are available before creating/updating contacts.
Returns: { items: [property, ...] }.
Example: {}
- **update_contact_property** — Edit a custom contact property's label, options or required flag.
When to use: rename a label, expand the option list for a select, or toggle the required flag. Cannot change the type after creation.
Returns: shaped property.
Example: { id: 5, options: ["free","pro","scale","enterprise"] }
- **delete_contact_property** — Remove a custom contact property definition. Values already stored on contacts are left in place (they stay in each contact's properties; only the definition — its label, type and options — is deleted).
When to use: a property is unused and being retired. To clear the stored values too, update_contact each affected contact.
Returns: { success: boolean }.
Example: { id: 5 }
- **get_contact_activity** — Get a contact's recent email-event timeline grouped by event type (sent / delivered / opened / clicked / bounced / complained / failed).
When to use: investigate a specific contact's engagement history before sending — e.g. did they bounce on the last campaign, are they frequently opening, when did they last click. Pass email OR id; email triggers a lookup, id is direct.
Returns: { contact_id, email, total, events: { sent, delivered, opened, clicked, bounced, complained, failed, other } } where each is an array of { event_id, event_type, created_at, email_id, subject, from, geo_country, ua_client, is_prefetch, metadata }.
Example: { email: "ada@lovelace.io", limit: 20 }
- **get_engagement_summary** — Get a single contact's engagement summary: segment + lifetime counts + open / click rates + last open / click + top tags.
When to use: agent wants to qualify a contact before sending — e.g. "is Ada a frequent opener?", "should we exclude her from a re-engagement push?". Distinct from get_contact_activity which returns the raw timeline.
Returns: { segment, last_engaged_at, engagement_calculated_at, lifetime_sent, lifetime_delivered, lifetime_opened, lifetime_clicked, open_rate, click_rate, last_open, last_click, top_tags: [{ tag, count }] }.
Example: { email: "ada@lovelace.io" }
- **search_contacts** — Search contacts with filters (segment, engagement, unsubscribed) and a fuzzy query across email/first_name/last_name. Adds a match_reason on each row indicating which field matched the query.
When to use: agent needs to find a candidate set — e.g. "active contacts at @acme.io", "all dormant contacts", "people called Sarah". Use list_contacts for plain pagination without query, or use this when you need filtering or per-row match annotation.
Returns: { items: [shaped contact + match_reason], meta: { page, perPage, total, totalPages } }.
Example: { query: "ada", filters: { engagement_segment: "active" }, limit: 25 }
- **create_contact** — Create a new contact (person who can receive emails / broadcasts).
When to use: ingest a new signup, programmatic enrollment, or one-off addition. For bulk imports prefer the API import endpoint.
Returns: shaped contact (id, email, names, properties, createdAt).
Example: { email: "ada@lovelace.io", first_name: "Ada", properties: { plan: "pro" } }
- **list_contacts** — List contacts with optional search and segment filtering.
When to use: browse the contact book, find candidates by email/name fragment, or list members of a segment.
Returns: { items[], meta } — paginated shaped contacts.
Example: { search: "@acme.io", segment_id: "seg_xyz" }
- **get_contact** — Get full details of a contact by id.
When to use: inspect a specific contact's properties, subscription state, or last activity.
Returns: shaped contact with email, names, properties, unsubscribed flag, createdAt.
Example: { id: "con_abc123" }
- **update_contact** — Update an existing contact's name, properties, or subscription state.
When to use: keep the contact record in sync with your app (name change, plan upgrade, opt-out).
Returns: shaped contact reflecting the new state.
Example: { id: "con_abc123", properties: { plan: "scale" } }
- **delete_contact** — Permanently delete a contact (irreversible — use unsubscribe_contact for opt-outs).
When to use: GDPR erasure or removing a test contact. For unsubscribes, prefer unsubscribe_contact which preserves history.
Returns: { success: boolean }.
Example: { id: "con_abc123" }
- **unsubscribe_contact** — Mark a contact as unsubscribed from all email (preserves the contact record).
When to use: handle an unsubscribe request received outside PostStack (e.g. CS ticket, app preference).
Returns: { success: boolean }.
Example: { id: "con_abc123" }
- **get_contact_by_email** — Look up a contact by their email address.
When to use: agent has an email address (e.g. from a webhook, signup, or user message) and wants the full contact record without paginating list_contacts. Returns 404 if no contact exists with that email — use create_contact to add one.
Returns: shaped contact (id, email, names, properties, unsubscribed, createdAt).
Example: { email: "ada@lovelace.io" }
- **get_deliverability_signals** — Read ISP deliverability-intelligence signals for a sending domain.
When to use: inspect the latest Gmail Postmaster, Microsoft SNDS, and Yahoo/FBL feedback collected for a domain — e.g. to explain a deliverability dip or confirm spam-rate is healthy before a broadcast.
Returns: { domainId, signals[] (latest per provider/source/metric), gmailSpamRate, outlookHealth, fblComplaints30d }.
Example: { id: "dom_abc123" }
- **create_domain** — Add a new sending domain to PostStack.
When to use: a customer is onboarding a new sending domain. The response includes DNS records (SPF, DKIM, DMARC, return-path) the user must configure before verify_domain succeeds.
Returns: shaped domain with dnsRecords[] and pending status.
Example: { name: "send.acme.io", region: "eu-west-1" }
- **list_domains** — List sending domains.
When to use: choose which domain to send from, or audit which domains are verified.
Returns: { domains: [...] } — every domain on the team (not paginated), with status and tracking flags.
Example: {}
- **get_domain** — Get domain details including DNS records and verification status.
When to use: read DNS records to display, or check whether the domain is verified before sending.
Returns: shaped domain (status, dnsRecords[], tracking flags, verifiedAt).
Example: { id: 42 }
- **verify_domain** — Trigger DNS verification for a domain.
When to use: user has configured DNS records (SPF/DKIM/DMARC/return-path) and wants PostStack to re-check them. Returns the new status — "verified" means sending is unblocked.
Returns: shaped domain with updated status and per-record verified flags.
Example: { id: 42 }
- **update_domain** — Update domain settings (tracking, TLS, inbound, BIMI, sending stream).
When to use: toggle tracking on/off, switch TLS modes, enable inbound webhook receiving + catch-all routing, set BIMI logo, or pin a domain to a specific sending stream.
Returns: shaped domain with updated settings.
Example: { id: 42, click_tracking: false, tls_mode: "enforced", inbound_enabled: true }
- **delete_domain** — Permanently delete a sending domain (irreversible — historical email records remain).
When to use: a domain is being decommissioned. Confirm with the user first since future sends from any matching from-address will fail.
Returns: { success: boolean }.
Example: { id: 42 }
- **rotate_dkim_key** — Start a DKIM key rotation for a domain.
When to use: the signing key is old, or may have been exposed, and the customer wants a new one. Safe to call: a new keypair is generated under a NEW selector and staged; the domain keeps signing with its CURRENT key until the rotation is activated, so outbound mail is unaffected even if the rotation is never finished.
The response carries the TXT record to publish. Give the user pendingRecordName and pendingRecordValue verbatim. Once published, cutover happens automatically (or call activate_dkim_rotation).
Returns: { state, activeSelector, pendingSelector, pendingRecordName, pendingRecordValue, activatesAfter }.
Example: { id: 42 }
- **activate_dkim_rotation** — Cut over to the staged DKIM key, once its DNS record is published.
When to use: the user has published the new TXT record and does not want to wait for the automatic cutover. Fails (and changes nothing) if the record is missing or does not match the key PostStack generated.
By default PostStack waits ~30 minutes after first seeing the record, because it reads the domain's authoritative nameservers directly while receivers use recursive resolvers that may still be caching its absence. Pass force: true only if the user has confirmed the record resolves publicly — it skips that wait, never the check.
Returns: the rotation status after cutover, including retireAfter (keep the OLD record published until then).
Example: { id: 42 }
- **cancel_dkim_rotation** — Abandon a staged DKIM rotation and remove its DNS record.
When to use: the rotation was started by mistake, or the customer cannot publish the record. Safe at any point before cutover — the staged key was never signing anything, so nothing about outbound mail changes.
Returns: the rotation status (state back to idle).
Example: { id: 42 }
- **check_deliverability** — Check whether a from-address is safe to send from RIGHT NOW.
When to use: BEFORE sending agent-generated content from a non-default domain. Combines DNS verification (DKIM/SPF/DMARC), 30-day bounce + complaint rates, and the standard deliverability warnings (no plain-text body, link-domain mismatch, oversized HTML, etc.) into one response.
Returns: { from, domain, domain_verified, dkim, spf, dmarc, return_path, volume_30d, bounce_rate, complaint_rate, warnings[] }.
Rates cover routable recipients only — sends to reserved test domains (*.invalid, *.test, example.com) can never be delivered, so they are excluded from both sides of the ratio and reported as volume_30d.reserved_excluded.
Example: { from: "Acme <hi@acme.io>" }
- **validate_email** — Check whether an email address is safe to send to BEFORE create_contact or send_email.
Runs syntax → MX → disposable/role detection and returns a result + risk band.
When to use: a user just typed an address, a CSV is being imported, or an agent is about to add a contact. Cheap, real-time, no network egress beyond DNS.
Returns: { email, result: "deliverable"|"undeliverable"|"risky"|"unknown", risk: "low"|"medium"|"high", checks: { syntax, mx, disposable, role, free } }.
Example: { email: "user@example.com" }
- **validate_email_batch** — Validate up to 100 email addresses in a single call. Same checks as validate_email per address.
When to use: cleaning a freshly-imported list before bulk create_contact, or pre-screening a broadcast segment.
Returns: { results: [{ email, result, risk, checks: { syntax, mx, disposable, role, free } }, ...] } — same shape as validate_email per row, in input order.
Example: { emails: ["a@example.com", "b@example.com"] }
- **send_email** — Send a single transactional email immediately, or schedule it for a future time.
When to use: the agent has decided what to send (subject + html/text + recipients) and wants PostStack to deliver it. Run preview_email and lint_email first if the body was generated by the agent.
Signature: when "from" is one of this account's mailboxes and that mailbox has a signature, it is
appended automatically — do NOT retype the sender's name, title, phone or company into the body.
That duplication is what makes contact details drift. Pass signature:"none" to suppress it.
Returns: { id } — the new email id, suitable for get_email or cancel_email.
Example: { from: "Ada <ada@example.com>", to: ["new@user.io"], subject: "Welcome", html: "<p>Hi</p>" }
- **send_batch_emails** — Send multiple emails in a single batch request (up to 100 per call).
When to use: agent needs to send the same or different content to many recipients in one round-trip. For broadcasts to a saved segment use create_broadcast/send_broadcast instead.
Returns: { data: [{ id }, ...] } — one id per email in the order submitted.
Example: { emails: [{ from, to: ["a@x"], subject: "hi", html }] }
- **list_emails** — List previously-sent emails with optional filters and pagination.
When to use: triage delivery, look up a specific recipient's history, or filter by status/tag/date.
Returns: { items[], meta } — paginated emails with status, recipient, subject, timestamps.
Example: { status: "bounced", date_from: "2026-04-10" }
- **get_email** — Get full details and event timeline for a specific email by id.
When to use: investigate why one email failed/bounced, or confirm delivery for a single send.
Returns: shaped email record + events (queued, sent, delivered, opened, clicked, bounced).
Example: { id: "em_7kf2x9" }
- **cancel_email** — Cancel a scheduled email that has not yet entered the sending pipeline.
When to use: agent wants to recall a scheduled send before it goes out. Cannot cancel emails already delivered.
Returns: { success: boolean }.
Example: { id: "em_7kf2x9" }
- **reschedule_email** — Reschedule a scheduled email to a new send time.
When to use: a queued email needs its delivery time adjusted (e.g. send earlier/later in business hours).
Returns: { success: boolean }.
Example: { id: "em_7kf2x9", scheduled_at: "2026-04-18T09:00:00Z" }
- **lint_email** — Run a Rspamd-backed spam pre-flight on a draft email and return the score, action, and per-rule symbols.
When to use: BEFORE sending agent-generated content. The score (0–15+) and action (no_action / greylist / add_header / soft_reject / reject) tell you whether the message is likely to be filtered. Symbols list the specific rules that fired.
Returns: { score, action, symbols[], skipped, suggestions[] } — suggestions[] is derived from symbols whose score > 1.
Example: { from: "Acme <hi@acme.io>", to: ["a@b.io"], subject: "Welcome", html: "<p>hi</p>" }
- **preview_email** — Render + lint + measure an email in one shot WITHOUT sending it.
When to use: BEFORE send_email when the body was generated by the agent. Combines render_template (if template_id given), spam check, deliverability warnings, and size measurement so you only need one round-trip to know if it's safe to send.
Returns: { rendered_subject, rendered_html, rendered_text, size: { html_bytes, text_bytes }, spam: { score, action, symbols[], skipped }, warnings: [{ severity, code, message }] }.
Example: { from: "Acme <hi@acme.io>", to: ["a@b.io"], template_id: "tpl_welcome", variables: { first_name: "Ada" } }
- **list_inbound_emails** — List inbound emails received on this team's domains, newest first (one row per delivered-to recipient).
When to use: triage support inbox, find a recent message to inspect, or filter for messages needing reply.
Returns: { data: [...], meta: { page, perPage, total, totalPages } } — id (numeric; pass it to get_inbound_email), fromAddress, fromName, toAddress, subject, createdAt, spamVerdict, strippedReply, replyCount (replies already sent to it) per message. per_page defaults to 20 (max 100). A domain this team does not own returns an empty page.
DMARC/TLS-RPT aggregate reports are included unless reports: "exclude" — pass it when looking for mail from people.
Example: { per_page: 20, to: "support@acme.io", reports: "exclude" }
- **get_inbound_email** — Get a received inbound email's full headers and body.
When to use: read a specific message before drafting a reply (use draft_from_thread or reply_to_inbound_email next).
Returns: { inboundEmail: { …html/text body, headers }, replies: [{ id, subject, toAddresses, status, createdAt }] } — replies are the emails already sent in reply to it; check them before replying twice.
Example: { id: 7 }
- **list_inbound_email_attachments** — List attachments on an inbound email (filename, size, contentType).
When to use: decide whether to download attachments before forwarding or processing.
Returns: { items: [{ filename, contentType, size }] }.
Example: { id: 7 }
- **reply_to_inbound_email** — Send a reply to an inbound email (subject and threading headers are set automatically).
When to use: the agent has drafted a reply body and wants to dispatch it. Write ONLY the new reply text.
Quoting: the original is quoted under the reply automatically ("On <date>, <sender> wrote:" + the sender's
new text, without their own quoted history), so the recipient's client shows it as part of the thread.
A body that already quotes (e.g. draft_from_thread's suggested_html) is not quoted again. quote_original: false sends the body as written.
Signature: if "from" is a mailbox on this account with a signature, it is added automatically between the
reply and the quote (or where the body puts {{signature}}). Do NOT write the sender's name, title, phone or
company into the body — reconstructing an identity from memory on each reply is how it drifts out of step with the real one.
Sent folder: when "from" is a mailbox, a copy is saved to its Sent folder, threaded with the original in webmail.
Returns: { id } of the new outbound email.
Example: { id: 7, from: "support@acme.io", html: "<p>Thanks for reaching out…</p>", text: "Thanks for reaching out…" }
- **forward_inbound_email** — Forward an inbound email to other recipients with an optional cover note.
When to use: route a message to a teammate or another address.
Returns: { id } of the forwarded outbound email.
Suppressed addresses in to/cc/bcc are dropped, as for any send.
Example: { id: 7, from: "support@acme.io", to: ["dev@acme.io"], cc: ["lead@acme.io"], message: "FYI" }
- **draft_from_thread** — Build a reply-draft skeleton for an inbound email — proper threading, quoted original, salutation/sign-off, suggested from + subject. Heuristic only; the agent fills in the body text.
When to use: agent received an inbound email and wants to reply. Call this to get the draft scaffold, fill in body_placeholder with the actual reply, then call reply_to_inbound_email.
Returns: { inbound, suggested_from, suggested_subject, salutation, body_placeholder, quoted_html, quoted_text, threading: { in_reply_to, references }, suggested_html, suggested_text, signs_automatically }.
signs_automatically true means the sending mailbox has a stored signature and suggested_html/_text
carry a {{signature}} tag where it goes. Leave that tag alone and do NOT write a name, title, phone
number or company under the message — reconstructing those from memory is how they end up
contradicting the real ones, and the draft looks fine either way.
Example: { inbound_id: 7, tone: "friendly" }
- **create_mailbox** — Provision a mailbox (IMAP/SMTP inbox) on a verified domain.
When to use: agent is setting up a real human-readable inbox (e.g. support@acme.io). The password is required for IMAP/SMTP login. The domain must already be verified.
Returns: shaped mailbox with emailAddress and quotaBytes.
Example: { domainId: 42, localPart: "support", password: "<strong>", displayName: "Acme Support" }
- **list_mailboxes** — List mailboxes across all domains.
When to use: see which inboxes exist, find a mailbox id by email address.
Returns: { items[], meta } — paginated shaped mailboxes.
Example: { per_page: 50 }
- **get_mailbox** — Get a mailbox's metadata (status, quota, last login).
When to use: inspect a specific mailbox before updating or deleting.
Returns: shaped mailbox.
Example: { id: "mb_abc" }
- **update_mailbox** — Update a mailbox's display name, quota, status, webhook setting, auto-forwarding, or signature.
When to use: change ownership label, suspend a mailbox, raise quota, set up auto-forwarding, or give
the mailbox a sign-off.
Signature: signatureHtml + signatureText are appended to every message this mailbox sends, so the
identity data (name, title, phone, company) lives in ONE place instead of being retyped into each
message where it drifts. Set BOTH parts — the text one is what recipients on a plain-text client
read, and deriving it from the HTML gives them a worse sign-off than writing one. Do not include the
"-- " delimiter in signatureText; it is added on send. Inline CSS only, and never build a signature
out of only a logo image: most clients block remote images by default, so it renders as an empty box
where a text wordmark would still read. For dark mode, do not hard-code a near-black color on a
transparent background — it disappears. Pass null to clear either part.
The HTML is sanitised on write, so reading the mailbox back can return less markup than you sent.
Auto-forwarding: set forwardTo to one or more comma-separated addresses and every message this
mailbox receives is forwarded on automatically. Clear it (empty string or null) to stop.
forwardMode "relay" (default) reproduces the original exactly, same subject, same body, same
attachments, tracking suppressed, which is what a downstream system matching on subject or body
text needs. "wrapped" is the familiar mail-client style with a Fwd: subject and a quoted header
block: readable for a human, but it changes the text. forwardKeepCopy (default true) also
delivers to this mailbox, so it stays an archive of what passed through.
Loops are guarded: max 3 hops, never to itself, and auto-replies and bulk mail are never forwarded.
Returns: shaped mailbox with new state.
Example: { id: "mb_abc", forwardTo: "support@acme.io", forwardMode: "relay" }
- **list_mailbox_filters** — List a mailbox's server-side mail filters (Sieve rules), in the order they run.
When to use: before changing filters (set_mailbox_filters replaces the WHOLE set, so read it
first), or to explain why mail is landing in a folder or disappearing — a "discard" rule deletes
silently.
Returns: { rules: [{ publicId, position, name, field, operator, value, action, actionArg, enabled }] }.
Example: { id: "mb_abc" }
- **set_mailbox_filters** — Replace a mailbox's server-side mail filters. Runs on delivery, for every client.
When to use: file mail into folders on arrival, mark it read, or drop it. This REPLACES the whole
set — call list_mailbox_filters first and send the full list back with your change, or you delete
the other rules. Order matters: rules run top to bottom and a "stop" rule ends processing. Max 50.
An empty array removes every filter. "discard" deletes mail with no bounce and no copy; confirm with
the user before adding one.
Returns: { rules } as stored, with their positions.
Example: { id: "mb_abc", rules: [{ name: "Invoices", field: "subject", operator: "contains", value: "invoice", action: "fileinto", actionArg: "Accounting" }] }
- **delete_mailbox** — Permanently delete a mailbox and all its stored mail.
When to use: decommissioning a mailbox. IRREVERSIBLE — confirm with the user, mail is gone.
Returns: { success: boolean }.
Example: { id: "mb_abc" }
- **change_mailbox_password** — Reset a mailbox's IMAP/SMTP password.
When to use: rotate after suspected exposure, or onboarding handoff.
Returns: { success: boolean }.
Example: { id: "mb_abc", password: "<new strong>" }
- **suggest_from_address** — Suggest sensible from-addresses for a given purpose, drawn from the team's verified domains + existing mailboxes.
When to use: agent doesn't know which from-address to use. Pass the purpose ("transactional", "marketing", "support", "newsletter", etc.); the tool ranks options based on existing mailboxes (real inboxes) and conventional local-parts for the purpose.
Returns: { recommended: string|null, alternatives: string[], reasoning: string }.
Example: { purpose: "transactional" }
- **create_segment** — Create a static contact segment (manually-managed list).
When to use: agent needs a named bucket of contacts to send a broadcast to. Add members via add_contacts_to_segment.
Returns: shaped segment with id and contactCount=0.
Example: { name: "Spring 2026 launch" }
- **list_segments** — List contact segments.
When to use: pick a segment id for create_broadcast or list_contacts(segment_id=…).
Not paginated — the API returns every segment in one response.
Returns: { segments: [...] } — array of shaped segments with contactCount.
Example: {}
- **get_segment** — Get a segment's details and member count.
When to use: confirm a segment's contactCount before broadcasting (to estimate volume).
Returns: shaped segment (name, contactCount, createdAt).
Example: { id: "seg_abc" }
- **update_segment** — Rename an existing segment.
When to use: clean up segment names. Membership is unaffected.
Returns: shaped segment with new name.
Example: { id: "seg_abc", name: "Spring 2026 launch (final)" }
- **delete_segment** — Delete a segment definition. Contacts in it are NOT deleted.
When to use: remove an obsolete segment. Confirm with the user.
Returns: { success: boolean }.
Example: { id: "seg_abc" }
- **add_contacts_to_segment** — Add one or more contacts to a segment.
When to use: enroll specific contacts in an existing segment (e.g. agent built a list and wants to materialise it).
Returns: { added: number } or similar success indicator.
Example: { id: "seg_abc", contact_ids: ["con_1", "con_2"] }
- **remove_contact_from_segment** — Remove a single contact from a segment.
When to use: targeted removal (e.g. opt-out, manual exclusion). Does not delete the contact.
Returns: { success: boolean }.
Example: { id: "seg_abc", contact_id: "con_1" }
- **list_signup_forms** — List embeddable signup forms.
When to use: discover existing forms before creating a duplicate. Each form gets a publicId you can use in the embed snippet.
Returns: { items[], meta } — paginated forms with name, active flag, submission count.
Example: { per_page: 50 }
- **get_signup_form** — Get full details of a signup form including its fields, target segment, and submission count.
When to use: inspecting fields before embedding, or checking how many submissions a form has received.
Returns: shaped form with fields[], segmentId, topicId, submissionCount.
Example: { id: "sf_xyz789" }
- **create_signup_form** — Create an embeddable signup form. Submissions create a contact and optionally add them to a segment / subscription topic.
When to use: building a new lead-capture form for a landing page.
Returns: shaped form with publicId — use it in the embed code.
Example: { name: "Newsletter signup", segment_id: "seg_newsletter", fields: [{ name: "email", type: "email", label: "Email", required: true }] }
- **update_signup_form** — Update a signup form's fields, target segment/topic, messaging, or active state.
When to use: tweak the form without re-embedding. Set active=false to stop accepting new submissions while keeping the form.
Returns: shaped form with new state.
Example: { id: "sf_xyz789", active: false }
- **delete_signup_form** — Permanently delete a signup form. Embedded copies on existing pages will fail with 404.
When to use: retiring a form. Prefer update_signup_form with active=false if you might want to revive it.
Returns: { success: boolean }.
Example: { id: "sf_xyz789" }
- **create_subscription_topic** — Create a subscription topic (named opt-in/opt-out preference like "Product Updates").
When to use: agent is setting up granular preferences so contacts can subscribe per topic instead of all-or-nothing.
Returns: shaped topic.
Example: { name: "Product Updates", description: "Monthly product news" }
- **list_subscription_topics** — List all subscription topics defined for this account.
When to use: pick a topic_id for a broadcast, or audit which preferences exist.
Returns: { items: [topic, ...] } shaped.
Example: {}
- **delete_subscription_topic** — Permanently delete a subscription topic. Subscriptions are removed.
When to use: a topic is being retired. Confirm with the user.
Returns: { success: boolean }.
Example: { id: "top_abc" }
- **get_contact_subscriptions** — List a contact's explicit subscription-topic choices.
When to use: check whether a contact is subscribed to a specific topic before sending. Topics are opt-out: a topic with NO entry here means the contact IS subscribed; subscribed=false is an opt-out (topic-scoped broadcasts skip them).
Returns: { items: [{ topic_id (top_…), topic_name, subscribed, updated_at }] }.
Example: { contact_id: "con_abc" }
- **subscribe_contact_to_topic** — Opt a contact in to a subscription topic.
When to use: explicit user consent ("subscribe me to product updates").
Returns: shaped subscription record.
Example: { contact_id: "con_abc", topic_id: "top_abc" }
- **unsubscribe_contact_from_topic** — Opt a contact out of a subscription topic.
When to use: explicit user opt-out for a single preference (the contact remains in other topics and the global list).
Returns: shaped subscription record (subscribed=false).
Example: { contact_id: "con_abc", topic_id: "top_abc" }
- **list_suppressions** — List suppressed email addresses (will not receive any emails).
When to use: audit which addresses are blocked, or paginate to find a specific entry.
Returns: { items[], meta } — paginated suppressions with reason and createdAt.
Example: { per_page: 100 }
- **add_suppression** — Block an email address from receiving any future sends.
When to use: a recipient asked to be removed (manual), or you're importing prior bounces/complaints.
Returns: shaped suppression record.
Example: { email: "bouncy@aol.com", reason: "hard_bounce" }
- **remove_suppression** — Remove an address from the suppression list (sends will resume).
When to use: a previously-suppressed user has explicitly opted back in, or a bounce was a misconfiguration.
Returns: { success: boolean }.
Example: { email: "fixed@aol.com" }
- **create_template** — Create a new email template with {{variable}} placeholders.
When to use: store a re-usable email body the agent (or app) will send repeatedly. Newly created templates are unpublished — call publish_template before sending.
Returns: shaped template with id, version, published=false.
Example: { name: "welcome-v3", subject: "Welcome {{first_name}}", html: "<p>Hi {{first_name}}</p>" }
- **list_templates** — List email templates.
When to use: pick a template id for send_email or render_template, or audit which templates exist.
Returns: { items[], meta } — paginated shaped templates with name, version, published flag.
Example: { per_page: 50 }
- **get_template** — Get a template's full body, subject and variables.
When to use: read the source HTML/text before editing, or extract the variable list to know what to pass in.
Returns: shaped template with htmlBody, textBody, variables[], version.
Example: { id: "tpl_abc" }
- **update_template** — Update an existing template's name, subject, body or variable list.
When to use: edit a template in place. The template version is bumped on update.
Returns: shaped template with new version.
Example: { id: "tpl_abc", subject: "Updated subject" }
- **delete_template** — Permanently delete a template (irreversible).
When to use: an unused template should be removed. Confirm with the user — emails referencing this template_id will fail.
Returns: { success: boolean }.
Example: { id: "tpl_abc" }
- **publish_template** — Mark a template as published so it can be referenced by send_email.
When to use: after creating or editing a template you have validated and want available for sending.
Returns: shaped template with published=true.
Example: { id: "tpl_abc" }
- **unpublish_template** — Mark a template as unpublished so it cannot be sent.
When to use: hide a template from sending without deleting it (e.g. retiring a campaign while keeping history).
Returns: shaped template with published=false.
Example: { id: "tpl_abc" }
- **duplicate_template** — Create a copy of an existing template: new id, same subject/body/variables/editor blocks, named "Copy of <name>", version 1, unpublished.
When to use: agent wants to fork a template before editing so the original remains intact.
Returns: shaped new template (unpublished draft).
Example: { id: "tpl_abc" }
- **render_template** — Server-side render a template with the provided variables.
When to use: agent wants to preview the final subject/html/text before sending, or needs to inspect what variables a template requires. Returns missing_variables[] so the agent can prompt the user / fill in defaults.
Returns: { subject, html, text, missing_variables[], template_variables[] }.
Example: { template_id: "tpl_welcome", variables: { first_name: "Ada" } }
- **create_webhook** — Subscribe a URL to receive event notifications via signed POST requests.
When to use: agent is configuring an integration that needs to react to email/contact/domain events in real time.
Returns: shaped webhook with id, url, events[], active=true.
Example: { url: "https://hooks.acme.io/poststack", events: ["email.bounced", "email.complained"] }
- **list_webhooks** — List configured webhook endpoints.
When to use: audit which integrations are receiving events.
Returns: { webhooks: [...] } — every webhook on the team (not paginated).
Example: {}
- **get_webhook** — Get a webhook's details.
When to use: inspect the URL, event list, or active state for a specific webhook.
Returns: shaped webhook.
Example: { id: 17 }
- **update_webhook** — Edit a webhook's URL, event list, or enabled state.
When to use: rotate to a new endpoint, expand/narrow events, or temporarily disable.
Returns: shaped webhook with new state.
Example: { id: 17, enabled: false }
- **delete_webhook** — Permanently delete a webhook endpoint.
When to use: the integration is being removed. Confirm with the user — events will no longer be delivered.
Returns: { success: boolean }.
Example: { id: 17 }
- **test_webhook** — Send a test event to a webhook's URL to verify it's reachable and the signature verifies.
When to use: after creating or editing a webhook, confirm the endpoint accepts deliveries.
Returns: { success: boolean }.
Example: { id: 17 }
- **get_webhook_deliveries** — List recent delivery attempts for a webhook (status, response code, timestamps).
When to use: debug why an integration isn't receiving events — inspect failures before replaying.
Returns: { deliveries: [...], pagination: { page, perPage, total, totalPages } } — newest first.
Example: { id: 17, per_page: 50 }
- **replay_webhook_delivery** — Re-deliver a single past webhook delivery (e.g. one that failed because the endpoint was down).
When to use: after fixing the endpoint, replay the missed deliveries found via get_webhook_deliveries.
Returns: { success: boolean }.
Example: { id: 17, delivery_id: 9001 }
- **batch_replay_webhook_deliveries** — Re-deliver EVERY failed delivery for a webhook, oldest first.
When to use: the endpoint was down or broken for a period and the user wants the missed events back. This is the bulk version of replay_webhook_delivery — prefer it over looping, which would re-deliver out of order.
Successful deliveries are never re-sent, so this cannot duplicate events the user already processed. Capped at 1,000 per call; if the result's `remaining` is above zero, call again — do NOT report the backlog as cleared.
Returns: { replayed, remaining }.
Example: { id: 17, within_minutes: 120 }
- **rotate_webhook_secret** — Rotate a webhook's signing secret, keeping the old one valid for a grace window. The new secret is returned ONCE here.
When to use: on a scheduled rotation, or when the signing secret may be compromised.
Grace window: events dispatched after this call are signed with the new secret, and for graceHours (24 by default, max 168) they carry a second signature from the OLD one — so the consumer can deploy the new secret without dropping events in between. Pass graceHours: 0 for an immediate cutover, the right call when the secret actually leaked, since a grace window by definition keeps a compromised secret working for its duration.
Returns: shaped webhook plus the new signingSecret (shown once). previousSecretExpiresAt is when the old secret stops verifying; it is omitted when the cutover was immediate.
Example: { id: 17, graceHours: 0 }
- **list_workflows** — List all workflows (event-triggered automation pipelines) defined for this team.
When to use: discover existing automations before creating a new one, or audit what's currently active.
Returns: { items: [workflow, ...] } — each workflow has publicId, name, triggerType, status (draft/active/paused).
Example: {}
- **get_workflow** — Get a workflow's metadata and its graph (nodes + edges).
When to use: inspect the automation's structure (node config, how nodes are wired) before activating or editing.
Returns: shaped workflow plus nodes[] (each with public_id, type, config) and edges[]
  (from_public_id → to_public_id, with branch "match"/"no_match" out of condition nodes; null = unconditional).
Example: { id: "wf_abc123" }
- **create_workflow** — Create a new workflow (status=draft). Starts with a single trigger node and no other nodes.
When to use: start a new automation. Add nodes with add_workflow_node, wire branches with connect_workflow_nodes, then activate_workflow.
Returns: { workflow } — the created workflow row with publicId you'll use for subsequent graph calls.
Example: { name: "New-user onboarding", trigger_type: "contact.created" }
- **update_workflow** — Update a workflow's name, trigger type, or trigger config.
When to use: rename, switch trigger, or refine trigger filters. To edit the graph, use add_workflow_node, update_workflow_node, remove_workflow_node, and connect_workflow_nodes.
Returns: shaped workflow with new state.
Example: { id: "wf_abc123", name: "Renamed onboarding" }
- **delete_workflow** — Permanently delete a workflow, its graph (nodes + edges) and its run history. Only a draft or paused workflow can be deleted — an active one fails with 422 (pause_workflow first). Runs still in progress are deleted with it and take no further steps.
When to use: retiring an automation. Prefer pause_workflow to stop new runs while keeping the definition.
Returns: { success: boolean }.
Example: { id: "wf_abc123" }
- **add_workflow_node** — Add a node to a workflow's graph and (by default) wire it after an existing node.
When to use: building out the automation after create_workflow.
Node configs:
- send_email: { templateId: "tpl_..." } — sends the template to the contact.
- wait: { duration: <int>, unit: "hours"|"days" } — relative delay. Or wait until a time:
    { mode: "until", untilTime: "HH:MM" } (next occurrence, UTC) or { mode: "until", untilDate: "2026-01-02T09:00:00Z" }.
- condition: { field: "<name>", comparator: "equals"|"not_equals"|"contains"|"not_contains"|"is_set"|"is_not_set", value: "..." }.
    field is a top-level contact field (email/firstName/lastName/unsubscribed) or a property name.
    Branching is by EDGES, not config: wire the "match" and/or "no_match" outgoing edges with connect_workflow_nodes.
    A branch with no edge ends the run.
- webhook: { url: "https://..." } — POSTs contact + workflow JSON to an external URL (SSRF-guarded).
By default the new node is wired with an unconditional edge from `after_node` (or, if omitted, from the
sole open node — the trigger on a fresh workflow). Omit `after_node` for branches and wire edges yourself.
Returns: { public_id } — the new node id to reference in connect_workflow_nodes.
Example: { id: "wf_abc123", type: "send_email", config: { templateId: "tpl_welcome" } }
- **connect_workflow_nodes** — Add an edge between two nodes.
When to use: wiring condition branches, merging arms back together, or any explicit connection add_workflow_node didn't make.
- Unconditional edge (non-condition source): omit branch.
- Condition source: set branch to "match" (predicate true) or "no_match" (predicate false).
A node may have at most one unconditional out-edge; a condition at most one "match" and one "no_match".
Returns: { success: true }.
Example: { id: "wf_abc123", from: "wfn_cond", to: "wfn_email", branch: "match" }
- **update_workflow_node** — Replace a node's config. Cannot change its type or edges (use connect_workflow_nodes / remove_workflow_node).
When to use: tweak a template id, wait duration, or condition predicate without rebuilding the graph.
Returns: { success: true }.
Example: { id: "wf_abc123", node_id: "wfn_x", config: { duration: 1, unit: "hours" } }
- **remove_workflow_node** — Remove a node and every edge touching it. Confirm with the user first.
When to use: pruning a node from the automation. The trigger node cannot be removed; removing a node can disconnect downstream nodes — re-wire as needed.
Returns: { success: boolean }.
Example: { id: "wf_abc123", node_id: "wfn_x" }
- **activate_workflow** — Move a workflow from draft/paused to active so new trigger events start runs.
When to use: after steps are configured and you've verified the pipeline with a manual trigger.
Returns: the workflow with status="active".
Example: { id: "wf_abc123" }
- **pause_workflow** — Pause an active workflow so new trigger events DO NOT start runs. In-flight runs continue to completion.
When to use: temporarily stopping an automation without deleting it.
Returns: the workflow with status="paused".
Example: { id: "wf_abc123" }
- **trigger_workflow** — Start a run of a workflow for one contact. Only works on an ACTIVE workflow whose trigger_type is "manual" — any other trigger type, or a draft/paused workflow, fails with 422 (use post_workflow_event for "custom" workflows).
When to use: verifying a new manual pipeline end-to-end, or running an ad-hoc onboarding for a single contact.
Returns: { run } — the workflow run that was started (id, status, currentNodeId, …); check the contact's activity timeline for outcomes.
Example: { id: "wf_abc123", contact_id: "con_abc123" }
- **post_workflow_event** — Post an application-defined event, enrolling a contact into every ACTIVE workflow whose trigger is "custom" with a matching event name.
When to use: the user wants an automation driven by something their own app knows — an order placed, a trial expiring, a feature first used — rather than by contact.created / contact.subscribed. One call fans out to every workflow listening for that event; you do NOT need to know which.
The event name is matched EXACTLY and is case-sensitive. Identify the contact by contact_id (a "con_..." publicId) or by email.
ALWAYS report the returned `matched` count back to the user. Zero means the event was accepted and enrolled nobody — almost always a typo in the event name, or no active workflow configured for it. Do not describe a zero-match call as working.
Returns: { event, matched }.
Example: { event: "order.placed", email: "buyer@acme.io" }

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

```json
"mcpServers": {
  "getpoststack-mcp": {
    "command": "npx",
    "args": ["-y","@poststack.dev/mcp"],
    "env": {
      "POSTSTACK_API_KEY": "",
      "POSTSTACK_BASE_URL": "",
      "POSTSTACK_MCP_TRACE": ""
    }
  }
}
```

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

## Documentation

## What getpoststack/mcp does

The getpoststack/mcp MCP server exposes the PostStack Email API to MCP-compatible agents. It covers email delivery, contact records, templates, segments, broadcasts, workflows, and delivery or engagement data.

Email operations include immediate or scheduled sends, batches of up to 100 messages, delivery history, cancellation, rescheduling, spam pre-flight checks, and non-sending previews. Contact tools support lookup, fuzzy search, creation, updates, deletion, unsubscribe handling, segmentation, and activity or engagement summaries. Template tools manage variable-based content and can render, publish, unpublish, duplicate, or remove templates.

## How it works

An MCP client calls the server’s tools, prompts, and resources, while the server communicates with PostStack’s Email API. The package can run locally over stdio, or clients can connect to the hosted MCP endpoint at `https://api.poststack.dev/mcp` over HTTP. Authentication uses a PostStack API key supplied as a Bearer token for hosted connections or through the local process environment.

The workflow-oriented prompts add sequencing guidance rather than only exposing raw API operations. For example, the documented welcome-email flow checks a contact, selects a published template, renders it with contact properties, previews and lints the result, and sends only after the preview step passes. Other documented prompts address re-engagement, non-clicker follow-ups, broadcast summaries, and inbound triage.

## Setup and configuration

For local use, run `npx -y @poststack.dev/mcp` and set `POSTSTACK_API_KEY`. Claude Desktop, Cursor, and VS Code use the same JSON-style MCP configuration; Claude Code has a corresponding `claude mcp add` command. The package can print configuration snippets with `--print-config` for supported clients.

Hosted clients can point directly to `https://api.poststack.dev/mcp`, so no local package installation is needed. `POSTSTACK_BASE_URL` optionally changes the API origin, and `POSTSTACK_MCP_TRACE=1` writes per-tool-call NDJSON telemetry to stderr. API keys may use live or test prefixes according to the documented format.

## Tools and capabilities

The getpoststack/mcp MCP server can support tasks such as:

- Sending one email immediately, scheduling it, or submitting up to 100 messages in a batch.
- Previewing, rendering, measuring, and linting email without sending it.
- Checking one address or up to 100 addresses before sending or creating contacts.
- Reviewing contact events, engagement rates, segments, and recent activity.
- Creating and managing templates with `{{variable}}` placeholders.
- Creating draft broadcasts and managing their segment targeting.

The reference also lists broadcast performance, segment membership, and workflow graph operations. Irreversible contact or template deletion is distinct from unsubscribe behavior: unsubscribing preserves the contact record, while deletion removes it.

## Limitations and notes

A scheduled email can be cancelled only before it enters the sending pipeline. Broadcast updates apply to drafts, and workflow deletion is restricted by workflow state as described in the reference. The server requires a PostStack API key, and the hosted endpoint requires an MCP client that can connect over HTTP. Data residency and GDPR claims come from the project documentation; deployment, retention, and compliance requirements should be checked against the current PostStack terms and configuration.

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

