MCP Server for AI Agents
zend.sh includes a built-in Model Context Protocol (MCP) server that lets AI agents manage your email campaigns through natural language. Connect Claude, GPT, or any MCP-compatible agent to create campaigns, enroll leads, and check analytics.
Endpoint
POST https://app.zend.sh/api/mcpTransport: Streamable HTTP (application/json responses)
Authentication
The MCP server uses the same API key authentication as the REST API:
Authorization: Bearer zk_live_...Available tools
| Tool | Description |
|---|---|
list_accounts | List connected mailbox accounts with health status |
create_campaign | Create a new campaign with name, send window, and settings |
list_campaigns | List all campaigns with status and stats |
start_campaign | Start a campaign (must be in draft state with steps and leads) |
enroll_leads | Add leads to an existing campaign |
get_analytics | Get team-wide or per-campaign analytics |
Configure with Claude Desktop
Add the zend.sh MCP server to your Claude Desktop configuration at ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"zend": {
"url": "https://app.zend.sh/api/mcp",
"headers": {
"Authorization": "Bearer zk_live_..."
}
}
}
}Restart Claude Desktop after updating the configuration.
Example conversations
Once connected, you can manage campaigns through natural language:
Creating a campaign:
"Create a campaign called 'Q1 SaaS Outreach' that sends Monday through Friday, 9 AM to 5 PM Eastern. Stop sending to a lead if they reply."
Enrolling leads:
"Add these leads to the Q1 SaaS Outreach campaign: jane@acme.com (Jane, Acme Corp), bob@globex.com (Bob, Globex Inc)"
Checking analytics:
"How is the Q1 SaaS Outreach campaign performing? Show me sent, delivered, and reply rates."
Managing accounts:
"List my connected mailbox accounts and their health scores."
Programmatic usage
You can also connect to the MCP server programmatically using the MCP SDK:
import { Client } from '@modelcontextprotocol/sdk/client/index.js'
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js'
const transport = new StreamableHTTPClientTransport(
new URL('https://app.zend.sh/api/mcp'),
{
requestInit: {
headers: {
Authorization: 'Bearer zk_live_...',
},
},
}
)
const client = new Client({ name: 'my-app', version: '1.0.0' })
await client.connect(transport)
// List available tools
const tools = await client.listTools()
// Call a tool
const result = await client.callTool({
name: 'get_analytics',
arguments: {},
})Security
- The MCP server enforces the same authentication and rate limits as the REST API
- All operations are scoped to the team associated with the API key
- Tool inputs are validated with the same schemas as the REST endpoints
- The server uses JSON responses (not SSE streams) for compatibility with serverless environments