What it does

Invalidate the current API token and issue a new one. Returns the new MCP URL.

Example prompts

Ask Claude (or any MCP client connected to mcp-analytics) something like:

Regenerate my mcp-analytics API token.

The client will pick regenerate_api_token automatically based on the prompt and your account's available sites.

How to call it directly

If you're integrating from your own code rather than a chat client, this is the JSON-RPC payload:

curl -X POST https://mcp-analytics.com/mcp \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "regenerate_api_token",
    "arguments": {}
  }
}'

Token comes from /settings after you sign up. Replace any required arguments above.

Related tools

  • top_pages: Most-viewed URL paths.
  • get_overview: TL;DR for the period: headline metrics (pageviews, visitors, sessions, bounce rate, avg session duration) plus pageviews_change_pct vs the previous equivalent window (same elapsed length; its bounds are returned in previous_period as local time with offset), top page, top traffic source, bot share, and top_events: the site's own events by count (up to 10; pageview and the engagement beacon are left out; list_events has them all).
  • get_started_guide: Markdown walkthrough of the mcp-analytics workflow: adding sites, installing the tracker, querying analytics, custom events.
  • event_details: Details for one event.
  • breakdown: Breakdown of visits by browser, os, device_type, or country (country empty in MVP).