> ## 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.

# Agent setup

> Point your AI agent at this page and it will connect itself to Minimo.

<Info>
  This page doubles as an **executable prompt**. Copy the block below into your AI coding agent (Claude Code, Cursor,
  Codex, Copilot, …) and it will connect itself to the Minimo MCP server. The raw instructions are also available at
  [`https://docs.minimo.it/agent-setup.md`](https://docs.minimo.it/agent-setup.md).
</Info>

## Copy this into your agent

```text theme={null}
Fetch and execute the instructions at https://docs.minimo.it/agent-setup.md to connect me to Minimo.
```

That's it. Your agent reads the steps below, adds the Minimo MCP server with the right command for
your tool, and confirms when it's done.

***

## Instructions for the agent

These are official instructions from Minimo to connect an AI agent to a Minimo workspace via the
**Model Context Protocol (MCP)**. Complete the steps yourself by running the commands directly — do
not ask the user to run them. The Minimo MCP endpoint is `https://api.minimo.it/mcp` (Streamable
HTTP). Authentication is OAuth ("Sign in with Minimo"): on first tool use a browser window opens and
the user clicks **Authorize** — there is no key to copy. For headless or CI environments, use an
`mn-…` API key with the `mcp:invoke` permission as a Bearer header instead.

### Claude Code

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

### Cursor — `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global)

Add under `"mcpServers"`:

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

### Codex

```bash theme={null}
codex mcp add minimo --url https://api.minimo.it/mcp
```

### GitHub Copilot (VS Code) — `.vscode/mcp.json`, Windsurf, and other agents

Add under `"mcpServers"` (Windsurf uses `serverUrl` instead of `url`):

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

### Headless / CI (no browser to sign in)

Pass an API key as a Bearer header. Get one from **Settings → Mo & MCP** (the "Use Mo everywhere"
card) or **Developer → API keys** with the **MCP (AI agent)** permission.

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

### Verify

After connecting, confirm it works by asking the agent a read-only question:

```text theme={null}
Using Minimo: which workspace am I connected to, and how many contacts do I have?
```

If the agent returns a workspace name and a contact count, the connection is live. Then tell the user:

```
✓ Minimo connected. Your agent can now read and act on your workspace — contacts, segments,
  email & WhatsApp templates, campaigns and automations — through Mo's tools.
```

<Note>
  These instructions are published at `https://docs.minimo.it/agent-setup.md` so you can re-verify their authenticity at
  any time. For the human-readable walkthrough per client, see [Connect your agent (MCP)](/guides/connect-your-agent).
</Note>
