Skip to the page

MCP

An agent can use the API as tools. Each method is one tool, and the key decides what the agent may do.

Connect a client

The MCP server is part of the API, at /v1/mcp. It speaks MCP over HTTP and takes the key in the Authorization header, like every other request. Most clients need only the address and that header. This is the entry for Claude Code, in .mcp.json.

JSON
{  "mcpServers": {    "opensend": {      "type": "http",      "url": "https://api.opensend.sh/v1/mcp",      "headers": {        "Authorization": "Bearer os_..."      }    }  }}

Give an agent a key of its own. A sending key lets it send and nothing else, and revoking the key cuts the agent off.

Tools

A tool is named after its method: emails.send is emails_send, and apiKeys.create is api_keys_create. Its input is the input of the method, and its description says what it does. Each tool also says whether it only reads, whether it destroys something, and whether it reaches outside the workspace, as sending does.

tools/list gives the tools the key may use and no others: a sending key sees the tools that send, and a full key sees them all. A call the key may not make still gets an answer, an error with the code forbidden.

Each tool carries the name of its method under _meta, as opensend/method, so a program can tie a tool to the same method in this reference.

Shell
curl -X POST "$OPENSEND_API_URL/v1/mcp" \  -H "Authorization: Bearer $OPENSEND_API_KEY" \  -H "Content-Type: application/json" \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"domains_list","arguments":{"status":"pending"}}}'

The answer holds the result twice: as structuredContent, and as text for clients that read only text. A refused call has isError set and says why as text. It also carries the error as structuredContent.error, with the type, code and message the REST API answers with, so a program can branch on the code.

Check a call first

To learn whether a call would be taken without running it, send it with opensend/check set to true under _meta, next to name and arguments.

Shell
curl -X POST "$OPENSEND_API_URL/v1/mcp" \  -H "Authorization: Bearer $OPENSEND_API_KEY" \  -H "Content-Type: application/json" \  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"domains_create","arguments":{"name":"updates.example.com"},"_meta":{"opensend/check":true}}}'

The server checks that the key may use the tool and that the input is valid, runs nothing, and answers. An input that would be refused comes back as the same error a real call gives. It cannot tell you what only running can, such as a domain that is already added.

This is an addition of OpenSend, not a part of MCP. The server names it under capabilities.experimental when it answers initialize, so a client can look before it relies on it.

Protocol

  • One POST to /v1/mcp carries a JSON-RPC 2.0 message, or a list of them, and the answer is plain JSON.
  • The server speaks the protocol versions 2025-06-18, 2025-03-26, 2024-11-05.
  • It answers initialize, ping, tools/list and tools/call. It has tools only: no resources and no prompts.

What is not a tool

Closing a workspace is not a tool, so a mistake of a model cannot wipe one. The assistant and its kept chats are not tools either: the assistant is not one of its own tools.

The assistant

OpenSend has an assistant of its own, and it is a client of this same server. It starts a connection, reads tools/list and calls the tools like any other agent, so a tool that exists here is one the assistant can use, with nothing else to set up. It acts as the person who asks, with their permissions.

Ask it a question and it looks the answer up. It never changes anything by itself: it checks a change first, the change comes back as a proposal, and it runs only when you send it back.

curl -X POST "$OPENSEND_API_URL/v1/ask" \  -H "Authorization: Bearer $OPENSEND_API_KEY" \  -H "Content-Type: application/json" \  -d '{  "messages": [    {      "role": "user",      "text": "Which domains are not verified yet?"    }  ]}'
ask.send
{  "object": "ask_answer",  "text": "Two domains are not verified yet: news.example.com is pending and example.org failed its last check.",  "steps": [    {      "call": "domains.list",      "title": "List domains",      "ok": true    }  ],  "proposal": null,  "result": null}

Every tool

Emails

What it does
Send email
What it does
Send emails in a batch
What it does
Reschedule email
What it does
Cancel email
What it does
Retrieve email
What it does
List emails

Received emails

What it does
List received emails
What it does
Retrieve received email

Domains

What it does
Add domain
What it does
Verify domain
What it does
Retrieve domain
What it does
List domains
What it does
Update domain
What it does
Delete domain

Templates

What it does
Create template
What it does
Get template
What it does
List templates
What it does
Update template
What it does
Edit template design
What it does
Publish template
What it does
Send test of template
What it does
Render template design
What it does
Duplicate template
What it does
List template versions
What it does
Get template version
What it does
Restore template version
What it does
Delete template
What it does
List template starters
What it does
Get template starter

Images

What it does
Add image
What it does
Upload image
What it does
List images
What it does
Retrieve image
What it does
Delete image

Broadcasts

What it does
Create broadcast
What it does
Update broadcast
What it does
Send broadcast
What it does
Send test of broadcast
What it does
Duplicate broadcast
What it does
Retrieve broadcast
What it does
List broadcasts
What it does
Delete broadcast

Audiences

What it does
Create audience
What it does
List audiences
What it does
Retrieve audience
What it does
Rename audience
What it does
Delete audience
What it does
Add contact to audience
What it does
Remove contact from audience

Contacts

What it does
Add contact
What it does
List contacts
What it does
Retrieve contact
What it does
Update contact
What it does
Delete contact

Contact properties

What it does
Create contact property
What it does
List contact properties
What it does
Retrieve contact property
What it does
Update contact property
What it does
Delete contact property

Topics

What it does
Create topic
What it does
List topics
What it does
Retrieve topic
What it does
Update topic
What it does
Delete topic

Suppressions

What it does
Suppress an address
What it does
List suppressed addresses
What it does
Remove a suppressed address

Automations

What it does
Create automation
What it does
Update automation
What it does
Publish automation
What it does
Pause automation
What it does
Resume automation
What it does
Test automation
What it does
Enrol in automation
What it does
Duplicate automation
What it does
Retrieve automation
What it does
List automations
What it does
Delete automation

Runs

What it does
List runs
What it does
Retrieve run
What it does
Cancel run
What it does
Retry run

Events

What it does
Send event
What it does
Define event
What it does
List events
What it does
Retrieve event
What it does
Update event
What it does
Delete event

Webhooks

What it does
Add webhook
What it does
List webhooks
What it does
Update webhook
What it does
Delete webhook
What it does
Send test event
What it does
List webhook deliveries

Metrics

What it does
Retrieve metrics

Logs

What it does
List logs
What it does
Retrieve log

API keys

What it does
Create API key
What it does
Enroll existing API key
What it does
List API keys
What it does
Revoke API key

Imports

What it does
Look into another account
What it does
Start import
What it does
Retrieve import
What it does
List imports
What it does
Cancel import

Workspace

What it does
Retrieve workspace
What it does
Update workspace

Members

What it does
Invite member
What it does
List members
What it does
Update member
What it does
Remove member

Billing

What it does
List plans
What it does
Start checkout
What it does
Open billing portal
What it does
List invoices

Server

What it does
Retrieve server settings

Account

What it does
Retrieve account

Methods

What it does
List methods