Connecting
Mint an MCP token and connect a client (Claude Code, Cursor, claude.ai). Tokens, scope, and OAuth explained.
The Send & Retain MCP server is a single HTTP endpoint:
https://sendandretain.com/api/mcpAny MCP client can connect with a Bearer token, or — for browser clients — via OAuth.
1. Mint a token
Create an MCP token in Workspace → Settings → MCP. The prefix is aiem_ (distinct from the aem_ send-API keys used by the REST API). Two choices at mint time:
- Scope —
readexposes only the read tools in this reference;writeexposes everything. Orthogonal to project scope. - Reach — an org-scoped token reaches every company (each call takes an optional
projectId; callemail_list_projectsfirst). A project-scoped token is clamped to one company and ignoresprojectId.
Provider API keys can never be set over MCP. email_connect_provider returns the settings-page URL where a human pastes the Resend/SendGrid key.
2. Connect a client
claude mcp add --transport http sendandretain \
https://sendandretain.com/api/mcp \
--header "Authorization: Bearer aiem_your_token"Or install the bundled plugin (skills + slash commands + the tool set) from https://sendandretain.com/api/mcp/plugin.zip.
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"sendandretain": {
"url": "https://sendandretain.com/api/mcp",
"headers": { "Authorization": "Bearer aiem_your_token" }
}
}
}Add a custom connector in claude.ai settings pointing at:
https://sendandretain.com/api/mcpBrowser clients authenticate via the built-in OAuth 2.1 flow — you approve access on the consent screen; no token to paste. The connection is granted org-scoped write.
3. Call a tool
Once connected, the client discovers the email_* tools automatically. Golden path for a new company:
email_create_project → email_connect_provider (human pastes the key) →
email_create_domain → email_verify_domain → email_register_webhooks →
email_create_sender → email_send_test_email → email_create_api_keyEvery tool + its schema is in the domain pages of this reference.
Rate limits
Per-user, in-memory: reads 60/min, writes 10/min. Sends are additionally bounded by each project's daily cap and the kill switch (see Guardrails).