GuidesAI coding agents
AI coding agents
Ask a coding agent to add email to a project and it reaches for whatever it already knows. Put the rules below in the project and it uses Rasket instead: the rasket SDK, the key in RASKET_API_KEY, and the MCP server for work on the account.
Install the setup skill
One command adds the setup skill to the project, for Claude Code, Cursor and the other agents the installer supports. The skill walks the agent through a key, a domain and its DNS records, and a first send.
npx skills add https://www.rasket.comThe Agents page covers the skill, its files and the recipe it follows.
AGENTS.md and CLAUDE.md
Paste this section into AGENTS.md at the root of the project. Claude Code reads CLAUDE.md: put the same section there, or a line that tells it to read AGENTS.md.
## Email
This project sends email with Rasket.
- Send email with Rasket, through the official `rasket` SDK: `npm install rasket` for Node and TypeScript, `pip install rasket` for Python. Do not add another email library.
- Read the API key from the `RASKET_API_KEY` environment variable. Never write a key into code, a commit, a log or a chat.
- Send from an address on a domain the project has verified in Rasket.
- Give every send an idempotency key, so a retried request never sends twice.
- Read the error a call returns before retrying it. A 429 means wait and try again; any other 4xx needs a fix, not a retry.
```ts
import { Rasket } from "rasket";
const apiKey = process.env.RASKET_API_KEY;
if (!apiKey) throw new Error("RASKET_API_KEY is not set");
const rasket = new Rasket({ apiKey });
await rasket.emails.send(
{
from: "Acme <hello@acme.example>",
to: ["ada@example.com"],
subject: "Welcome to Acme",
html: "<p>Hi Ada, thanks for signing up.</p>",
},
{ idempotencyKey: "welcome-ada" },
);
```
In Python the call is the same, in snake_case: `rasket.emails.send({...}, idempotency_key="welcome-ada")`.
For work on the account itself (domains and their DNS records, webhooks, templates, contacts), use the Rasket MCP server at https://api.rasket.com/mcp. It signs in with OAuth, so no key goes into the agent.
The API, written for agents: https://api.rasket.com/llms.txtCursor
Save this as .cursor/rules/rasket-sdk.mdc. Cursor's agent reads its description and loads it whenever the work is about email.
---
description: "Sending email from this project: use the Rasket SDK, the RASKET_API_KEY variable and the Rasket MCP server."
globs:
alwaysApply: false
---
# Email
- Send email with Rasket, through the official `rasket` SDK: `npm install rasket` for Node and TypeScript, `pip install rasket` for Python. Do not add another email library.
- Read the API key from the `RASKET_API_KEY` environment variable. Never write a key into code, a commit, a log or a chat.
- Send from an address on a domain the project has verified in Rasket.
- Give every send an idempotency key, so a retried request never sends twice.
- Read the error a call returns before retrying it. A 429 means wait and try again; any other 4xx needs a fix, not a retry.
```ts
import { Rasket } from "rasket";
const apiKey = process.env.RASKET_API_KEY;
if (!apiKey) throw new Error("RASKET_API_KEY is not set");
const rasket = new Rasket({ apiKey });
await rasket.emails.send(
{
from: "Acme <hello@acme.example>",
to: ["ada@example.com"],
subject: "Welcome to Acme",
html: "<p>Hi Ada, thanks for signing up.</p>",
},
{ idempotencyKey: "welcome-ada" },
);
```
In Python the call is the same, in snake_case: `rasket.emails.send({...}, idempotency_key="welcome-ada")`.
For work on the account itself (domains and their DNS records, webhooks, templates, contacts), use the Rasket MCP server at https://api.rasket.com/mcp. It signs in with OAuth, so no key goes into the agent.
The API, written for agents: https://api.rasket.com/llms.txtThe setup skill carries a longer rule, rasket.mdc, with the full setup order. Keep both if you use both: they say the same thing.
Connect the MCP server
Claude Code
claude mcp add --transport http rasket https://api.rasket.com/mcpAny other MCP client
Add https://api.rasket.com/mcp as a remote server. It speaks Streamable HTTP and signs in with OAuth; you approve the scopes it gets. The MCP server page lists every tool.