kobbe

AI agents

Let Cursor, Claude Code, Codex, or another MCP-compatible agent inspect and manage Kobbe.

Kobbe exposes a scoped API for local AI agents. Use it when you want Cursor, Claude Code, Codex, or another MCP-compatible tool to inspect analytics, check setup health, or manage sites.

Agent access uses the same @kobbe/cli package as the CLI, but runs it in MCP server mode.

Setup

Create an API token in Kobbe → Settings → Account → Agent access. Copy it immediately; Kobbe only shows it once.

You can either log in once with the CLI:

kobbe login --token kbpat_YOUR_TOKEN

Or provide the token through the KOBBE_TOKEN environment variable.

MCP mode

Run Kobbe in MCP server mode directly, or use one of the client examples below:

kobbe mcp

Available tools

MCP tools include:

ToolWhat it does
list_sitesList sites the token can access.
get_overviewRead headline traffic KPIs for one site.
get_top_pagesInspect top pages for a site and time range.
get_sourcesInspect referrers, channels, and source breakdowns.
get_setup_healthCheck whether tracking and optional features are configured correctly.
get_next_actionsAsk Kobbe for suggested follow-up work.
create_siteCreate a new site when the token has write access.
update_siteUpdate site details when the token has write access.
rotate_site_tokenRotate a site tracker token.
delete_siteDelete a site with dangerous write access and confirmation.
reset_site_statsReset analytics data with dangerous write access and confirmation.

Token scopes

API tokens are workspace-scoped and can be revoked any time from account settings.

Scopes:

ScopeAllows
sites:readList and inspect sites.
analytics:readRead overview, pages, sources, setup health, and next actions.
sites:writeCreate or update sites.
tokens:writeRotate tracker tokens.
danger:writeDelete sites or reset analytics data.

Safety notes

Kobbe API tokens are management credentials. Treat them like passwords.

  • Store tokens in your local environment or the kobbe login config, not in source control.
  • Revoke tokens when an agent, machine, or project no longer needs access.
  • Use the smallest scope set that works.
  • Destructive actions still require typed confirmation, even when the token has danger:write.
  • Site tracker tokens are separate from API tokens. A tracker token can send analytics events, but it cannot manage a workspace.

Good prompts

  • “What changed on my site today?”
  • “Which page should I improve next?”
  • “List my sites and tell me which one needs setup.”
  • “Rotate the tracker token for this test site.”

For destructive actions, include the exact confirmation only after you have reviewed the agent’s proposed action.

MCP client examples

Pick the client you use. These examples assume you already ran kobbe login, so the CLI can read the saved token.

{
  "mcpServers": {
    "kobbe": {
      "command": "npx",
      "args": ["-y", "@kobbe/cli@latest", "mcp"],
      "env": {
        "KOBBE_TOKEN": "kbpat_YOUR_TOKEN"
      }
    }
  }
}