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

# Connect your agent (MCP)

> Drive Minimo from Claude, Cursor, ChatGPT or any MCP client

## Overview

Minimo is exposed as an **MCP server** (Model Context Protocol). Once connected, your AI agent can read and act on your workspace — contacts, segments, email & WhatsApp templates, campaigns, automations and connection status — through Mo's tools.

The endpoint is `https://api.minimo.it/mcp` (Streamable HTTP).

Most clients — Claude, ChatGPT, Cursor — **don't need an API key**: point them at the URL and they discover the Minimo sign-in automatically (OAuth). You just click **Authorize**.

For scripts, automations and clients that can't run a sign-in flow, use an **API key**: an `mn-…` key with the **MCP (AI agent)** permission (`mcp:invoke`), sent as a Bearer token in the `Authorization` header.

<Tip>
  Want your agent to set this up itself? Point it at the [agent-setup instructions](/agent-setup) — a single prompt that
  installs the connection for you.
</Tip>

## Get an API key

<Steps>
  <Step title="From the dashboard (fastest)">
    In **Settings → Mo & MCP**, the **"Use Mo everywhere"** card shows your key already generated — copy it straight
    from the input. It's scoped to MCP only and valid for 1 year.
  </Step>

  <Step title="Or from Developer settings">
    Go to **Developer → API keys**, create a new key and select the **MCP (AI agent)** permission.
  </Step>

  <Step title="Copy it immediately">
    The key is shown **once**. Store it securely — you won't be able to see it again.
  </Step>
</Steps>

<Warning>
  API keys are sensitive credentials. Treat them like passwords and never commit them to public repositories.
</Warning>

## Claude (claude.ai)

<Steps>
  <Step title="Add the custom connector">
    Open [Claude → Settings → Connectors](https://claude.ai/customize/connectors) and click **Add custom connector**.
    Name it `Minimo` and set the URL to `https://api.minimo.it/mcp`.
  </Step>

  <Step title="Authorize">
    Press **Add**, then **Connect** — a Minimo window opens; click **Authorize**. No key to copy.
  </Step>
</Steps>

## Claude Code (CLI)

```bash theme={null}
claude mcp add --transport http minimo https://api.minimo.it/mcp
```

When prompted, click **Authorize** in the browser. For headless / CI use, pass a key instead:

```bash theme={null}
claude mcp add --transport http minimo https://api.minimo.it/mcp \
  --header "Authorization: Bearer mn-YOUR-API-KEY"
```

## Cursor

Add Minimo to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):

```json theme={null}
{
  "mcpServers": {
    "minimo": {
      "url": "https://api.minimo.it/mcp"
    }
  }
}
```

Reload Cursor and click **Authorize** when Minimo asks. For headless use, add the key header instead:

```json theme={null}
{
  "mcpServers": {
    "minimo": {
      "url": "https://api.minimo.it/mcp",
      "headers": {
        "Authorization": "Bearer mn-YOUR-API-KEY"
      }
    }
  }
}
```

## ChatGPT

Open [ChatGPT → Settings → Apps & Connectors](https://chatgpt.com/#settings/Connectors), enable **Developer mode** (Plus/Pro/Enterprise), click **Add connector** with the Minimo MCP URL, set authentication to **OAuth** and click **Authorize** in the Minimo window.

## Try it

Paste this into your connected agent — it's read-only and proves the connection end-to-end:

```text theme={null}
Using Minimo: how many contacts do I have, what segments exist, and which email templates are ready to send?
```

From there, Mo's tools cover the full workspace: search and upsert **contacts**, build **segments**, create and send **email / WhatsApp templates and campaigns**, inspect **automations** and their performance, check **connection status** (sender domain, database sync, WhatsApp), and even query Minimo's own **docs** — so the agent can answer "how does Minimo work?" without leaving the chat.

## Troubleshooting

* **401 Unauthorized** — the key is missing the `mcp:invoke` permission, expired, or malformed. Mint a fresh one from the dashboard card.
* **Connector shows no tools** — make sure the URL is exactly `https://api.minimo.it/mcp` (no `/v1` prefix) and the transport is HTTP (not SSE).
* **Wrong workspace** — keys are company-scoped: the agent acts on the company the key was created in. Ask the agent which workspace it's connected to, or reconnect from **Settings → Mo & MCP**.
