Read-only analytics for Convex apps, queryable via MCP from Claude, Cursor, and other clients.
Read-only analytics interface for Convex apps queryable through Claude and Cursor.
Captured live from the server via tools/list.
list_projects
List all Convalytics projects on the team this token belongs to. Useful when the agent needs to confirm the project it's querying against. No arguments.
No parameters.
get_usage
Return the current month's custom-event usage, monthly quota, retention days, and plan name for the team.
No parameters.
top_pages
Return the top pages for a specific project, ranked by views in a time window. Default window is the last 7 days. Use list_projects first if you don't know the project name. Returns path, views, uniqueVisitors, and percentage of total views for each page. Pass `user` to see pages a specific visitor hit.
Parameters (5)
projectstringrequired
Project name (case-insensitive, e.g. 'slopbench') or project id from list_projects.
sincenumber
Start of window as unix milliseconds. Defaults to 7 days ago.
untilnumber
End of window as unix milliseconds. Defaults to now.
limitnumber
Maximum number of pages to return. Default 20, max 50.
userstring
Optional. Filter to one visitor/user. Accepts userEmail (case-insensitive) or visitorId (exact). For the full per-user snapshot prefer user_activity.
top_referrers
Return the top referring hosts for a specific project, ranked by visit count in a time window. Includes '(direct)' for visits with no referrer. Default window is the last 7 days.
Parameters (4)
projectstringrequired
Project name (case-insensitive, e.g. 'slopbench') or project id from list_projects.
sincenumber
Start of window as unix milliseconds. Defaults to 7 days ago.
untilnumber
End of window as unix milliseconds. Defaults to now.
limitnumber
Maximum number of referrers to return. Default 10, max 50.
pageviews_count
Count page views for a specific project in a time window. Page views are the automatic hits captured by the browser script tag (separate from custom events). Use this for web-traffic questions like 'how many pageviews in the last 24 hours'. Default window is the last 7 days. Pass `user` to scope to one visitor.
Parameters (4)
projectstringrequired
Project name (case-insensitive, e.g. 'slopbench') or project id from list_projects.
sincenumber
Start of window as unix milliseconds. Defaults to 7 days ago.
untilnumber
End of window as unix milliseconds. Defaults to now.
userstring
Optional. Filter to one visitor/user. Accepts userEmail (case-insensitive) or visitorId (exact). For the full per-user snapshot prefer user_activity.
events_count
Count CUSTOM PRODUCT events for a specific project in a time window, optionally filtered to one event name and/or one user. Custom events are emitted by explicit analytics.track() calls in app code (signup_completed, payment_succeeded, etc.). This does NOT count page views — use pageviews_count or weekly_digest for those. Returns count, unique visitors, and a `truncated` flag if the scan hit the maximum scan size.
Parameters (5)
projectstringrequired
Project name (case-insensitive, e.g. 'slopbench') or project id from list_projects.
namestring
Optional event name to filter by (e.g. 'signup_completed'). If omitted, counts all custom events in the window. Do NOT pass 'page_view' here — page views are in a separate table.
sincenumber
Start of window as unix milliseconds. Defaults to 7 days ago.
untilnumber
End of window as unix milliseconds. Defaults to now.
userstring
Optional. Filter to one visitor/user. Accepts userEmail (case-insensitive) or visitorId (exact). For the full per-user snapshot prefer user_activity.
recent_events
Return the most recent custom events for a specific project, optionally filtered to one event name and/or one user. PII (userEmail, userName, props) is redacted by default; pass redact: false to include them.
Parameters (5)
projectstringrequired
Project name (case-insensitive, e.g. 'slopbench') or project id from list_projects.
namestring
Optional event name to filter by (e.g. 'signup_completed'). Omit to return events of any name.
limitnumber
Maximum number of events to return. Default 20, max 100.
redactboolean
If true (default), userEmail/userName are null and props is {}. Set to false to include them.
userstring
Optional. Filter to one visitor/user. Accepts userEmail (case-insensitive) or visitorId (exact). For the full per-user snapshot prefer user_activity.
user_activity
Composite snapshot of a specific user's activity on a project. Returns an identity block (visitorId, userEmail, userName, firstSeen, lastSeen), total pageviews, total custom events, session count, top pages this user visited, their most-fired event names, and their 20 most recent events with props. Use this for 'how is dancleary54@gmail.com using my app?' style questions — one call, full picture. For ad-hoc drill-down (just a count, just recent events) pass `user` to the individual tools instead. Default window is the last 7 days.
Parameters (4)
projectstringrequired
Project name (case-insensitive, e.g. 'slopbench') or project id from list_projects.
userstringrequired
User identifier. Accepts userEmail (case-insensitive, e.g. 'dan@example.com') or visitorId (the exact string passed as userId on the original track() call).
sincenumber
Start of window as unix milliseconds. Defaults to 7 days ago.
untilnumber
End of window as unix milliseconds. Defaults to now.
weekly_digest
Composite snapshot of a project's web analytics over a lookback window. Returns unique visitors, pageviews, sessions, bounce rate, average session duration, top 5 pages, top 5 referrers, total custom events, and top 5 event names. Includes period-over-period comparison against the prior equal-length window unless compare: false. Prefer this over chaining top_pages + top_referrers + events_count when the agent just wants to report on the week.
Parameters (3)
projectstringrequired
Project name (case-insensitive, e.g. 'slopbench') or project id from list_projects.
daysnumber
Lookback window in days, 1 to 90. Default 7.
compareboolean
Include period-over-period comparison against the prior equal-length window. Default true. Set false for faster response when only current numbers matter.
list_funnels
List active funnels defined on a project. A funnel is a saved ordered sequence of steps (events or pageview paths) that Convalytics computes step-by-step conversion for. Soft-deleted funnels are excluded.
Parameters (1)
projectstringrequired
Project name (case-insensitive, e.g. 'slopbench') or project id from list_projects.
get_funnel
Return the full definition of one funnel by id: name, description, ordered steps, and conversion window.
Parameters (1)
funnelIdstringrequired
Funnel id from list_funnels or create_funnel.
create_funnel
Create a new funnel on a project. Steps are 2–10 ordered events or pageview paths. conversionWindowMs caps how long a visitor has between consecutive steps (default 7 days); this is the step-to-step limit, without which a funnel is just event co-occurrence. Returns { id } on success.
Parameters (5)
projectstringrequired
Project name (case-insensitive, e.g. 'slopbench') or project id from list_projects.
namestringrequired
Human-readable name.
descriptionstring
Optional longer description.
stepsarrayrequired
Ordered list of 2–10 steps. Visitors must hit them in order.
conversionWindowMsnumber
Max ms between consecutive steps. Default 7 days (604800000). Bounds: 60000 (1 min) to 7776000000 (90 days).
update_funnel
Patch an existing funnel. Any subset of name/description/steps/conversionWindowMs. Refuses updates on deleted funnels.
Parameters (5)
funnelIdstringrequired
namestring
descriptionstring
stepsarray
conversionWindowMsnumber
delete_funnel
Soft delete a funnel. The row is retained with status='deleted' and excluded from list/get/compute. Idempotent — calling twice is a no-op. Use if the funnel is obsolete; the record is kept for audit and cannot be undone from MCP.
Parameters (1)
funnelIdstringrequired
compute_funnel
Run a funnel over a time window and return per-step visitor count, conversion from previous step, conversion from start, and average time to convert between steps. Returns `truncated` flags if the scan cap was hit.
Parameters (3)
funnelIdstringrequired
sincenumber
Start of window as unix milliseconds. Defaults to 7 days ago.
untilnumber
End of window as unix milliseconds. Defaults to now.
Web analytics — automatic page views, sessions, bounce rate, referrers, and device/browser breakdowns via a lightweight script tag.
Product event tracking — track signups, payments, feature usage, and any custom event directly from Convex mutations and actions. Server-side events can't be blocked by ad blockers.
Everything flows into a single dashboard. Projects auto-provision on first event — no account required to start tracking.
Quick start
bash
npx convalytics init
This auto-provisions a project, installs the Convex component, patches convex/convex.config.ts, creates convex/analytics.ts with the write key inlined, inserts the browser script tag into index.html, and installs a skill file for AI agents. Works with Cursor, Claude Code, and other AI coding agents out of the box.