StatsRaven

Claude and MCP

StatsRaven is an MCP server. Claude and other MCP clients can read your projects, run queries, show charts in the conversation and pin them to a sheet. You need no AI key in StatsRaven for this.

The address is your StatsRaven address followed by /mcp, for example https://stats.example.com/mcp. Settings, Claude and MCP shows it with ready setups and lets you turn MCP off.

Sign in with OAuth

Apps that support OAuth, such as Claude on the web and Claude Desktop, only need the address. Add StatsRaven as a custom connector with the /mcp address; the app opens StatsRaven, an admin signs in and allows it. The server must be reachable over HTTPS from the app. Connected apps are listed in Settings, Claude and MCP, where you can disconnect them.

Or use a token

Make a token in Settings, Claude and MCP, Tokens, or with statsraven admin-token. It is shown once. Send it as Authorization: Bearer YOUR_TOKEN.

Claude Code:

claude mcp add --transport http statsraven https://stats.example.com/mcp --header "Authorization: Bearer YOUR_TOKEN"

Add --scope user to use it in every project.

Cursor, in ~/.cursor/mcp.json or .cursor/mcp.json in a project:

{
  "mcpServers": {
    "statsraven": {
      "url": "https://stats.example.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

VS Code, in .vscode/mcp.json:

{
  "servers": {
    "statsraven": {
      "type": "http",
      "url": "https://stats.example.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

Tools

ToolWhat it does
get_schemaProjects, sources, fields, named patterns and what you taught StatsRaven. Clients call it first.
run_queryCounts, sums, averages and percentiles grouped and filtered, with the SQL that ran.
web_reportThe website numbers from Overview: visitors, pages, channels, campaigns, places, devices, goals and revenue.
online_nowWho is on your sites right now.
funnel, funnel_dropoffFunnels of pages and events, and where visits went when they left one.
run_sqlOne read-only SQL query, up to 500 rows.
compare_browser_trafficServer requests against snippet page views, to find bots and scrapers.
search_logs, get_samplesLog text search and example records, with IP addresses and emails masked.
show_chartShows a chart in the conversation, in clients that support MCP Apps.
pin_chartPins a chart to the project's sheet.
list_unlabeled_patterns, label_patternsLists log patterns without a name and saves names for them.
save_factSaves a fact about your business to Teach, such as how to tell a signed-in user.
create_alertMakes an alert, such as "tell me if payments stop for an hour". Needs the Alerts add-on to run; without it the alert waits as a draft.

Everything except pin_chart, label_patterns, save_fact and create_alert only reads. Each tool call is written to the change log with the token or app that made it.

Security