---
title: "Generic / custom client"
description: "Connect any MCP-compatible client or your own agent to Unitpost."
url: https://www.unitpost.com/guides/mcp/custom
section: MCP
updated: 2026-07-24
---
# Generic / custom client

## Connection settings

- **Server URL**: https://mcp.unitpost.com/mcp
- **Transport**: Streamable HTTP
- **Auth header**: Authorization: Bearer pk_live_YOUR_KEY (production key from www.unitpost.com)
- **Tools**: one per API operation (emails_send, campaigns_send, …)

## Generic / custom client

> Connect any MCP-compatible client or your own agent to Unitpost.

Any streamable-HTTP MCP client can connect with a Bearer production API key.

### 1. Create a production API key

Open https://www.unitpost.com → Settings → API keys → create a scoped key. Copy the full `pk_live_…` value (shown once). In every snippet below, replace `pk_live_YOUR_KEY` with that value.

> Must be production. Keys from unitpost.dev only work on the dev API. This MCP URL is production (`mcp.unitpost.com`) — a .dev key returns 401 Invalid API key on tool calls even if the server appears connected.

### 2. Point the client at Unitpost

Configure a streamable-HTTP MCP server with these values:

- Server URL: https://mcp.unitpost.com/mcp
- Transport: Streamable HTTP
- Auth header: Authorization: Bearer pk_live_YOUR_KEY
- Tools: one per API operation (emails_send, campaigns_send, …)

### 3. Send the Authorization header

On every MCP request, send `Authorization: Bearer pk_live_YOUR_KEY` (replace the placeholder; keep `Bearer `).

> Grant only the scopes the agent needs (e.g. `emails:send` for `emails_send`). Prefer a revocable key dedicated to the agent.

### 4. Discover tools

The server advertises one tool per API operation (`emails_send`, `campaigns_send`, `domains_verify`, …). A write's `body` maps to the API request body.

### 5. Verify

Call a read tool (e.g. list domains). A 401 Invalid API key usually means a .dev key or a missing `Bearer ` prefix — recreate the key on www.unitpost.com and retry.

Every MCP call uses the same pipeline as the REST API (scopes, rate limits, suppression, tracking, webhooks). Full tool list: /api/v1/openapi.json.

## Related

- [Cursor](https://www.unitpost.com/guides/mcp/cursor): Add Unitpost as an MCP server in Cursor so the agent can send + manage email.
- [Claude Code](https://www.unitpost.com/guides/mcp/claude-code): Add Unitpost to Claude Code with a single `claude mcp add` command.
- [Claude Desktop](https://www.unitpost.com/guides/mcp/claude-desktop): Connect via the mcp-remote bridge in claude_desktop_config.json (API-key auth).
