Connecting
Connect an MCP client (Claude Code, Cursor, claude.ai) over OAuth 2.1, or a headless agent with an aem_ API key. What each reaches, and the projectId-first flow.
The Send & Retain MCP server is a single HTTP endpoint:
https://sendandretain.com/api/mcpThe endpoint takes two credentials, and nothing else:
- OAuth 2.1 for a client a person is driving — there is no token to mint, copy, or store. Point a client at that URL and it discovers the authorization server itself, registers, and sends you to a browser to approve.
- An
aem_API key for a headless agent with no browser to approve in. It is the same key the REST API takes, minted under Settings → API keys and sent asAuthorization: Bearer aem_…. It is verified by the same code on both surfaces, so revoking a key stops REST and MCP together.
MCP personal access tokens (aiem_…) were removed. If a client config still sends an Authorization: Bearer aiem_… header, delete the header — it no longer authenticates anything. For an interactive client, OAuth needs nothing in its place; for a headless one, send an aem_ key instead.
1. Connect a client
claude mcp add --transport http sendandretain \
https://sendandretain.com/api/mcpThen run /mcp and authorize sendandretain in the browser on first use.
Or install the bundled plugin (skills + slash commands + the tool set) from https://sendandretain.com/api/mcp/plugin.zip — it bakes in the same URL and authorizes the same way.
For a client that only speaks stdio, bridge it:
npx mcp-remote https://sendandretain.com/api/mcp2. Know what the session reaches
An OAuth session is always workspace-scoped with write access: every company in the org, every email_* tool.
An API key is narrower on purpose. It is pinned to one company, carries a ranked scope (read < write < admin — a read key gets the read tools only) and an expiry, and has a separate send grant: without it, a key cannot send mail or enable an automation, whatever its scope. claude.ai connectors cannot use a key; they only speak OAuth.
Because an OAuth session reaches every company, project-scoped tools need an explicit projectId (a key always acts on its own company). Call email_list_projects first and pass the company's projectId on each subsequent call.
Credentials never travel over MCP. A human connects the sending provider and mints API keys on the settings page whose URL email_get_connection_status returns as settingsUrl.
3. Call a tool
Once connected, the client discovers the email_* tools automatically. Golden path for a new company:
email_create_project → email_get_connection_status (human connects the
provider at settingsUrl) → email_create_domain → email_verify_domain →
email_register_webhooks → email_create_sender → email_send_test_emailEvery 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).