---
title: "Connect Your Agent"
description: "Give an AI app like Claude, ChatGPT, Claude Code or Cursor access to your Contito sites, by signing in or with an API key."
url: "https://www.contito.com/docs/ai-agents/connect-your-agent"
published: "2026-11-16T06:04:37.917Z"
modified: "2026-11-16T06:04:37.917Z"
---

# Connect Your Agent

Contito has an MCP server.

MCP is the standard way AI agents use outside tools.

Once your agent is connected, it can:

- Create sites and change their settings.
- Write and publish content, with images, tags and dates.
- Design a custom theme for your site.

Connecting an agent needs a paid plan: Starter, Pro or Ultimate. It stops working if your plan is cancelled or expires.

## Two ways to connect

| Way | Works with | What you do |
| --- | --- | --- |
| **Sign in** | Claude, ChatGPT, Cursor, Claude Code, Codex, Gemini CLI | Give the app Contito's address, then sign in and click **Allow** |
| **API key** | Claude Code, Codex, Cursor, Gemini CLI, VS Code and any agent with an mcp.json file | Create a key in Contito and paste it into the agent's setup |

Chat apps like Claude and ChatGPT only sign in.

Coding agents can do either.

Both start from **Connections**: click the Contito logo to open the app menu, and choose **Connections**.

![The Connections dialog with the API keys, Create Key, the MCP URL and a connected app numbered](https://www.contito.com/__asset/dvftpx)

| \# | What it does |
| --- | --- |
| 1 | An API key. Click it to edit, roll or delete it. |
| 2 | **Create Key**: makes a new API key. |
| 3 | The MCP URL, your agent's address for Contito. The button copies it. |
| 4 | A connected app, with **Disconnect** to remove it. |

## Connect by signing in

### Step 1: Add Contito to the app

Copy the MCP URL from **Connections**: `https://app.contito.com/mcp`.

Then add it in your app:

| App | Where |
| --- | --- |
| **Claude** | **Settings \> Connectors \> Add custom connector**. Paste the URL and click **Add**, then **Connect**. |
| **ChatGPT** | **Settings \> Connectors**, with developer mode turned on. Create a connector with the URL. |
| **Cursor** | Add Contito to your `mcp.json` file with the URL and no key (below), then click **Connect** next to it in Cursor's MCP settings. |
| **Claude Code** | Run the command below, then type `/mcp`, pick **contito** and choose **Authenticate**. |
| **Codex** | Run the commands below. |
| **Gemini CLI** | Run the command below, then type `/mcp auth contito` in Gemini CLI. |

```bash
# Claude Code
claude mcp add --transport http contito https://app.contito.com/mcp

# Codex
codex mcp add contito --url https://app.contito.com/mcp
codex mcp login contito

# Gemini CLI
gemini mcp add --transport http contito https://app.contito.com/mcp
```

For Cursor, the `mcp.json` entry without a key:

```json
{
  "mcpServers": {
    "contito": { "url": "https://app.contito.com/mcp" }
  }
}
```

### Step 2: Allow it in Contito

The app opens Contito in your browser.

Sign in if Contito asks, then check what the app may do.

![The Contito consent screen for Claude, with the app name, the three permission switches and Allow numbered](https://www.contito.com/__asset/w01tem)

| \# | What it does |
| --- | --- |
| 1 | The app asking to connect. **Verified** means Contito checked where it comes from. |
| 2 | What the app may do. All three start on. Turn a switch off to leave that out. |
| 3 | **Allow**: connects the app. **Cancel** sends it back without access. |

| Switch | Lets the app |
| --- | --- |
| **Create sites and change their settings** | Make sites and change their name, navigation, logo and theme style |
| **Read, publish, edit and delete content and images** | Work on your contents, collections, tags and images, and run a sync |
| **Build, publish and switch themes** | Design a custom theme and change the theme your site uses |

The app can always see which sites you have.

It acts as you, so it never does more than you can.

A program on your own computer, such as Claude Code or Codex, gets a yellow warning instead of **Verified**.

Contito can't confirm which program it is.

Click **Allow** only if you started the connection yourself, just now.

Contito emails you each time an app is connected.

If you didn't connect it, disconnect it under **Connections** right away.

Only an admin of your organization, on a paid plan.

Contito also asks you to sign in again if your last sign-in was more than 30 minutes ago.

Up to 180 days.

After that, connect the app again the same way.

## Connect with an API key

### Step 1: Get an API key

1. Open **Connections** and click **Create Key**.
2. Give it a name and pick its scopes.
3. Copy the key when it appears. It is shown only once.

[API Keys and Permissions](https://www.contito.com/ai-agents/api-keys-and-permissions) explains each scope and which ones you need.

### Step 2: Add Contito to your agent

The easiest route: when your key appears, open the **Choose what to copy** menu next to it and pick your agent.

Contito gives you a ready-made command with your key already in it.

![The new API key with the Choose what to copy menu open, listing API key, Claude Code, mcp.json, Codex, Gemini CLI and VS Code](https://www.contito.com/__asset/1dl95f5)

Paste that command into your terminal (the app where you run your agent) and press Enter.

To set it up by hand, use the command for your agent below.

Replace `YOUR_API_KEY` with your key.

#### Claude Code

Run this in the folder you'll work from:

```bash
claude mcp add --transport http contito https://app.contito.com/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"
```

Then start Claude Code and type `/mcp`. Contito shows as connected, with its tools listed.

#### Codex

```bash
export CONTITO_API_KEY="YOUR_API_KEY"
codex mcp add contito --url https://app.contito.com/mcp \
  --bearer-token-env-var CONTITO_API_KEY
```

#### Gemini CLI

```bash
gemini mcp add --transport http contito https://app.contito.com/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"
```

#### VS Code

```bash
code --add-mcp '{"name":"contito","type":"http","url":"https://app.contito.com/mcp","headers":{"Authorization":"Bearer YOUR_API_KEY"}}'
```

#### Cursor and other agents that use an mcp.json file

Add this to the agent's `mcp.json` file:

```json
{
  "mcpServers": {
    "contito": {
      "type": "http",
      "url": "https://app.contito.com/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}
```

For any other agent, the server address is `https://app.contito.com/mcp` and the key goes in an `Authorization: Bearer YOUR_API_KEY` header.

Treat the key like a password.

Anyone who has it can work on your sites with the scopes you gave it.

Never commit a config file that contains it to a shared repository.

## Check it works

Ask your agent:

> List my Contito sites.

It answers with your sites by name.

![Claude Code's MCP server list with contito connected and its tools counted](https://www.contito.com/__asset/1kyrqx)

| \# | What it shows |
| --- | --- |
| 1 | **contito** with a check mark and its tool count: the agent is connected. |

You don't need to teach the agent how Contito works.

The tools describe themselves, and the agent reads Contito's writing guide and theme guide when it needs them.

No Contito tools, or Contito shows as failed? See

[Agent Troubleshooting](https://www.contito.com/ai-agents/agent-troubleshooting)

.

## Next steps

- [Writing Content with an Agent](https://www.contito.com/ai-agents/writing-content-with-an-agent)
- [Custom Themes with an Agent](https://www.contito.com/ai-agents/custom-themes-with-an-agent)
- [API Keys and Permissions](https://www.contito.com/ai-agents/api-keys-and-permissions)
