MCP server

TraceIQ's MCP server is an analytics copilot for AI clients. Through a local stdio process it can read analytics, funnels, retention, errors, users, API health, and feature flags — and, with a write-scoped token, toggle flags and manage funnels and alerts. The client talks to the traceiq-mcp-server npm package, and the MCP server talks to your TraceIQ API using a personal access token.

Create the token from Settings. In Personal access tokens, choose a name such as Claude Desktop, then select the scopes the assistant should have. For a read-only copilot use projects:read, analytics:read, insights:read, funnels:read, users:read, and errors:read. Add write scopes (flags:write, funnels:write, alerts:write) only if the assistant may make changes. Read-only tokens cannot mutate anything.

The dashboard shows the full tiq_pat_... value once and generates a ready-to-copy Claude Desktop config. TraceIQ stores only a SHA-256 hash after creation.

Claude Desktop config:

json
{
  "mcpServers": {
    "traceiq": {
      "command": "npx",
      "args": ["-y", "traceiq-mcp-server"],
      "env": {
        "TRACEIQ_API_KEY": "tiq_pat_your_token_here",
        "TRACEIQ_API_URL": "https://api.traceiq.run"
      }
    }
  }
}

Cursor can use the same command as an MCP server:

bash
npx -y traceiq-mcp-server
TRACEIQ_API_KEYrequiredA personal access token that starts with tiq_pat_.
TRACEIQ_API_URL'https://api.traceiq.run'TraceIQ API base URL.
TRACEIQ_MCP_TIMEOUT_MS30000Per-request timeout in milliseconds.
TRACEIQ_MCP_RETRIES2Retries for 408/429/5xx responses (exponential backoff).

The server currently exposes these tools:

  • list_projects — List projects available to the token. Requires projects:read.
  • get_analytics_overview — Headline totals, revenue, top events/devices/countries. Requires analytics:read.
  • get_web_analytics — Visitors, pageviews, sessions, bounce rate (current vs previous). Requires analytics:read.
  • get_api_performance — Endpoint p95/avg latency, error rate, busiest and slowest routes. Requires analytics:read.
  • list_event_names — Tracked events with counts. Requires insights:read.
  • get_trends — Event counts over time with period-over-period change. Requires insights:read.
  • get_retention — Weekly cohort retention table and averages. Requires insights:read.
  • list_funnels / get_funnel / get_funnel_results / get_funnel_step_users — Funnel definitions, conversion and drop-off, and the users behind each step. Requires funnels:read.
  • summarize_funnel_dropoff — A plain-language (LLM) explanation of why a funnel drops off. Requires funnels:read.
  • list_error_issues / get_error_issue — Aggregated error issues and deep-dive detail. Requires errors:read.
  • list_users / get_user / get_user_timeline — Users, full profiles, and a concise chronological timeline. Requires users:read.
  • list_feature_flags — List feature flags. Requires flags:read.
  • list_alerts — List alerts and recent fires. Requires alerts:read.
  • explain_conversion_drop — Funnel + traffic analysis with the biggest drop-off and a data-backed interpretation. Requires funnels:read and analytics:read.
  • summarize_api_health — API health verdict: error rate and slowest/error-prone/busiest endpoints. Requires analytics:read.
  • show_retention_changes — Retention cohorts with a plain-language note. Requires insights:read.
  • find_users_who_failed_checkout — Users who dropped at the final funnel step. Requires funnels:read and users:read.
  • toggle_feature_flag — Enable or disable a feature flag. Requires flags:write.
  • create_funnel / update_funnel / delete_funnel — Manage funnels. Requires funnels:write (delete is destructive).
  • create_alert / set_alert_enabled / delete_alert — Manage alerts. Requires alerts:write (delete is destructive).

Revoke a token from Settings at any time. For automation, the same dashboard endpoint is available atPOST /v1/dashboard/personal-access-tokens, but the Settings flow is the recommended path.