The MCP server now auto-detects your project from the API key. No more passing project_id on every tool call — just ask your agent about your traffic and it works.
All 11 tools and 5 prompts updated. project_id removed from every parameter list.
v0.3.1 — City-level breakdowns
Feature
MCP Server
New get_cities tool. Break down visitors and pageviews by city, with optional country filter.
Fixed get_overview failing on projects with engagement data.
SDK
Dev-environment filtering. The SDK now stays quiet on localhost, 127.0.0.1, and IPv6 loopback. No test traffic in production data.
v0.3.0 — Accurate session duration
Improvement
SDK
Engagement tracking — SDK now measures time-on-page while the tab is visible and sends it on navigation or close. Average session duration in your dashboard now reflects real reading time, not wall-clock span.
Session rotation after 30 minutes idle — returning to a tab after a long break starts a fresh session instead of inflating the previous one.
Pageview dedup — back-to-back duplicate fires within 500ms are suppressed, fixing double-counts from Next.js and React Strict Mode.
bfcache-aware — restoring a page from the browser back-forward cache correctly counts as a new pageview.
v0.2.0 — CDN bundle
Feature
SDK
IIFE bundle at dist/cdn.global.js for script-tag usage — no bundler required. Load via jsDelivr and call clamp.init("proj_xxx").
v0.1.0 — Initial release
Launch
SDK
@clamp-sh/analytics — lightweight tracking SDK. Auto-captures pageviews, supports custom events and user identification.
Script tag and npm install options
Privacy-first. No cookies, GDPR-friendly by default.
MCP Server
@clamp-sh/mcp — 10 tools + 5 prompts. Query your analytics from Cursor, Claude, VS Code, or any MCP client.
Read tools: overview, timeseries, top pages, top referrers, events, devices, countries
Write tools: create funnels, create alerts, get funnel results