Send email from Vercel AI SDK
MCP tools inside a TypeScript agent loop.
Remote server, nothing to install
Setup
import { experimental_createMCPClient as createMCPClient } from "ai";
const sending = await createMCPClient({
transport: {
type: "sse",
url: "https://sending.dev/api/mcp",
headers: { Authorization: `Bearer ${process.env.SENDING_API_KEY}` },
},
});
const tools = await sending.tools();Create the API key under Settings › API Keys. The plaintext token is shown once, at creation.
The thing that catches people
Keep the key in an env var: an MCP client defined in application code ends up in the bundle if you inline it.
Check it works
Ask the agent to call get_usage. It is read-only, it sends nothing, and it answers with your plan, this month's quota and the capacity limits. If you get JSON back, the install is fine.
What it can do once connected
71 tools: send transactional email and campaigns, manage contacts and lists, build and activate automations, run an inbox that receives and replies, and read back why a message never went out. All of it inside verified domains, suppression, idempotency, spend caps and an audit log, enforced on our servers rather than in the prompt.
Other clients
Claude Code
Send email from the terminal, inside the session you are already in.
Claude Desktop
Give Claude an email stack without pasting a secret anywhere.
claude.ai
The same connector, in the browser.
ChatGPT
Custom connectors, and the API path where a key still works.
Cursor
Email tools in the editor where you are writing the app that sends them.
VS Code
GitHub Copilot with a mailer attached, and the key never committed.

