How to let an AI agent send email with MCP, without pasting a key
Published Updated 7 min readBy the Rasket team

What an MCP server for email is
The Model Context Protocol is a specification for handing an assistant a set of tools. An MCP email server is that specification applied to a sending platform: every operation the API offers, described in a way a model can read, so an assistant can add a domain, send a message or look up what happened to one without anybody writing the HTTP call.
The reason to care is narrower than the hype. It is not that a model can now write an email. It is that setting an email account up is a sequence of steps a person does once, badly, from documentation — add a domain, publish four records, wait, create a key, wire a webhook, send a test — and that sequence is exactly the shape a tool-using assistant is good at, provided it cannot do anything irreversible along the way.
The boundary comes before the integration
Letting an AI agent send email with MCP is a trust decision before it is an integration, so it is worth starting there rather than with the command.
A connected app never gets an API key. It gets an OAuth access token, issued for one team, carrying only the scopes approved on a consent screen you saw, and revocable from Connected apps at any moment. There is no step where a credential is pasted into a desktop application and no way for a prompt to contain one.
Scopes decide which tools exist
This is the part worth understanding. A grant without domains:write is not a server that has create_domain and refuses to run it. It is a server where that tool is not registered at all, so the model never sees it and cannot be talked into reaching for it.
Some things have no scope at all, because the tools do not exist: minting or revoking an API key, changing your plan or your team, deleting a domain, a template, a broadcast or an automation, erasing a contact, lifting a suppression, regenerating a signing key. There is no consent screen anywhere that could hand any of it over.
What the server exposes
Seventy-four tools, grouped into seven toolsets so a client can load only what it needs.
| Toolset | What it covers |
|---|---|
| setup | Add and verify a domain, name the sender, wire webhooks, write templates. |
| send | Send one message, follow what happened to it, and read what came in. |
| audience | Contacts and their properties, imports, segments, and topic choices. |
| marketing | Broadcasts, automations, and the custom events that start them. |
| insight | Reserved. Email metrics are in send; a broadcast's report is in marketing. |
| billing | Read-only. Nothing here buys, changes or cancels anything. |
| ai | AI assist, once the team has turned it on. |
Narrowing is worth doing. Every registered tool costs context on the model’s side, and an assistant that only ever sends does not need the audience and billing tools in front of it while it works.
claude mcp add --transport http rasket "https://api.rasket.com/mcp?toolset=setup,send"A tool outside the named toolsets is not registered: it is missing rather than refusing, which is the same principle the scopes follow. An unknown toolset name is an error before any tool runs.
Connecting an assistant
- Add the server to your client — Run the one-line command your MCP client provides, pointing it at the HTTP endpoint. Clients that take JSON instead accept the same URL as an http server entry.
- Approve the scopes on the consent screen — A browser window asks which team the assistant is acting for and which scopes it may hold. Approve only the ones the task needs; the scopes decide which tools exist at all.
- Let it call describe_setup first — That tool needs no scope and is always registered. It returns the setup recipe with each step marked as allowed or blocked, plus the scopes that are missing, so the assistant knows what it can finish.
- Have it add and verify a domain — The assistant creates the domain and reads back the DNS records to publish. Publishing them is yours to do, at your DNS host; verification then runs on its own until every record resolves.
- Send the first message — Ask for one message to an address you control, from the verified domain. Have the assistant pass an idempotency key so that a retried tool call cannot become a second email.
- Wire a webhook and watch the events — Creating a webhook returns its signing secret once. Store it in your own environment, verify every delivery against it, and follow the message from sent to delivered.
claude mcp add --transport http rasket https://api.rasket.com/mcpClients that take configuration as JSON accept the same endpoint.
{ "mcpServers": { "rasket": { "type": "http", "url": "https://api.rasket.com/mcp" } }}For an assistant working inside a repository there is a second shape: the setup recipe ships as a skill you copy into the project, and as a rules file for editors that read one. Same twelve steps, no server connection required — useful when the assistant is writing the integration rather than operating the account.
The first call an agent should make
describe_setup needs no scope and is registered whatever the toolset filter says, so it is always available. It returns the setup recipe with each step marked as allowed or blocked for this connection, plus the scopes that are missing.
{ "steps": [ { "id": "add_domain", "tool": "create_domain", "scope": "domains:write", "allowed": true, "reason": null }, { "id": "send_broadcast", "tool": "send_broadcast", "scope": "broadcasts:write", "allowed": false, "reason": "Needs the broadcasts:write scope." } ], "missing_scopes": ["broadcasts:write", "automations:write"]}That shape matters more than it looks. An assistant that starts by asking what it may do can tell you it needs a wider grant before it is halfway through setting your account up, rather than failing on step nine and leaving you to work out which half happened. It is the difference between an agent that stops and asks and one that stops.
Documentation an agent can read
Tools are half of it. The other half is that an assistant reasoning about your integration needs the documentation, and HTML full of navigation is a poor way to give it that.
- Add
.mdto any documentation URL, or ask for the page with anAccept: text/markdownheader, and you get the same page as Markdown. Every post on this blog has the same twin. /llms.txtis an index of every page written for a model to read, following the llms.txt convention;/llms-full.txtis the same pages concatenated into one file.- The whole API is served as an OpenAPI document, which is what the SDKs are generated from.
The practical effect is that an assistant asked to add sending to a codebase can read the reference for the endpoint it is about to call, rather than recalling an API shape from training data that may be two versions old.
Guardrails worth keeping
The platform enforces the boundary. These are the habits worth keeping on your side of it.
- Approve the narrowest grant that finishes the job. You can always reconnect with more. Starting wide because it is convenient is how a scope nobody needed stays live for a year.
- Insist on idempotency keys. A tool call that times out and is retried is exactly the case the key exists for; ask the assistant to derive one from the thing being sent about. The idempotency article covers how to choose them.
- Send to yourself first. The first message an agent sends should go to an address you control, from a domain you just watched it verify.
- Read the audit log. Every tool call is an ordinary API request in your logs, showing the tool and the connected app that ran it, and accepted broadcasts and imports are written to the audit log by name.
The budgets
There are limits counted per connected app on top of your team’s own rate limit: sixty tool calls a minute, a hundred sends an hour, three broadcasts an hour and five imports an hour. Crossing one answers with how long to wait rather than failing silently, which is what keeps an enthusiastic loop from becoming a bill.
The MCP reference lists every tool with its scope, the agents guide has the setup recipe and the skill, and the agents page is the shorter version of all of it. The OAuth documentation covers what a grant actually holds.
Frequently asked questions
Does the assistant get my API key?
No. An MCP client signs in with OAuth and holds an access token issued for one team, carrying only the scopes you approved on the consent screen. There is no step where a key is pasted into a desktop application, and you can revoke the grant from Connected apps at any moment.
What stops it doing something destructive?
The tools do not exist. Nothing on the server can mint or revoke an API key, change your plan or your team, delete a domain, a template, a broadcast or an automation, erase a contact, or lift a suppression. No scope reaches any of it, so there is no consent screen that could hand it over.
How many tools are there?
Seventy-four, grouped into seven toolsets so a client can load only what it needs. Narrowing the set is worth doing: every registered tool spends context on the model's side, and an assistant that only ever sends does not need the audience or billing tools in front of it.
Can an agent run away with my sending volume?
There are budgets counted per connected app, on top of your team's own rate limit: sixty tool calls a minute, a hundred sends an hour, three broadcasts an hour and five imports an hour. Crossing any of them answers with how long to wait, and accepted broadcasts and imports are written to the audit log naming the app that made them.
Does this only work with one assistant?
No. Any client that speaks MCP over HTTP can connect, and the documentation gives both the one-line command and the JSON form other clients take. For an assistant working inside a repository there is also a setup skill you copy into the project and a rules file for editors that read one.
How does an agent read the documentation?
As Markdown. Add .md to any documentation URL, or ask for the page with an Accept header of text/markdown. There is an index of every page written for a model, the same pages concatenated into one file, and the whole API as an OpenAPI document.
Sources
- Model Context Protocol specification — Model Context Protocol, read 2026-09-16
- The /llms.txt file — llmstxt.org, read 2026-09-16
Related
- For AI agents — An MCP server, a setup skill, Markdown at every docs URL and typed SDKs, so an assistant can set Rasket up and send for you with no key in the prompt.
- MCP server — Let an assistant act on your account: ten tools, your scopes, no key.
- Agents — Let an AI agent set Rasket up: the skill, the rules file, MCP, and the recipe they share.
- OAuth — Let another app act for a team: register, authorize with PKCE, exchange, refresh.
- Idempotent email sends: never send twice — A timeout does not tell you whether the send happened. What an idempotency key is, how the 24-hour window behaves, how to choose keys, and what a batch does.