API key or OAuth

Send email from OpenAI Agents SDK

Hand the tools to an agent you wrote yourself.

Remote server, nothing to install

Setup

Attach the server
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp

async with MCPServerStreamableHttp(
    params={
        "url": "https://sending.dev/api/mcp",
        "headers": {"Authorization": "Bearer sk_your_api_key"},
    }
) as sending:
    agent = Agent(name="mailer", mcp_servers=[sending])
    await Runner.run(agent, "Send the welcome email to ada@example.com")

Create the API key under Settings › API Keys. The plaintext token is shown once, at creation.

The thing that catches people

OpenAI Agents SDK · gotcha

`MCPServerStreamableHttp` is an async context manager: built outside an `async with` it is never connected, and the agent runs with no tools instead of erroring. `cache_tools_list` is off by default, so the tool list is fetched on every run.

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

85 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.

All 85 tools · MCP docs

Other clients

Start with Sending

Give your agent something worth sending.

3,000 messages a month, free. No card. The MCP endpoint is on every plan, including this one.