# MCP server

> Connect Claude, ChatGPT, Cursor or any MCP client to mettr, and ask about your sites in plain words: who is online, what changed, which sources convert.

Source: https://status.mettr.app/docs/mcp

mettr is an MCP server: an AI assistant can read your sites' analytics, and, if you allow it, build dashboards for you. Ask "why did sign-ups drop yesterday?" or "which pages do visitors from Hacker News read?" and the assistant queries mettr for the answer.

## Connect

The server's address is:

```text
https://mettr.app/mcp
```

Add it to your client as a remote MCP server (Streamable HTTP). The client opens mettr's sign-in in your browser (OAuth with PKCE): sign in, look at what it asks for, and allow it. There is no key to copy.

- **Claude**: Settings, Connectors, Add custom connector, with the URL above.
- **Claude Code**: `claude mcp add --transport http mettr https://mettr.app/mcp`
- **Any other client** that takes remote MCP servers with OAuth (ChatGPT, Cursor, VS Code and more): add a server with the URL above in its MCP or connector settings.

On the consent page, **Also change your dashboards** is unticked: tick it only for an assistant that should arrange panels and layouts, and name events with [labels](/docs/labels). Each connected app is listed under **Settings**, **Connected apps**, where it can be disconnected at once.

## Tools

Reading, always:

| Tool | What it answers |
|---|---|
| `list_sites` | The sites you can read, across your teams, with their ids |
| `get_realtime` | Who is online now, on which pages, from where, and the latest events |
| `query_metrics` | A total against its usual, a series, a breakdown ("views by source last week"), visit depth, the pages' [Web Vitals](/docs/browser-script#web-vitals) or a funnel, over a preset period or a range |
| `get_feed` | The events themselves, newest first, filtered |
| `get_layouts` | The site's layouts and yours (which it may change), the team's panels and yours, the built-in ones, sizes on the grid, the events the site sends, its [labels](/docs/labels), the [packages](/docs/packages) and [repositories](/docs/github) it follows, and whether this app may change them |
| `get_labels` | The site's [labels](/docs/labels) in order, what a label may say, the events the site sends with their props, and whether this app may change them |

Changing dashboards, only when you ticked it:

| Tool | What it does |
|---|---|
| `save_layout` | Makes a layout of yours or changes one, with the panels of your own it needs (of events, or of one package's downloads or one repository's stars); `dry_run` checks without saving |
| `delete_layout` | Deletes a layout this app made, never one you or another app made |
| `save_label` | Makes a label or changes one, and says how many events of the last 7 days it takes; `dry_run` says so without saving |
| `delete_label` | Deletes a label this app made, never one you or another app made |

An assistant works on [your own layouts and panels](/docs/dashboard#layouts), which only you see: it places the team's panels and reads the site's layouts, but never changes them. To share what it made, an owner or admin opens it and chooses **Make team layout**. A layout an assistant makes is not put on screen: it gives you the link, and opening it picks it. Free applies three labels a site and adds no fourth; only those who manage the site change them, by hand or through an assistant. Labels it makes or changes are recorded in mettr's audit log with the app's name.

## What an assistant sees

The same as you on the dashboard, and no more: the sites of your teams, bots and staff left out. Visitors are daily hashes with no address. An assistant never sees a key, a setting or anything of another team. Access ends when you disconnect the app, leave a team, or the app goes unused for 90 days.

## Things to ask

- "How many people are on the docs site right now, and on which pages?"
- "Compare last week's sign-ups by source with the week before."
- "Which countries grew most this month?"
- "Show the checkout funnel for mobile visitors."
- "Make me a layout for the launch: online, sign-ups, sources, and errors."
- "Label runs with errors above 0 as Validation failed, in red, and add a tile that counts them."
