Eusend

v0.16.3
dev.eusend/eusend Checked 2 days ago Published 16 hours ago

Send transactional email and manage domains, audiences, and broadcasts from any MCP client.

Model Context Protocol server for Eusend. Lets any MCP-compatible AI client — Claude Code, Claude Desktop, Cursor, Windsurf, and others — send email and manage domains, audiences, and broadcasts through your Eusend account. It's a thin wrapper over @eusend_dev/sdk: each tool is a typed call into the SDK. The same server runs two ways — stdio (local, launched by your client) and HTTP (hosted/remote) — from one codebase.

Summary extracted from the README.

@eusend_dev/mcp

Model Context Protocol server for Eusend. Lets any MCP-compatible AI client — Claude Code, Claude Desktop, Cursor, Windsurf, and others — send email and manage domains, audiences, and broadcasts through your Eusend account.

It's a thin wrapper over @eusend_dev/sdk: each tool is a typed call into the SDK. The same server runs two ways — stdio (local, launched by your client) and HTTP (hosted/remote) — from one codebase.

Tools

Area Tools
Emails send_email, list_emails, get_email, cancel_email
Domains list_domains, get_domain, create_domain, verify_domain
Audiences & contacts list_audiences, get_audience, create_audience, rename_audience, list_contacts, create_contact
Contact properties list_contact_properties, create_contact_property
Topics list_topics, create_topic
Broadcasts list_broadcasts, get_broadcast, create_broadcast, update_broadcast, test_broadcast, send_broadcast, cancel_broadcast
Suppressions list_suppressions, create_suppression

Destructive operations (deleting domains, audiences, contacts, API keys, topics) are intentionally not exposed, and neither is anything that rewrites a consent record — changing a topic's visibility, or a contact's subscription. send_broadcast is a bulk send — clients are instructed to confirm first. update_broadcast only edits drafts, so it can never change who a scheduled broadcast reaches.

Local setup (stdio)

Get an API key at https://eusend.dev/api-keys.

Claude Code

claude mcp add eusend --env EUSEND_API_KEY=eusend_live_xxx -- npx -y @eusend_dev/mcp

Claude Desktop / Cursor / Windsurf

Add to the client's MCP config (claude_desktop_config.json, .cursor/mcp.json, …):

{
  "mcpServers": {
    "eusend": {
      "command": "npx",
      "args": ["-y", "@eusend_dev/mcp"],
      "env": {
        "EUSEND_API_KEY": "eusend_live_xxx",
        "EUSEND_FROM": "you@yourdomain.com"
      }
    }
  }
}

Setting EUSEND_FROM pins a default sender so the agent doesn't have to guess one on send_email / create_broadcast.

Remote setup (HTTP)

The same binary serves Streamable HTTP. The credential is taken per-request from the Authorization: Bearer header, so one endpoint serves many accounts.

# run locally on :3000
npx -y @eusend_dev/mcp --http --port 3000

# behind a TLS reverse proxy at mcp.eusend.dev
npx -y @eusend_dev/mcp --http --host 0.0.0.0 --port 3000 --allowed-hosts mcp.eusend.dev

Connect a client to it:

claude mcp add --transport http eusend https://mcp.eusend.dev/mcp

DNS-rebinding protection is on by default (localhost only); pass --allowed-hosts with your public host when running behind a proxy.

OAuth

The hosted endpoint at mcp.eusend.dev also accepts OAuth access tokens, so a client can connect by signing in instead of sending a key. A self-hosted instance is API-key only unless you point it at an authorization server:

npx -y @eusend_dev/mcp --http \
  --oauth-issuer https://eusend.dev/api/auth \
  --resource-url https://mcp.example.com/mcp

With an issuer set, the server publishes /.well-known/oauth-protected-resource, answers unauthenticated requests with a WWW-Authenticate challenge, and verifies each token's signature, expiry, issuer and audience (the resource URL) before forwarding it to the API. Tokens are only issued for a resource the authorization server lists, so this is for running eusend's own stack, not for pointing a third-party server at eusend accounts.

Configuration

Flag Env Purpose
--key EUSEND_API_KEY API key (stdio only; HTTP takes it per-request)
--from EUSEND_FROM / SENDER_EMAIL_ADDRESS Default sender address
--reply-to EUSEND_REPLY_TO Default Reply-To
--base-url EUSEND_BASE_URL Override the API base URL
--http — Run the HTTP transport instead of stdio
--port MCP_PORT HTTP port (default 3000)
--host MCP_HOST HTTP bind host (default 127.0.0.1)
--allowed-hosts MCP_ALLOWED_HOSTS Comma-separated Host allowlist
--oauth-issuer MCP_OAUTH_ISSUER Accept OAuth tokens from this issuer (HTTP)
--resource-url MCP_RESOURCE_URL This server's public URL; the token audience
— MCP_OAUTH_JWKS_URL Signing keys URL (default <issuer>/jwks)

Development

bun run build        # bundle to dist/ (stdio + http entries)
bun run typecheck
bun run inspect      # open the MCP Inspector against the stdio server