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

# Chatarmin MCP

> Connect AI assistants to your Chatarmin organization with the Model Context Protocol (MCP).

Chatarmin MCP lets you connect an AI assistant to your organization so it can read campaigns, contacts, flows, chats, and analytics—and run approved actions like sending messages or publishing flows—through natural language.

## When to use it

Use Chatarmin MCP when you want an AI assistant (Cursor, Claude, ChatGPT, VS Code, or similar) to work with your live Chatarmin data without copying exports or switching between tools.

<Tip>
  OAuth is the recommended connection method. You sign in to Chatarmin once and approve access—no manual API token setup required.
</Tip>

## What changed

Chatarmin now ships a dedicated **MCP** area in your account:

* **Profile → MCP** shows your MCP endpoint URL, OAuth configuration, and what your assistant can do.
* **OAuth consent screen** — when you click **Connect** in your AI client, you sign in to Chatarmin and approve access for that client (for example Cursor or Claude).
* **Static Bearer token (advanced)** — for clients that do not support OAuth, you can use the same API token from **Profile → Settings → API token**.

<Frame>
  <img src="https://mintcdn.com/chatarmin-help-center/lGe-w4qMajFJnjYi/images/api-documentation/profile-mcp-nav.png?fit=max&auto=format&n=lGe-w4qMajFJnjYi&q=85&s=c0d84cd35ac06b99f4b1d2cd01ab85fe" alt="Profile sidebar with the MCP tab selected and Beta badge visible" width="420" height="720" data-path="images/api-documentation/profile-mcp-nav.png" />
</Frame>

The MCP server endpoint is:

```
https://api.chatarmin.com/api/mcp
```

## What your assistant can do

Tools are scoped to your Chatarmin organization. Capabilities include:

<CardGroup cols={2}>
  <Card title="Campaigns & messaging" icon="bullhorn">
    List campaigns, inspect metrics, preview audience size, create or pause campaigns, read WhatsApp chats, send messages, and trigger flows.
  </Card>

  <Card title="Contacts & audience" icon="users">
    Search contacts, view audience stats, list tags and segments with live counts, create tags, and preview segment sizes.
  </Card>

  <Card title="Flows & templates" icon="diagram-project">
    Create and update flow drafts, publish flows, read analytics and run traces, and draft or submit WhatsApp templates for Meta approval.
  </Card>

  <Card title="Analytics & orders" icon="chart-line">
    Pull dashboard KPIs, campaign performance metrics, and search attributed orders by campaign, flow, or contact.
  </Card>
</CardGroup>

<Warning>
  Write actions (send message, publish flow, create campaign, and similar) run when the assistant calls a tool. Review prompts carefully and confirm destructive actions in your AI client before approving.
</Warning>

## Set it up

## Watch the walkthrough

<img src="https://mintcdn.com/chatarmin-help-center/lGe-w4qMajFJnjYi/images/api-documentation/profile-open-mcp-tab.gif?s=aa24152c65c32ecfb0f41d8c2e243a60" alt="Open Profile and select the MCP tab" width="800" height="450" data-path="images/api-documentation/profile-open-mcp-tab.gif" />

<Steps>
  <Step title="Open MCP settings in Chatarmin">
    In [Chatarmin](https://app.chatarmin.com/), go to **Profile → MCP**.

    <Frame>
      <img src="https://mintcdn.com/chatarmin-help-center/lGe-w4qMajFJnjYi/images/api-documentation/profile-mcp-settings.png?fit=max&auto=format&n=lGe-w4qMajFJnjYi&q=85&s=3017eaafe7ebab98faacc2eca539bfd1" alt="Chatarmin Profile MCP page showing capabilities and connection settings" width="2880" height="1800" data-path="images/api-documentation/profile-mcp-settings.png" />
    </Frame>

    Copy the **MCP endpoint URL** or the **OAuth config** JSON from that page.
  </Step>

  <Step title="Add the server in your AI client">
    Follow the connection guide for your tool:

    * [Connect Chatarmin MCP to AI tools](/api-documentation/connect-chatarmin-mcp-to-ai-tools)
  </Step>

  <Step title="Connect and approve access">
    In your AI client, click **Connect** (or equivalent). Your browser opens the Chatarmin consent screen.

    <Frame>
      <img src="https://mintcdn.com/chatarmin-help-center/lGe-w4qMajFJnjYi/images/api-documentation/mcp-oauth-consent.png?fit=max&auto=format&n=lGe-w4qMajFJnjYi&q=85&s=728db6b5c6cc8f00c9b4d6aeccb34ab6" alt="Chatarmin MCP OAuth consent screen showing Cursor requesting access to Demo Store" width="2880" height="1800" data-path="images/api-documentation/mcp-oauth-consent.png" />
    </Frame>

    Sign in if needed, review the permissions, and click **Allow access**.
  </Step>

  <Step title="Start using Chatarmin tools">
    After authorization, Chatarmin tools appear in your assistant. Ask questions like “How did last week’s campaign perform?” or “List contacts who messaged us in the last 7 days.”
  </Step>
</Steps>

## Advanced: static Bearer token

Only use this if your AI client does not support OAuth **Connect**.

1. Open **Profile → Settings** and copy your **API token**.
2. Add the MCP URL with an `Authorization` header in your client config:

```json theme={null}
{
  "mcpServers": {
    "chatarmin": {
      "url": "https://api.chatarmin.com/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}
```

Replace `YOUR_API_TOKEN` with your token. The same Bearer example is available on **Profile → MCP**.

## Troubleshooting

**Missing authorization state** — Start again from your AI client’s **Connect** button. Do not refresh the consent page manually.

**Authorization request expired** — OAuth states are short-lived. Click **Connect** in your AI client again.

**Session expired on consent screen** — Sign in to Chatarmin, then retry **Connect** from your AI client.

**Tools do not appear** — Confirm the MCP URL is exactly `https://api.chatarmin.com/api/mcp`, complete OAuth, and restart or reload MCP in your client.

Need help? Contact support through your [Chatarmin dashboard](https://app.chatarmin.com/) or see [Connect Chatarmin MCP to AI tools](/api-documentation/connect-chatarmin-mcp-to-ai-tools).
