mcp
UnexploredEmail infrastructure for AI agents: send, read replies as threads, campaigns, per-key limits.
Install
Terminal
$npx -y @sendraven/mcpmcp_config.json
{
"mcpServers": {
"ai-sendraven-mcp": {
"env": {
"SENDRAVEN_API_KEY": "${SENDRAVEN_API_KEY}"
},
"args": [
"-y",
"@sendraven/mcp"
],
"command": "npx"
}
}
}Documentation
@sendraven/mcp
The SendRaven MCP server. Send email, read replies as threads, run campaigns and automations, and decide approvals, from any client that speaks the Model Context Protocol.
SendRaven is email infrastructure for AI agents. Agents use it over REST or MCP to run real email conversations: sending, reading replies as threads, and running campaigns and automations, within limits and approvals set on the API key. It is priced per email sent, never per contact.
Install
Claude Code, remote server, signs in with OAuth on first use:
claude mcp add --transport http sendraven https://mcp.sendraven.ai/mcp
Claude Code, as a plugin (signs in with OAuth on first use):
/plugin marketplace add CommonNinja/sendraven-mcp-server
/plugin install sendraven@sendraven
Gemini CLI, as an extension (signs in with OAuth on first use):
gemini extensions install https://github.com/CommonNinja/sendraven-mcp-server
Cursor, Claude Desktop, and other clients with a JSON config:
{
"mcpServers": {
"sendraven": {
"url": "https://mcp.sendraven.ai/mcp"
}
}
}
Any client, as a local process. Create an API key under Developers in the dashboard, then:
claude mcp add sendraven -e SENDRAVEN_API_KEY=sk_live_… -- npx -y @sendraven/mcp
{
"mcpServers": {
"sendraven": {
"command": "npx",
"args": ["-y", "@sendraven/mcp"],
"env": { "SENDRAVEN_API_KEY": "sk_live_…" }
}
}
}
Remote server with a key instead of OAuth, for an agent running unattended:
{
"mcpServers": {
"sendraven": {
"url": "https://mcp.sendraven.ai/mcp",
"headers": { "Authorization": "Bearer sk_live_…" }
}
}
}
Give an agent's key a daily send limit, a recipient allowlist, or an approval hold. The tools respect all three, campaigns included: a key with an approval hold or an allowlist cannot start a campaign, and a key with a daily limit can start one only if its recipients fit what is left of the day. See Limits for agents.
Behaviour worth knowing
- A held send is not a failure. When a key requires approval,
send_emailreturnspending_approvalwith an id. Report that it awaits a person; do not retry. - Out of plan is 402, not 429.
get_usagereports plan, usage and remaining, so an agent can say "you are near your limit" before a batch. - Two calls cannot be undone.
send_broadcastmails an audience; runpreview_broadcastfirst.remove_suppressionlets us mail an address that bounced or complained. Neither is a way to fix a failed send. - Approvals are decided by a person.
decide_approvalanswers 403 when the client signed in with OAuth, when the key drafted the message, and when the key has any guardrail. Use the dashboard, or a key without guardrails. - Retry sends with the same
idempotency_key, and only for the identical message. A retry replays the first answer instead of sending twice; the same key with different arguments is refused withidempotency_key_reusedand nothing is sent. - A failed call returns the API's own message with its HTTP status and error
type, so "No verified transactional sending domain for …" comes back as
those words with
HTTP 422 no_verified_identity, and a missing template variable lists the names inmissing. Types mean the same thing on every tool; see Errors.
Tools
77 tools, generated from the server's registry.
| Tool | What it does |
|---|---|
send_email | Send a transactional email, immediately or scheduled. scheduled_at takes a relative phrase like 'in 3 days' or an ISO timestamp. The From domain must already be verified. Every accepted send answers with the same fields: id, status, thread_id, scheduled_at, skipped, reason and approval_id. skipped: true (status 'rejected', with reason) means every recipient was suppressed or opted out and nothing was sent; a retry answers the same. status 'pending_approval' (with approval_id) means a person must release it; a retry does not release it. Otherwise skipped is false and reason and approval_id are null. idempotency_key makes a retry of the identical message safe; it matches only the identical message. Refusals, by type: 422 no_verified_identity (the From domain has no verified sending domain; a retry answers the same until it is added and verified); 422 invalid_request (a bad field, or more than 50 recipients across to, cc and bcc, which fit as separate messages or a campaign); 422 unknown_topic; 422 invalid_schedule; 403 recipient_not_allowed (this key's allowlist); 429 daily_limit (this key's daily cap; it resets tomorrow, and a retry today answers the same); four billing refusals, all 402 and none retryable — plan_limit_reached (the Free plan's 3,000 emails a month are spent; a person has to activate paid sending), payment_method_required (the workspace has never had a payment method verified, so no outbound email leaves it at all, including on Free; only a person can add one, in the dashboard), billing_past_due (the payment failed for good) and budget_exceeded (the workspace's own spend ceiling; by default it stops marketing and lets transactional through); 422 workspace_suspended and 422 no_postal_address (a person has to act). 502 ses_error is the provider, and a later retry with the same idempotency_key is safe. get_usage shows which of these applies before a send, and apart from ses_error none clears by repeating the call. |
list_emails | List messages newest first with their delivery status, including held, scheduled, skipped and failed ones and the mail campaigns and automations sent. Filter by status, recipient or tag. Paged: at most 100 per call; while has_more is true, next_cursor passed back as cursor with the same filters returns the next page. An unknown status is refused with 422 invalid_request rather than answering an empty log. |
get_email | Fetch one message with its full event timeline (send, delivery, bounce, complaint, open, click). The timeline shows why an email didn't arrive. |
cancel_scheduled_email | Cancel a scheduled email before it sends. Only works while status is 'scheduled': a message that has already started sending, or is in any other state, answers 409 invalid_state naming its status; a retry answers the same, and get_email shows where it stands. An unknown id answers 404 not_found. |
update_email_tags | Add or remove tags on an email already sent, scheduled or held, to refile it for the tag filters of list_emails and list_threads. Removals apply first, then additions, so one call swaps a tag: remove_tags [{name:'recovery_case'}] (no value: every tag with that name) with add_tags [{name:'category', value:'billing-recovery'}]. The thread and the dashboard's tag suggestions follow. Changes only what SendRaven stores, not what the provider already saw. Safe to repeat. Answers the email as get_email does. broadcast_id, set on campaign mail, cannot be changed (422 invalid_request), nor can a message end with more than 10 tags. An unknown id answers 404 not_found. |
list_sending_domains | List sending domains with their verification status and the DNS records each one needs. Each record shows what is currently published, so this diagnoses a stuck verification. mail_from says whether SES has adopted the bounce. subdomain as the Return-Path: pending while SES polls for its MX record, then active. SES polls for 72 hours from when the domain was added, not from when the MX appears, and then marks it failed; publishing the MX later and calling verify_sending_domain restarts it. A verified domain sends fine meanwhile; only SPF alignment waits. |
add_sending_domain | Register a sending domain and get back the DNS records to publish. It takes the domain mail is sent from — mail.<domain> and news.<domain> are provisioned beneath it and the right one is chosen per message, so a marketing complaint spike can never affect password reset delivery. subdomains names the pair differently (tx. and promo.), still one domain. risk_class provisions one identity on the domain exactly as given instead; it cannot be combined with subdomains. Every record carries a tier, and only the required ones block sending: the dkim CNAME, one per sending subdomain, is all a domain needs to verify and send, so have the person publish those first rather than the whole list at once. recommended records (a bounce CNAME per subdomain, and one DMARC on the root domain, where an existing DMARC record already counts) improve alignment and can follow. optional ones are an inbound MX so replies land in threads, and a link. CNAME that turns on click tracking on the customer's own name once its certificate is issued. Domains added before this setup return three dkim CNAMEs instead of one, all required. Adding a domain that already exists returns it rather than a duplicate. A public suffix such as co.uk or github.io is not a domain anyone can send from and is refused with 422 invalid_request; the domain registered under it, e.g. example.co.uk, is accepted. Passing mail.example.co.uk or news.example.co.uk is read as example.co.uk. A plan with no room for another domain answers 402 plan_limit_reached; a retry answers the same until a person upgrades or removes a domain. |
verify_sending_domain | Re-check a domain's DNS records now instead of waiting for the background monitor. Also restarts bounce-path (mail_from) verification when SES gave up before the MX record existed. |
set_utm_tags | Turn UTM tags on or off for a sending domain, and set what they say. When on, every link in that domain's marketing HTML gets utm_source (default 'newsletter'), utm_medium (default 'email') and utm_campaign (the campaign's name or the automation's slug). A link that already has any utm_ parameter is left as written, and unsubscribe links are never touched. Fields left out keep their value; a null source or medium restores the default. Answers the domain. |
list_suppressions | List addresses we refuse to mail and why (hard_bounce, complaint, unsubscribe, manual, list_hygiene), newest first, each with its scope. When someone reports not receiving email, this shows whether the address is suppressed. email returns one address's suppressions directly; scanning pages instead is how the wrong suppression gets cleared. At most 100 per call; while has_more is true, next_cursor passed back as cursor returns the next page. |
add_suppression | Stop sending to an address. Scope 'marketing' leaves transactional mail working; the default is 'all'. Reason 'unsubscribe' is a real opt-out: it also cancels the person's queued scheduled sends and ends their automation enrolments, which is what a person who asked to stop expects and 'manual' does not do. A hard bounce or complaint already on file is never replaced; the response is the stored suppression (id, email, reason, scope, detail, created_at), so its reason says which one stands. |
remove_suppression | Remove a suppression so the address can be mailed again. A hard bounce means the address was rejected by the receiving server, and re-sending raises the bounce rate that AWS enforces on. The scope must match the stored one: removed: false means nothing was suppressed in that scope (an address suppressed for 'marketing' is not lifted by 'all'); list_suppressions with email shows the scope that is stored. |
create_broadcast | Create a campaign as a draft. Nothing is sent: preview_broadcast reports its reach and send_broadcast sends it. identity_id must be a marketing sending domain (see list_sending_domains; risk_class 'marketing'). topic_key must name an existing topic (list_topics); an unknown one is refused with 422 unknown_topic, since it would count everyone as opted out. A segment_id must filter the same audience as audience_id. An A/B test takes 2 to 10 'variants' that differ in subject, from_name or send_at, and optionally 'ab_test'. A subject or from-name test sends sample_share of the audience (default 0.2) split evenly across the variants, waits decide_after_minutes (default 240) after the sample is out, picks the variant with the best unique open rate (or click rate with metric 'click'), and sends the rest to it. Each variant needs at least 100 recipients in the sample or the send is refused — preview_broadcast shows the number. Metric 'click' only works once the domain has click tracking; until then every variant shows zero clicks and the first variant wins by default. The response's web_version_url is a public page of the campaign (one URL, no recipient's unsubscribe link) to share on a site or social post; null until click tracking is active. |
get_broadcast | One campaign, with a 'progress' object while it is sending, paused or testing: how many addresses are still pending, sent, failed, or skipped because the person opted out after the campaign started. This is what tells a paused campaign that is still making progress from one that is waiting; pause_reason says on what, and resume_after when a warm-up pause renews. progress is null for a campaign not in flight. For an A/B test, progress.by_variant is a list of { key, pending, sent, failed, skipped } in variant order, ending with a row whose key is null: the addresses still waiting for the winner. An A/B test also carries 'ab_test' with live per-variant results — sent, unique opens, unique clicks and their rates — plus 'decide_at' and, once decided, 'winner' and 'decided_by'. Status 'testing' means the sample is out and the rest of the audience is waiting on the decision. |
get_broadcast_metrics | How a campaign did: sent, delivered, bounced, complained, unique opens and clicks, and open_rate and click_rate over delivered (null until something is delivered). Opens and clicks count only people: a security gateway that followed every link, or a mailbox that loaded every image on arrival, is left out, and automated_opened and automated_clicked say how many recipients that removed. Report opened and clicked as the campaign's results; adding the automated figures back gives the inflated number other tools show, not more readers. Apple Mail's privacy prefetch cannot be told from a read and is in opened, so open_rate overstates and click_rate is the better signal. get_broadcast has progress and A/B results, not these totals. An unknown id answers 404 not_found. |
list_broadcasts | List campaigns, newest first, with their status. Paged: at most 100 per call; while has_more is true, next_cursor passed back as cursor returns the next page. Each row is the campaign object get_broadcast returns, live progress and A/B results included, without its html, which only get_broadcast returns. Every field is snake_case and always present, null when unset. A campaign showing 'paused' is not broken; its pause_reason says why. A quota or interrupted pause continues on its own. A warm-up pause is the sending domain's daily allowance protecting its reputation: it resumes on its own at resume_after and cannot be resumed before then. A pause for no postal address needs a person to add one in Settings, and one for a suspended workspace needs sending restored; either way the campaign then continues on its own. One showing 'testing' is an A/B test whose sample has gone out and whose winner is not yet decided. |
preview_broadcast | How many contacts a campaign would reach, and whether the reputation gate would allow it. It is the only way to see the size of a campaign without starting it. For an A/B test it also reports the sample size and per-variant count against the 100-per-variant floor; a send below the floor is refused. |
send_broadcast | Send a draft or scheduled campaign now, or schedule it with scheduled_at. This mails every contact in the segment and cannot be undone once started; preview_broadcast shows the count beforehand. Marketing mail must carry a postal address: a workspace without one is refused with 422 no_postal_address (a person adds it in Settings), and a suspended workspace with 422 workspace_suspended, whether sending now or scheduling. Calling this on an already-scheduled campaign with a new scheduled_at moves it; with no scheduled_at it starts now. Any other status answers 409 invalid_state, and a malformed scheduled_at 422 invalid_request. Returns the campaign object, as get_broadcast does: its status and scheduled_at are where the campaign now stands. The calling API key's guardrails apply: a key that holds its sends for approval (requires_approval) or has allowed_recipients gets 403 forbidden, because a campaign cannot be held for approval or kept to an allowlist. A retry answers the same; the campaign is sent by a person from the dashboard, or with a key without those guardrails. A key with a daily_send_limit is charged once for each campaign it puts on its way: sending or scheduling a draft counts its recipients, and starting a scheduled campaign now, moving it earlier, resuming it or deciding its winner counts what it still has to send, unless this key already paid for that campaign. When that does not fit what is left of the limit today the call answers 429 daily_limit and nothing changes; a retry the same day answers the same. The campaign's topic_key was checked against existing topics when it was created. A campaign bigger than the day's remaining quota or its domain's warm-up allowance is not rejected: it sends what it can and stops as 'paused', then continues later. That is expected, not an error, and retrying does not change it. An A/B test sends its sample, goes to 'testing', and sends the rest to the winner after decide_after_minutes or when pick_broadcast_winner is called. A send-time test is scheduled by its variants' send_at and does not accept scheduled_at. |
pick_broadcast_winner | Decide an A/B test now instead of waiting for decide_at. 'variant' names the winning key; without it the metric decides on the figures so far. The rest of the audience is then sent to the winner and cannot be redirected. Only a campaign in status 'testing' can be decided; anything else, or a campaign that is not an A/B test, answers 409 invalid_state. A variant key the campaign does not have answers 422 invalid_request. get_broadcast shows the figures so far — a variant with a handful of opens more is not a result, and the worker decides on its own at decide_at. Returns the campaign object, as get_broadcast does, with the decision in ab_test (winner, decided_by, decided_at, results). If the worker decided first, ab_test.decided_by is 'auto', its winner stands and the variant passed was ignored; that is not an error, and calling again does not change it. The calling API key's guardrails apply: a key that holds its sends for approval (requires_approval) or has allowed_recipients gets 403 forbidden, because a campaign cannot be held for approval or kept to an allowlist. A retry answers the same; the campaign is sent by a person from the dashboard, or with a key without those guardrails. A key with a daily_send_limit is charged once for each campaign it puts on its way: sending or scheduling a draft counts its recipients, and starting a scheduled campaign now, moving it earlier, resuming it or deciding its winner counts what it still has to send, unless this key already paid for that campaign. When that does not fit what is left of the limit today the call answers 429 daily_limit and nothing changes; a retry the same day answers the same. |
resume_broadcast | Continue a paused campaign now. It mails only the addresses still pending — the audience was frozen when the campaign started and everyone already reached is marked — so calling this twice cannot double-send. Only works on a paused campaign; anything else answers 409 invalid_state. pause_reason says why it paused. A background |
Sourced from the repository README.
More in AI & Agents
- PonytailMakes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.109,599
- AgentsMulti-harness agentic plugin marketplace for Claude Code, Codex, Cursor, OpenCode, GitHub Copilot, and Google Antigravity39,079
- Frontend SlidesCreate beautiful slides on the web using a coding agent's frontend skills28,060
- Agent Skills Search ServerSearch and discover Agent Skills from the skills.sh registry. Powered by HAPI MCP server.27,534
- Agency Agents Zh🎭 267 个即插即用的 AI 专家角色 — 支持 Hermes Agent/Claude Code/Cursor/Copilot 等 18 种工具,覆盖工程/设计/营销/金融等 20 个部门。含 52 个中国市场原创智能体(小红书/抖音/微信/飞书/钉钉等)。搭配编排器 agency-orchestrator,一句话即可让多位专家按 DAG 自动协作。19,868
- Watermarks RemoverStrip multi-vendor AI provenance marks: Unicode text hygiene, statistical rewrite hooks, and C2PA/metadata from PNG/JPEG/SVG/PDF/DOCX/HTML/MD17,822