Drin MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Drin MCP Server Send an email to john@example.com about project update"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@drin00/mcp
A Model Context Protocol server for the complete Drin email loop. Give any MCP-capable agent — Claude Desktop, Claude Code, Cursor, Windsurf, VS Code, Devin, your own — the ability to send and receive email, parse inbound messages, keep threads, reply with human approval, and manage domains, inboxes, contacts, templates, webhooks, API keys, integrations, and delivery metrics — full parity with the Drin dashboard, authenticated with a single Drin API key.
Zero third-party dependencies. Runs on Node 20+. Free on every Drin plan.
Install
No install needed — point your MCP client at it with npx:
{
"mcpServers": {
"drin": {
"command": "npx",
"args": ["-y", "@drin00/mcp"],
"env": { "DRIN_API_KEY": "drin_your_key" }
}
}
}Create an API key in the dashboard under Settings → API Keys. If the key is
account-wide (not scoped to one product), also set DRIN_SENDER to a product
externalId.
Claude Desktop
Add the block above to claude_desktop_config.json
(macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\),
then restart Claude.
Claude Code
claude mcp add drin -e DRIN_API_KEY=drin_your_key -- npx -y @drin00/mcpCursor / Windsurf / VS Code
Add the same mcpServers block to the editor's MCP config
(~/.cursor/mcp.json, Windsurf settings, or .vscode/mcp.json).
Related MCP server: packet-pigeon
Configuration
Env var | Required | Default | Purpose |
| yes | — | Bearer token (Settings → API Keys) |
| no |
| Override for self-hosted/preview |
| no | — | Default product |
Flags --api-key, --base-url, --sender override the env vars.
Tools
54 tools spanning the whole Drin API — everything the dashboard does, an agent can do.
Group | Tools |
Sending |
|
Reading |
|
Domains |
|
Inboxes |
|
Threads |
|
Inbound |
|
Contacts |
|
Suppressions |
|
Templates |
|
Webhooks |
|
API keys |
|
Metrics |
|
Account |
|
Integrations |
|
Addresses accept "Name <email>" or a bare "email"; recipient fields accept a
string or an array of strings. Show-once secrets (new API keys, webhook signing
secrets) are returned only on the create call — persist them immediately.
Programmatic use
import { createDrinMcpServer } from "@drin00/mcp";
const server = createDrinMcpServer({
apiKey: process.env.DRIN_API_KEY!,
sender: "acme", // optional, for account-wide keys
});
await server.serve(); // wires stdin/stdoutSecurity
The server speaks only to the Drin API over HTTPS using your Bearer key — there
is no separate auth surface. Everything the key is allowed to do, the agent can
do; scope the key to one product and the minimum it needs. Keys are shown once
on creation; store them in your MCP client's env, never in source.
Develop
npm run typecheck # tsc on src + tests
npm run build # emit dist/
npm test # node:test unit suiteMIT licensed.
Available Tools
89 toolsabort_campaignA
Permanently stop a campaign (scheduled/sending/paused/pending_approval → aborted). This is terminal — an aborted campaign cannot be resumed. Confirm with the human before calling.
Inputs: id (required), sender.
activate_automationA
Turn a draft or paused automation live. By DEFAULT activation is approval-gated like campaign sends: the automation stays draft with pendingApproval: true and the account owner is emailed the trigger + step timeline — the human approves by REPLYING "APPROVE" to that email (or from the dashboard), after which it goes active. When approvalRequired is false (or it was already approved) it activates immediately and re-wakes any runs a pause stranded. Returns the automation: report status and pendingApproval to the user. Requires a paid plan + verified fromEmail domains on every email step (403 plan_upgrade_required otherwise; the draft stays saved).
Inputs: id (required), sender.
add_domainA
Add a sending domain. Returns the DNS records (DKIM/SPF/DMARC) the user must publish to verify it.
Inputs: domain (required), sender.
add_suppressionA
Manually suppress an address so it can never be emailed (e.g. an opt-out request).
Inputs: email (required), sender.
approve_campaignA
Approve a pending_approval campaign via the API — the alternative to the owner replying APPROVE to the approval email. Re-runs the send gates, transitions it to scheduled, and starts dispatch. Only call this when the human has EXPLICITLY confirmed they want the blast to go out.
Inputs: id (required), sender.
create_api_keyA
Create a new API key. The plaintext secret is returned ONCE — store it now. Optionally scope it to a single product with senderId (omit for a tenant-wide key).
Inputs: name (required), scopes, sender, senderId.
create_automationA
Create an automation DRAFT (it runs nothing until activate_automation). trigger is one of {type:"contact_created"} | {type:"event", eventName} | {type:"inbound_received", inboxAddress?}. steps is 1-20 of {type:"email", fromEmail, templateId? XOR subject+html/text} | {type:"wait", minutes} | {type:"stop_if", condition}. A contact enters each automation at most once. Drafting is free on every plan.
Inputs: name (required), steps (required), trigger (required), sender, +2 more.
create_campaignA
Create a campaign DRAFT (nothing sends yet — send_campaign starts the flow). Audience = segmentId (omit for all subscribed contacts), optionally gated by topicId (only contacts opted into that topic). Content = a saved templateId OR inline subject+html/text — never both. approvalRequired defaults to true: the send will park for human approval by email reply. Drafting is free on every plan.
Inputs: name (required), fromEmail (required), html, text, +10 more.
create_contactB
Add a contact to the sender's address book.
Inputs: email (required), sender, lastName, metadata, +2 more.
create_inboxB
Create a receive address on a receiving-enabled domain so the agent can get replies and inbound mail.
Inputs: address (required), domainId (required), sender, displayName.
create_segmentA
Create a saved audience segment. definition is { match: "all"|"any", conditions: [{ field, op, value? }] } over email/firstName/lastName/createdAt/metadata. with ops eq/neq/contains/not_contains/exists/not_exists/gt/lt. Omit it to match every contact. Resolution is always live and always excludes unsubscribed/suppressed contacts.
Inputs: name (required), sender, definition, description.
create_templateA
Create a reusable server-side template. subject and at least one of html/text are required; all fields support the {{handlebars}} subset. slug defaults to a slugified name and must be unique per sender.
Inputs: name (required), subject (required), html, slug, +2 more.
create_topicA
Create a preference topic. Contacts can opt in/out of it independently of their global subscription; campaigns can target it. defaultSubscription is what a contact WITHOUT an explicit choice counts as.
Inputs: name (required), slug, sender, visible, +2 more.
create_webhookA
Create a webhook endpoint that receives HMAC-signed event callbacks. eventTypes is a non-empty list from: accepted, queued, sending, sent, delivery, bounce, complaint, open, click, delivery_delayed, rejected, rendering_failure, failed, inbound_received, inbound_rejected. The signingSecret is returned ONCE — store it to verify deliveries.
Inputs: url (required), eventTypes (required), sender.
delete_automationA
Delete an automation by id (its runs cascade with it). Only while draft or paused — pause it first.
Inputs: id (required), sender.
delete_campaignA
Delete a campaign by id. Allowed only while draft/pending_approval/completed/aborted — pause or abort a mid-flight campaign first.
Inputs: id (required), sender.
delete_contactA
Permanently delete a contact from the address book.
Inputs: id (required), sender.
delete_domainA
Delete a sending domain and tear down its identity. Refused with a 409 (domain_in_use) if the domain still has inboxes (sending or receiving addresses).
Inputs: id (required), sender.
delete_inboxA
Delete a receive address (inbox) by id. Refused with a 409 (inbox_in_use) if it already has messages (the audit trail is preserved).
Inputs: id (required), sender.
delete_segmentA
Delete a segment by id. Campaigns referencing it fall back to "all subscribed contacts" — check before deleting.
Inputs: id (required), sender.
delete_templateA
Delete a saved template by id or slug. Sends that reference it will then fail.
Inputs: id (required), sender.
delete_topicA
Delete a preference topic by id. Campaigns referencing it fall back to no topic gate.
Inputs: id (required), sender.
delete_webhookB
Delete a webhook endpoint by id.
Inputs: id (required), sender.
dry_run_campaignA
Preview exactly what a campaign WOULD send — the net recipient count, how many contacts the safety rails excluded (unsubscribed / suppressed / topic opt-out), and up to 3 fully rendered per-recipient samples. Nothing is enqueued. ALWAYS call this before send_campaign and sanity-check the count and rendering with the user.
Inputs: id (required), sender.
get_automationA
Get one automation by id: trigger, step program, status, pendingApproval flag, and entered/completed counters.
Inputs: id (required), sender.
get_campaignA
Get one campaign by id: status, audience refs, content, schedule, and live counters (totalRecipients/sentCount/failedCount/suppressedCount). Poll this to report send progress.
Inputs: id (required), sender.
get_campaign_metricsB
Get a campaign's results: dispatch counters (totalRecipients/sentCount/failedCount/suppressedCount) plus per-type event counts (delivery/bounce/complaint/open/click) from the tracking pipeline.
Inputs: id (required), sender.
get_contactB
Get one address-book contact by id.
Inputs: id (required), sender.
get_contact_topicsA
List every topic of the sender with one contact's EFFECTIVE subscription state (their explicit choice, else the topic's default).
Inputs: contactId (required), sender.
get_domainA
Get a domain by id, including the DNS records to publish and their per-record verification state.
Inputs: id (required), sender.
get_domain_receivingA
Read a domain's inbound-receiving state and the MX record(s) required to receive email on it.
Inputs: id (required), sender.
get_emailA
Get one message's full detail (recipients, status, lifecycle events, attachments).
Inputs: id (required), sender.
get_email_bodyB
Get the exact rendered { html, text } body archived for a message at send/receive time.
Inputs: id (required), sender.
get_inboxB
Get one receive address (inbox) by id.
Inputs: id (required), sender.
get_integrationA
Get one installed integration by id (secrets redacted).
Inputs: id (required), sender.
get_metricsA
Get send/delivery/bounce/complaint/open/click totals plus a daily series, optionally bounded by from/to ISO dates.
Inputs: to, from, sender.
get_segmentA
Get one segment by id, including its { match, conditions[] } definition.
Inputs: id (required), sender.
get_templateA
Get one template (subject, html, text, variables) by id or slug.
Inputs: id (required), sender.
get_threadA
Get a full conversation: header plus every message in the thread, oldest→newest, both directions.
Inputs: id (required), sender.
get_topicC
Get one preference topic by id (name, slug, default subscription, visibility).
Inputs: id (required), sender.
get_webhookA
Get one webhook endpoint by id (signing secret redacted).
Inputs: id (required), sender.
import_contactsA
Bulk import (upsert) contacts by email — up to 1000 rows per call; split larger lists into batches. Existing contacts update only the fields a row carries, and an import NEVER re-subscribes an opted-out contact unless the row says subscribed:true explicitly. Returns { created, updated }.
Inputs: contacts (required), sender.
install_integrationA
Install an integration by provider. A webhook-kind provider returns a webhookUrl + webhookSecret (shown once); an OAuth-kind provider returns an authorizeUrl to open in a browser to finish connecting. from is required for webhook-kind providers.
Inputs: provider (required), from, sender, senderId, +2 more.
list_account_messagesA
List messages across ALL products in the account (tenant-wide), newest first. Like list_emails but not scoped to one sender — use an account-wide key to see every product's mail in one feed.
Inputs: q, limit, cursor, sender, +2 more.
list_api_keysA
List active API keys for the account (secrets are never included; internal service keys are hidden).
Inputs: limit, cursor, sender.
list_automation_runsA
List one automation's runs (one per contact who entered): status (running/completed/stopped/failed), current step, trigger context, and next wake time.
Inputs: id (required), limit, cursor, sender, +1 more.
list_automationsA
List automations (trigger→steps programs) with status + run counters. Filter by status (draft/active/paused). A draft with pendingApproval=true is waiting on a human approval reply.
Inputs: limit, cursor, sender, status.
list_campaignsA
List campaigns (many-recipient sends) with status + counters, newest first. Filter by status to find e.g. pending_approval campaigns waiting on a human.
Inputs: limit, cursor, sender, status.
list_contactsA
List address-book contacts for the active sender. Filter by subscribed state or free-text search.
Inputs: q, limit, cursor, sender, +1 more.
list_domainsA
List sending domains and their verification status. Pass status=verified to get only sendable domains.
Inputs: limit, cursor, sender, status.
list_email_attachmentsA
List attachment metadata for a message. Download bytes with an authenticated GET on each url.
Inputs: id (required), sender.
list_emailsA
List sent and received messages (most recent first). Filter by direction/status/search.
Inputs: q, limit, cursor, sender, +2 more.
list_inboxesA
List receive addresses (inboxes) for the active sender. Optionally filter by domainId.
Inputs: sender, domainId.
list_integrationsB
List the integration catalog plus the account's installed integrations (Vercel, Supabase, Neon, …).
Inputs: sender.
list_segmentsA
List saved audience segments (declarative filters over contacts) for the active sender.
Inputs: limit, cursor, sender.
list_suppressionsB
List suppressed recipient addresses (hard bounces, complaints, manual, unsubscribes). Sends to these are blocked.
Inputs: limit, cursor, sender.
list_template_galleryA
List curated starter templates (subject/html/text + sample data) you can copy into a new template.
Inputs: sender.
list_templatesB
List reusable server-side email templates for the active sender.
Inputs: limit, cursor, sender.
list_threadsA
List conversation threads (inbound + outbound joined), most recent first. Filter by inboxId.
Inputs: limit, cursor, sender, inboxId.
list_topicsA
List marketing preference topics ("Product updates", "Newsletter") for the active sender. Topics let contacts opt in/out per category; visible topics render on the public /preferences page.
Inputs: limit, cursor, sender.
list_webhooksB
List webhook endpoints for the active sender (signing secrets are redacted).
Inputs: limit, cursor, sender.
pause_automationA
Pause an active automation — new triggers stop matching and in-flight runs hold at their next step until you reactivate (reactivation re-wakes them; unfinished waits are honored).
Inputs: id (required), sender.
pause_campaignA
Pause a sending or scheduled campaign — the dispatch loop stops at its next batch. Resume later with resume_campaign; already-queued messages still deliver.
Inputs: id (required), sender.
preview_segmentA
Resolve an audience WITHOUT saving or sending anything: pass a saved segmentId OR an inline definition and get { count, sample: ≤10 contacts }. Use this to sanity-check a filter before attaching it to a campaign.
Inputs: sender, segmentId, definition.
preview_templateA
Render an UNSAVED template draft with merge data and return the resulting subject/html/text (no save, no send). Use to test a template before create_template.
Inputs: data, html, text, sender, +1 more.
remove_suppressionA
Remove an address from the suppression list so it can be emailed again.
Inputs: email (required), sender.
render_templateA
Render a saved template with merge data and return the resulting subject/html/text (no send).
Inputs: id (required), data, sender.
reply_emailA
Reply to a received (or sent) message by id. Threading headers (In-Reply-To/References) and a 'Re:' subject are set automatically; From defaults to the inbox address and To to the original sender.
Inputs: messageId (required), cc, to, from, +5 more.
resubscribe_contactA
Opt a contact back in (clears unsubscribedAt).
Inputs: id (required), sender.
resume_campaignA
Resume a paused campaign — it returns to the lane it was paused from (sending if it had started, scheduled otherwise) and dispatch picks up where the cursor left off.
Inputs: id (required), sender.
revoke_api_keyA
Revoke (delete) an API key by id. Access is cut immediately. Refused for the key authenticating this request and for internal service keys.
Inputs: id (required), sender.
send_batchA
Send up to 100 emails in one call. emails is an array of objects shaped like send_email (without idempotencyKey/sender).
Inputs: emails (required), sender, idempotencyKey.
send_campaignA
Request the campaign blast. By DEFAULT this does NOT send immediately: the campaign parks in pending_approval and the account owner is emailed a preview spec-sheet — the human approves by REPLYING "APPROVE" to that email or from the dashboard, and only then does dispatch start. Returns the campaign resource: report its status to the user (pending_approval = waiting on the human; scheduled = dispatch is on its way, which happens when approvalRequired is false or it was already approved). Re-calling on a pending campaign re-sends the approval email. Requires a paid plan + a verified fromEmail domain (403 plan_upgrade_required otherwise; the draft stays saved). ALWAYS run dry_run_campaign first.
Inputs: id (required), sender.
send_emailA
Send a transactional email. Provide html and/or text, or render a saved template with templateId + data. Addresses accept "Name " or bare "email".
Inputs: to (required), from (required), cc, bcc, +11 more.
send_eventA
Record a custom event about a contact ("order_placed", "trial_started", …) — identify them by email OR contactId (exactly one). An unknown email becomes a new subscribed contact. The event is stored durably and fire-and-forget starts any ACTIVE automations with a matching {type:"event", eventName} trigger. Returns 202 {accepted:true}.
Inputs: name (required), email, sender, payload, +1 more.
set_contact_topicsA
Set a contact's explicit per-topic subscription states. topics is a list of { topicId, state } where state is opt_in or opt_out. Returns the full updated effective-state list.
Inputs: topics (required), contactId (required), sender.
set_domain_receivingA
Enable or disable inbound receiving on a domain. Enabling returns the MX record(s) to publish.
Inputs: id (required), enabled (required), sender.
simulate_inboundA
Synthesize a test inbound email (test_mode, excluded from metrics/billing) to exercise the receive→thread→webhook path without sending real mail.
Inputs: to (required), from (required), subject (required), html, +3 more.
uninstall_integrationB
Uninstall (delete) an integration by id.
Inputs: id (required), sender.
unsubscribe_contactA
Opt a contact out (stamps unsubscribedAt). Future sends should honor this.
Inputs: id (required), sender.
update_automationA
Update an automation by id (partial) — only while draft or paused (pause an active one first). A new steps array replaces the program wholesale; pass an explicit null for topicId to clear the topic gate.
Inputs: id (required), name, steps, sender, +3 more.
update_campaignA
Update a campaign by id (partial) — only while it is draft or pending_approval (409 once sending). Pass an explicit null to clear a nullable field (segmentId/topicId/templateId/subject/html/text/fromName/replyTo/scheduledAt/throttlePerHour).
Inputs: id (required), html, name, text, +11 more.
update_contactB
Update a contact by id (partial — only provided fields change).
Inputs: id (required), email, sender, lastName, +3 more.
update_integrationB
Update an installed integration by id (partial): displayName, senderId (string or null), status (active|disabled), defaultTemplateSlug (string or null), metadata.
Inputs: id (required), sender, status, metadata, +3 more.
update_segmentA
Update a segment by id (partial). Pass an explicit null for description to clear it; a new definition replaces the old one wholesale.
Inputs: id (required), name, sender, definition, +1 more.
update_templateA
Update a saved template by id or slug (partial — only provided fields change). Pass an explicit null for html or text to clear that body.
Inputs: id (required), html, name, slug, +3 more.
update_topicB
Update a topic by id (partial — only provided fields change). Pass an explicit null for description to clear it.
Inputs: id (required), name, slug, sender, +3 more.
update_webhookA
Update a webhook by id (partial). Pause/resume with enabled, repoint url, or change eventTypes — without rotating the signing secret. Provide at least one field.
Inputs: id (required), url, sender, enabled, +1 more.
verify_domainA
Re-check a domain's identity/DNS with the provider right now and return its fresh status + per-record verification state. Use right after publishing DNS records instead of waiting for the background poll.
Inputs: id (required), sender.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 89 tools
Each tool targets a distinct resource and action, even at 89 tools. The descriptions clearly separate overlapping operations like render_template (saved templates) and preview_template (drafts).
All tool names follow a consistent verb_noun pattern with snake_case (e.g., list_templates, create_campaign, send_email). No mixed conventions or vague verbs.
89 tools is extremely high for an MCP server, likely overwhelming for agents. While the domain (email platform) is broad, the count far exceeds typical well-scoped servers (3-15 tools) and even the generous upper bound.
The tool surface covers nearly every aspect of the email platform: sending, receiving, templates, domains, contacts, campaigns, automations, webhooks, integrations, and more. Minor gaps like missing update_inbox or update_domain are negligible.
Maintenance
Related MCP Connectors
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Email inboxes for AI agents: send, receive, reply, search, and manage threaded email over MCP.
Send and receive email from your verified domains; manage domains, templates and deliverability.
Email for agents: domains, aliases, IMAP mailboxes, DNS, sending and webhooks via one API key.
Related MCP Servers
- FlicenseBqualityCmaintenanceEnables external AI agents to read, send, and manage email over IMAP/SMTP via MCP, including inbox listing, search, drafts, scheduled/batch sending, and operations like reply, archive, and labels.303-
- FlicenseNot gradedqualityCmaintenanceEmail capabilities for AI agents to receive, read, reply, and send through MCP.-

reflowofficial
AlicenseNot gradedqualityBmaintenanceEnables agents to create and manage durable email workflows, templates, contacts, and enrollments over MCP.2AGPL 3.0
ZapSMTP MCP serverofficial
AlicenseNot gradedqualityBmaintenanceEnables MCP clients to send, receive, and track email and manage templates, domains, webhooks, and other email API operations from AI assistants.122 npmMIT