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:
DRIN_API_KEY=drin_xxx npx -y @drin00/mcp| Variable | Required | Purpose |
|---|---|---|
DRIN_API_KEY | Yes | Your API key — the Bearer credential. |
DRIN_SENDER | Account-wide keys | Default project externalId (the X-Drin-Product value). Omit it for a project-scoped key. |
DRIN_BASE_URL | No | Override the API origin. Defaults to https://api.drin.run. |
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:
| Group | Tools | Examples |
|---|---|---|
| Sending | 3 | send_email, send_batch, reply_email |
| Reading messages | 4 | list_emails, get_email, get_email_body, list_email_attachments |
| Domains | 7 | add_domain, verify_domain, set_domain_receiving, delete_domain |
| Inboxes & threads | 7 | create_inbox, list_threads, get_thread, simulate_inbound |
| Contacts | 7 | create_contact, unsubscribe_contact, resubscribe_contact |
| Templates | 8 | create_template, render_template, list_template_gallery |
| Suppressions | 3 | list_suppressions, add_suppression, remove_suppression |
| Webhooks | 5 | create_webhook, update_webhook, delete_webhook |
| API keys | 3 | list_api_keys, create_api_key, revoke_api_key |
| Metrics & account | 2 | get_metrics, list_account_messages |
| Integrations | 5 | install_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.
env, never in source.npx @drin00/cli send … --json.