# MCP

> atrby runs a remote MCP server at /api/mcp; connect Claude Code, Cursor or Claude Desktop with an API key and query traffic and revenue through its tools.

Canonical: https://atrby.site/docs/mcp
Last updated: 2026-10-21

Ask Claude, Cursor or any MCP client about your traffic and revenue. Same data and permissions as the dashboard.

## Connect

atrby runs a remote MCP server at `https://app.atrby.site/api/mcp` (Streamable HTTP). Create a key under Settings → API keys and MCP; the screen fills it into these snippets for you.

*Claude Code · terminal*

```bash
claude mcp add --transport http atrby https://app.atrby.site/api/mcp \
  --header "Authorization: Bearer atr_live_YOUR_KEY"
```

*Cursor · .cursor/mcp.json*

```json
{
  "mcpServers": {
    "atrby": {
      "url": "https://app.atrby.site/api/mcp",
      "headers": { "Authorization": "Bearer atr_live_YOUR_KEY" }
    }
  }
}
```

*Claude Desktop · claude_desktop_config.json*

```json
{
  "mcpServers": {
    "atrby": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://app.atrby.site/api/mcp",
               "--header", "Authorization: Bearer atr_live_YOUR_KEY"]
    }
  }
}
```

## Tools

| Tool | What it does |
| --- | --- |
| list_sites | Sites in the workspace. Assistants usually start here. |
| visitors | Visitors, pageviews, revenue, conversion and bounce rate, with the previous period and channels. |
| revenue_by_source | Revenue, customers and refunds by source. |
| top_pages | Top pages, and entry pages by revenue. |
| funnel | An ordered funnel within a visit; default any page, /pricing, paid. |
| web_vitals | Core Web Vitals at p75, per page. |
| create_goal | Asks first. Needs a read-and-write key. |
| create_alert | Asks first. Needs a read-and-write key. |

**Changes wait for your yes.** A write tool first returns a preview of what it will do and changes nothing. The assistant has to show it to you and call the tool again with `confirm: true` after you agree.

## Try it

- "Which sources brought the most revenue on acme.io this month?"
- "Compare visitors this week with last week and tell me what changed."
- "Which landing pages have poor LCP and still earn money?"
- "Alert me if revenue drops 30% on acme.io."

MCP calls share the key's limit of 120 requests a minute. See [REST API](https://atrby.site/docs/api) for errors.

## Related
- [REST API](https://atrby.site/docs/api)
- [CLI](https://atrby.site/docs/cli)
