> ## Documentation Index
> Fetch the complete documentation index at: https://docs.senderz.app/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server (AI assistant access)

> Connect Claude, ChatGPT, Cursor and other MCP clients to your Senderz workspace.

Senderz ships a hosted **Model Context Protocol** server. Connect any MCP-capable AI client — Claude, ChatGPT, Cursor, and others — and it can read and act on one Senderz workspace using the same tools as the built-in Senderz agent.

Authentication is a standard OAuth 2.1 browser flow: the client opens a browser, you sign in to Senderz (2FA included), pick which workspace to connect, and approve. No API keys to paste, and every connection is revocable.

<Info>
  The AI client is the brain — you don't need a Senderz AI-provider key for this.
  Your MCP client's own model drives the tools.
</Info>

## What a connected assistant can do

<CardGroup cols={2}>
  <Card title="Read your workspace" icon="magnifying-glass">
    Contacts, segments, campaigns, flows, templates, products, deliverability and
    analytics — counts, details, top performers, order history and more.
  </Card>

  <Card title="Manage contacts" icon="user-plus">
    Create and update contacts, bulk add a pasted list, add them to lists, and
    tag or untag in bulk.
  </Card>

  <Card title="Build campaigns & flows" icon="wand-magic-sparkles">
    Draft campaigns, segments, flows and templates, and schedule a campaign for
    sending.
  </Card>

  <Card title="Create coupons" icon="ticket">
    Create static or dynamic coupons — dynamic ones are auto-provisioned into your
    connected store.
  </Card>
</CardGroup>

<Warning>
  Connected assistants act as you, scoped to a single workspace, and can **never**
  bypass consent, quiet hours, the SMS credit wallet or campaign approvals — those
  still enforce on every send. There are no delete, cancel, disconnect or raw-send
  tools, and no tool can read your secrets, API keys or DKIM material.
</Warning>

## Connect a client

<Steps>
  <Step title="Open Settings → MCP">
    In Senderz, go to **Settings → MCP · AI access** (or the **MCP server** card on
    the Integrations page). Copy the **Server URL** and the client config.
  </Step>

  <Step title="Add it to your MCP client">
    Paste the config into your client's MCP configuration (see the tabs below), or —
    for clients that accept a remote MCP URL directly — just add the Server URL.
  </Step>

  <Step title="Sign in and pick a workspace">
    The client opens a browser. Sign in to Senderz, choose the workspace to connect,
    and approve. You're returned to the client, connected.
  </Step>

  <Step title="Ask it to do something">
    "How many subscribed contacts do I have?", "Add these five people to my VIP list",
    "Draft a Black Friday campaign to lapsed buyers." The client discovers every tool
    automatically.
  </Step>
</Steps>

### Client configuration

Most desktop clients use the [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) bridge, which handles the OAuth flow for you:

<CodeGroup>
  ```json Claude Desktop / Cursor theme={"system"}
  {
    "mcpServers": {
      "senderz": {
        "command": "npx",
        "args": ["-y", "mcp-remote", "https://api.senderz.app/api/v1/mcp"]
      }
    }
  }
  ```

  ```txt Remote-URL clients theme={"system"}
  https://api.senderz.app/api/v1/mcp
  ```
</CodeGroup>

<Note>
  Settings → MCP shows the exact config for your environment, including the correct
  Server URL. Copy it from there rather than hardcoding.
</Note>

## How authentication works

The server implements the MCP OAuth 2.1 authorization spec (revision 2025-06-18):

* Discovery: the client reads `/.well-known/oauth-protected-resource` and
  `/.well-known/oauth-authorization-server` from Senderz.
* Dynamic Client Registration (RFC 7591) — no manual client setup.
* PKCE (S256) is required on every authorization.
* The browser consent step reuses your normal Senderz login and 2FA, then asks
  which **workspace** to grant.
* Tokens are short-lived and refreshable; access is bound to the one workspace you
  chose and never leaves it.

## Managing connections

Every connected client is listed in **Settings → MCP · AI access** with its
workspace and last-used time. Revoke any connection there and it loses access
immediately.

## Tool reference

<AccordionGroup>
  <Accordion title="Read tools" icon="magnifying-glass">
    Workspace + brand kit, contact facts (tags, RFM, consent, predictive
    distributions, property catalog, counts) and lookups (by email, search,
    activity, lifetime value, orders), segments, templates, campaigns, flows,
    analytics (dashboard, deliverability, top campaigns, today's snapshot, order
    stats), domains, billing (SMS wallet, subscription), integrations, compliance
    (suppression, sender IDs, audit log) and the product catalog.
  </Accordion>

  <Accordion title="Contact & audience tools" icon="user-plus">
    Create a contact, edit a contact, bulk-add a pasted list of contacts, create a
    list, add contacts to a list, and tag or untag contacts in bulk. Consent is
    conservative — a channel is only marked subscribed when you confirm the contact
    opted in, and the send pipeline enforces consent regardless.
  </Accordion>

  <Accordion title="Content & campaign tools" icon="wand-magic-sparkles">
    Draft campaigns, segments, flows and templates, and schedule a campaign. When
    your workspace requires campaign approval, scheduling routes through the normal
    approval workflow.
  </Accordion>

  <Accordion title="Commerce tools" icon="ticket">
    Create static or dynamic coupons. Dynamic coupons are auto-provisioned into your
    connected Shopify or WooCommerce store by the same worker the dashboard uses.
  </Accordion>
</AccordionGroup>

<Info>
  Bulk and destructive-looking actions ask the assistant to confirm first — the
  client previews what will change before it runs.
</Info>
