# SendKit MCP

SendKit exposes a remote Model Context Protocol (MCP) server so AI assistants can design on-brand newsletters, preview them, and schedule campaigns with human approval.

## Endpoint

```
https://send-kit.com/mcp
```

Transport: Streamable HTTP. The server is stateless and returns JSON responses.

## Authentication

Every request must include the public API key and either the secret key or an HMAC signature:

```
Authorization: Bearer pk_your_public_key
X-Secret-Key: sk_your_secret_key
```

Custom clients can send `X-Signature` instead of `X-Secret-Key`. The signature is an HMAC-SHA256 of the raw JSON-RPC request body, using the secret key.

Create keys in the SendKit dashboard under Settings → API. The secret key is shown only once at creation. Keys can be scoped to:

| Scope | Allows |
|---|---|
| `read` | Brand, block schema, newsletters, analytics, segments, audience summary, templates, products, quota |
| `draft` | Create, update, preview, duplicate, and delete newsletters |
| `send` | Send test, schedule, and pause |

An API key only sees the tools allowed by its scopes.

## Quick start

Most MCP clients accept a remote server URL and a bearer token. Example configuration:

```json
{
  "mcpServers": {
    "sendkit": {
      "url": "https://send-kit.com/mcp",
      "headers": {
        "Authorization": "Bearer pk_your_public_key",
        "X-Secret-Key": "sk_your_secret_key"
      }
    }
  }
}
```

## Tools

### Read

- `get_brand` — sender identity, theme colors, logo, header, footer, social links, store currency
- `get_block_schema` — supported block names and fields
- `list_newsletters` — paginated newsletters with search and status filtering
- `get_newsletter` — a single newsletter, including blocks, HTML, status, and schedule
- `get_newsletter_analytics` — delivery, open, click, bounce, complaint, and unsubscribe counts
- `list_segments` — audience segments
- `get_audience_summary` — subscriber counts by segment and tag, without contact records
- `list_templates` / `get_template` — newsletter templates
- `list_products` — active and unlisted products for product blocks
- `get_quota` — remaining email quota
- `get_usage_guide` — this document

### Draft

- `create_newsletter` — create a draft from blocks or HTML
- `update_newsletter` — update a draft
- `render_newsletter_preview` — render blocks or HTML and return warnings, optionally a spam score
- `duplicate_newsletter` — copy a newsletter
- `delete_newsletter` — delete a newsletter (scheduled newsletters must be paused first)

### Send

- `send_test_newsletter` — send a test to the project owner's verified email
- `schedule_newsletter` — schedule a newsletter; the MCP client asks the user to confirm
- `pause_newsletter` — remove a scheduled newsletter from the queue and refund unsent quota; the MCP client asks the user to confirm

## Designing with blocks

Blocks are the recommended design mode because SendKit renders them with the project's theme, logo, header, and footer. The result stays editable in the visual editor.

1. Call `get_brand` to learn the project's visual identity.
2. Call `get_block_schema` to learn the available blocks and fields.
3. Create a draft with `content.mode = "blocks"`.
4. Call `render_newsletter_preview` and review warnings.
5. Refine with `update_newsletter`.
6. Send a test, then call `schedule_newsletter`; the MCP client asks the user to confirm.

Example block payload:

```json
{
  "title": "Weekly update",
  "subject": "What's new this week",
  "previewLine": "Three things worth your time",
  "content": {
    "mode": "blocks",
    "blocks": {
      "selectedBlocks": [
        { "id": "hero", "name": "Rich Text" },
        { "id": "cta", "name": "Button" }
      ],
      "blockContents": {
        "hero": { "body": "<h1>Hello {{first_name}}</h1><p>Here is what's new.</p>" },
        "cta": { "text": "Read more", "href": "https://example.com" }
      }
    }
  }
}
```

Supported block names: `Rich Text`, `Image`, `Button`, `Button Group`, `Callout`, `Coupon`, `Spacer`, `Vertical Product`, `Horizontal Product`.

## Designing with HTML

HTML is supported as a fallback. HTML newsletters are not editable in the visual editor and do not automatically inherit the project header/footer. Marketing content must include an unsubscribe link, either `{{unsubscribe_link}}` or a URL containing `/unsubscribe/`.

```json
{
  "title": "Launch announcement",
  "subject": "We launched",
  "content": {
    "mode": "html",
    "html": "<h1>We launched</h1><a href=\"{{unsubscribe_link}}\">Unsubscribe</a>"
  }
}
```

Content mode is immutable after creation.

## Scheduling safely

Scheduling is destructive. MCP clients ask the user to confirm through the client's elicitation UI before the server commits the schedule. The REST v1 endpoint uses the same action and requires an explicit `confirm: true` field:

```json
{
  "newsletterId": "newsletter-id",
  "scheduledAt": "2026-11-20T09:00:00.000Z",
  "segmentId": "optional-segment-id",
  "confirm": true
}
```

The response includes the recipient count and quota impact. Always show both to the user before scheduling.

## Prompts and resources

Prompts:

- `design-newsletter`
- `rewrite-subject-lines`
- `plan-campaign`

Resources:

- `sendkit://brand`
- `sendkit://block-schema`
- `sendkit://docs`

## Rate limits

The MCP endpoint is rate limited per API key at 120 requests per minute. REST v1 endpoints use separate limits for reads, writes, and scheduling.

## Privacy

MCP does not expose contact records or email addresses. Use `get_audience_summary` for counts and `list_segments` for targeting.

## More documentation

- Human-readable docs: https://send-kit.com/docs/mcp
- Raw markdown: https://send-kit.com/docs/mcp.md
- Agent index: https://send-kit.com/llms.txt
- Discovery metadata: https://send-kit.com/.well-known/mcp.json
