Docs
guides · agents · MCP

MCP server

The Drin MCP server (@drin00/mcp) exposes the whole API as 54 tools over the Model Context Protocol. Any MCP client — Claude Desktop, Claude Code, Cursor — can send and receive email, manage domains and inboxes, and read metrics with a single API key.

01 Run it

The server speaks MCP over stdio. It needs one environment variable, DRIN_API_KEY:

Run @drin00/mcp
DRIN_API_KEY=drin_xxx npx -y @drin00/mcp
VariableRequiredPurpose
DRIN_API_KEYYesYour API key — the Bearer credential.
DRIN_SENDERAccount-wide keysDefault project externalId (the X-Drin-Product value). Omit it for a project-scoped key.
DRIN_BASE_URLNoOverride the API origin. Defaults to https://api.drin.run.
Already using the CLI?It bundles the same server — npx @drin00/cli mcp is equivalent to running @drin00/mcp directly. See the CLI guide.

02 Add it to a client

Drop the config below into your client, restart it, and the agent can call tools like send_email, list_threads, and reply_email.

{
  "mcpServers": {
    "drin": {
      "command": "npx",
      "args": ["-y", "@drin00/mcp"],
      "env": { "DRIN_API_KEY": "drin_xxx" }
    }
  }
}

For Claude Desktop the block goes in claude_desktop_config.json (Settings → Developer → Edit Config). For Cursor it's ~/.cursor/mcp.json (or .cursor/mcp.json in a project). Windsurf and VS Code take the same mcpServers block — VS Code keys it under servers in .vscode/mcp.json.

03 What the agent can do

The 54 tools cover every surface of the API:

GroupToolsExamples
Sending3send_email, send_batch, reply_email
Reading messages4list_emails, get_email, get_email_body, list_email_attachments
Domains7add_domain, verify_domain, set_domain_receiving, delete_domain
Inboxes & threads7create_inbox, list_threads, get_thread, simulate_inbound
Contacts7create_contact, unsubscribe_contact, resubscribe_contact
Templates8create_template, render_template, list_template_gallery
Suppressions3list_suppressions, add_suppression, remove_suppression
Webhooks5create_webhook, update_webhook, delete_webhook
API keys3list_api_keys, create_api_key, revoke_api_key
Metrics & account2get_metrics, list_account_messages
Integrations5install_integration, list_integrations, uninstall_integration

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.

The key is the agent's authorityThe MCP server acts with the full authority of the API key you give it. Scope the key to a single project where you can, and prefer a key with only the access the agent actually needs. Keys are shown once on creation — store them in your client's env, never in source.
Prefer a CLI?Every tool is also a command — npx @drin00/cli send … --json.