# Connect an AI agent with MCP

> Give a coding agent access through MCP, with a read or write token.

> **Caution**
> An agent can send the data that it reads to its AI provider. A token with write access can also change event names, record changes, and create or delete funnels. Connect only an agent that you trust.

## Create a token

1. Open **Settings**, then **Agent**.
2. Give the token a name.
3. Clear **Can make changes** if the agent must only read.
4. Click **Create token**.
5. Copy the token. Checkend shows it one time.

## Claude Code

```sh
claude mcp add --transport http checkend https://app.checkend.com/mcp --header "Authorization: Bearer YOUR_TOKEN"
```

## Other agents

An MCP client must use streamable HTTP and a bearer token. The MCP server has no OAuth sign-in today.

An agent without MCP can read [agent.md](https://app.checkend.com/agent.md) and use the [HTTP API](/docs/api.md).

## Tools

| Tool | What it does | Access |
| --- | --- | --- |
| `list_sites` | Lists the sites with their numbers of the last 24 hours | Read |
| `query` | Gives metrics by dimension and time | Read |
| `list_events` | Lists the events and their name problems | Read |
| `event_properties` | Divides one event by a property | Read |
| `funnel` | Calculates a funnel | Read |
| `list_funnels` | Lists the stored funnels of a site | Read |
| `create_funnel` | Stores a funnel of 2 to 8 steps, so that it shows on the dashboard | Write |
| `delete_funnel` | Deletes a stored funnel | Write |
| `list_changes` | Lists the changes and their results | Read |
| `record_change` | Records a change | Write |
| `rename_event` | Renames, merges or hides an event name | Write |

The agent features show in the app after a token was used in the last 30 days.

See [what an agent can do with Checkend](/mcp/), with example questions and the tool that answers each.
