SendForAI

v0.1.2
com.sendforai/mcp Checked 3 days ago Published 16 days ago

Transactional and broadcast email at cost.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

generate_identity Generate an identity

Create an Ed25519 keypair. With a domain: returns the DNS TXT record to publish (SendForAI has no API keys; publishing this record is signing up). Without a domain: returns a sandbox identity that needs no DNS and can use the whole API against @simulator.sendforai.com right away; add a real domain to it later with add_domain or setup_dns. Store the private key in SENDFORAI_PRIVATE_KEY.

ParameterTypeDescription
domainstringA domain you control and will send from, e.g. example.com. Omit for a no-DNS sandbox identity.

create_connection_token Create a connection token

Mint a bearer token signed locally with this server's identity key, for clients that cannot sign requests: the hosted MCP server at https://sendforai.com/mcp, curl (Authorization: Bearer <token>), or no-code tools. Nothing is stored server-side; it expires after `days` (default 30, max 90). Treat it like a password.

ParameterTypeDescription
daysnumber

get_pricing Get pricing

Public, machine-readable pricing. Use it to compute cost before committing to a send.

get_domain_status Domain status

Identity, SES verification status, DNS records still needed, and current sending capacity for the configured domain.

verify_domain Verify domain with SES

Create the SES identity for a domain on this account (default: the configured identity domain) and return the DKIM and MAIL FROM records to publish. Idempotent; call again to re-check.

ParameterTypeDescription
domainstring

setup_dns Publish DNS records automatically

Publish every record a domain needs (identity or delegation TXT, DKIM CNAMEs, MAIL FROM MX/SPF, and DMARC if missing) using the operator's Vercel or Cloudflare token from this server's environment (VERCEL_TOKEN [+ VERCEL_TEAM_ID] or CLOUDFLARE_API_TOKEN). The token is used locally and never sent to SendForAI. Omit domain to set up the identity domain; pass another domain to add it to this account. Safe to repeat. If no token is configured, use get_domain_status / add_domain and hand the records to your operator instead.

ParameterTypeDescription
domainstring
wait_for_verificationboolean

list_domains List sending domains

Every domain this account can send from, with role (identity or delegated), status, SES status, warmup stage and daily cap.

add_domain Add a sending domain

Let this account send from another domain with the same key. First publish DNS TXT _sendforai.<domain> = "v=sfa1; delegate=<identity domain>" (if you have DNS access) or hand that record to your operator, then call this. If the record is not visible yet the response says exactly what to publish. Up to 50 domains, no fee; each keeps its own reputation and warmup.

ParameterTypeDescription
domain *string

get_capacity Sending capacity

How many emails can be sent right now: daily cap, sent today, remaining, warmup stage, and when the window resets.

get_usage Usage and cost this month

Emails sent this period, SES cost, what has been billed, included allowance remaining, and a projection to period end.

plan_email Plan an email (dry run)

Everything send_email does except sending. Returns cost, capacity after send, suppression hits, and lint warnings with fixes. Call this before send_email when cost or deliverability matters.

ParameterTypeDescription
from *stringSender address on the configured domain, e.g. hi@example.com or 'Name <hi@example.com>'
subject *string
to *Recipient address or list (max 50)
htmlstring
idempotency_keystringSafe retries: same key returns the original result
markdownstringMarkdown body. Rendered to responsive HTML plus a text part. Preferred.
max_cost_usdnumberRefuse if the billed cost would exceed this
reply_tostring
streamstring
textstring

send_email Send an email

Send a transactional email from the configured domain. Response includes id, cost, capacity, lint, and a signed receipt.

ParameterTypeDescription
from *stringSender address on the configured domain, e.g. hi@example.com or 'Name <hi@example.com>'
subject *string
to *Recipient address or list (max 50)
htmlstring
idempotency_keystringSafe retries: same key returns the original result
markdownstringMarkdown body. Rendered to responsive HTML plus a text part. Preferred.
max_cost_usdnumberRefuse if the billed cost would exceed this
reply_tostring
streamstring
textstring

upsert_contact Add or update a contact

Store a contact for broadcasts. Contacts are unlimited on every plan. Data is arbitrary JSON you can filter on later.

ParameterTypeDescription
email *string
dataobject
subscribedboolean

list_contacts List contacts

Page through contacts.

ParameterTypeDescription
cursorstring
limitinteger

create_broadcast Create a broadcast

Create a broadcast to subscribed contacts (optionally filtered by contact data). By default it waits for a human: the response includes approval_url. Hand that link to your operator; clicking it sends. Use dry_run to see recipients, cost, and lint first.

ParameterTypeDescription
from *string
subject *string
dry_runboolean
filterobjectMatch contacts whose data contains these keys, e.g. { plan: 'pro' }
htmlstring
markdownstring
max_cost_usdnumber
require_approvalbooleanDefault true. Set false only if your operator has already approved.
textstring

get_broadcast Get broadcast

Status, cost, approval_url (while awaiting approval), and progress (sent, queued, failed, cancelled, resumes_at) once sending starts.

ParameterTypeDescription
id *string

send_broadcast Send an approved broadcast

Starts sending an approved broadcast in the background (status: sending). Poll get_broadcast for progress. Large Member broadcasts continue after the daily cap resets. Returns a 409 with the approval_url if a human has not approved it yet.

ParameterTypeDescription
id *string

cancel_broadcast Cancel a broadcast

Cancel a broadcast before or during sending. Emails already sent stay sent; the unsent remainder is cancelled.

ParameterTypeDescription
id *string

import_contacts Import contacts

Bulk import up to 10,000 contacts per call, deduplicated by email. Available in a sending month; on the free build tier the error explains what to do.

ParameterTypeDescription
contacts *array

get_account Account, balance and budget

Balance, whether this month's $5 sending fee is paid, auto top-up, the monthly usage budget (used and remaining), emails used and included remaining, and every sending domain. Check this before a large send.

add_credit Add credit (human pays)

Returns a checkout_url for your human operator to add prepaid credit (minimum $10). Use it when a send returns balance_required. $5 is taken only in months you send to anyone outside your own domains (10,000 emails included), then $0.11/1k at cost. Pass auto_topup: true to let their saved card refill the balance automatically, always within the budget they set. Never pay it yourself; hand the link over. account.topped_up appears in list_events when they finish.

ParameterTypeDescription
amount_usdnumber
auto_topupboolean

set_budget Set the monthly usage budget

Lowering the budget applies immediately. Raising it returns an approval_url that only your human operator can approve; hand it over. Use when a send returns budget_exceeded.

ParameterTypeDescription
monthly_usd *number

set_auto_topup Auto top-up on or off

Turn auto top-up off, or change its amount. Turning it on requires a saved card from a human-completed add_credit.

ParameterTypeDescription
enabled *boolean
amount_usdnumber

billing_portal Billing portal link

A Stripe billing portal link for your operator: update the saved card and download receipts.

list_events Event log

Pull delivery, bounce, complaint, broadcast, and unsubscribe events by cursor. No webhook endpoint needed. Keep next_cursor between calls.

ParameterTypeDescription
cursorstring
limitinteger
typestring

whoami Configured identity

The identity this server acts as, how it authenticates, and whether it is a sandbox.