MCP Server
Connect AI assistants to your Actually Tracking analytics data using the Model Context Protocol.
Actually Tracking exposes an MCP (Model Context Protocol) server that lets AI assistants — Claude, Cursor, Windsurf, and others — query your analytics data directly in conversation.
Endpoint
https://api.actuallytracking.com/mcpSign in from your AI app (OAuth)
The easiest way: add the endpoint above to your app with no token, and it signs you in.
- Claude (web and desktop): Settings → Connectors → Add custom connector, and paste the endpoint.
- ChatGPT: add it as a connector (developer mode).
- Claude Code:
claude mcp add --transport http actuallytracking https://api.actuallytracking.com/mcp, then/mcpto sign in. - Cursor, VS Code and other apps that support MCP sign-in: add the URL as a remote server.
The app opens Actually Tracking, where you sign in and choose what it may read: one project, or every project in an organization if you're an organization admin. Signed-in apps can only read: the dashboard and report editing tools stay with client tokens. See and disconnect your apps in Project settings → MCP.
Under the hood this is OAuth 2.1 as the MCP authorization spec describes it: the server answers an unsigned request with 401 and a WWW-Authenticate header pointing at /.well-known/oauth-protected-resource/mcp, apps register themselves dynamically, and every sign-in uses PKCE. Access tokens last an hour and refresh for up to 90 days; removing someone from the organization or project ends their access at once.
Authentication with a client token
Use a client token for apps without MCP sign-in, for scripts, or when you want the AI to edit dashboards. Pass the token as an Authorization header:
Authorization: Bearer YOUR_TOKENIf your client can't set headers, pass it as a query parameter instead:
https://api.actuallytracking.com/mcp?token=YOUR_TOKENBoth work. Prefer the header: query strings travel through browser history, shell history and proxy logs, so a token in the URL is easier to leak by accident.
Token format
The token is a base64-encoded string of your client ID and client secret joined by a colon:
base64(clientId:clientSecret)From the dashboard
The easiest way to get your MCP token is directly from the dashboard — no terminal needed:
- New client — after creating a client via Settings → API Clients, the success screen shows the MCP Token field ready to copy.
- Onboarding — creating a project also creates a read-only MCP client for it. The install step shows that client's MCP Token once, next to the write client's ID and secret; Download saves all three as a text file.
From the terminal
echo -n "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" | base64Then send it with every request:
Authorization: Bearer <base64-encoded-token>Or, for clients that can't set headers, append it to the MCP URL:
https://api.actuallytracking.com/mcp?token=<base64-encoded-token>Required client type
Only read and root clients can authenticate with MCP. Write-only clients are rejected.
| Client type | Access |
|---|---|
read | Scoped to a single project (the one the client belongs to) |
root | Can query any project in your organization |
Use a read client if you want to limit the AI assistant to one project. Use a root client if you need cross-project access or want to list all projects.
Go to Settings → API Clients in your dashboard to create a client. See the Authentication guide for more details.
Connecting to Claude Desktop
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"actuallytracking": {
"type": "streamable-http",
"url": "https://api.actuallytracking.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}If your client doesn't read headers, drop that block and put the token in the URL instead: "url": "https://api.actuallytracking.com/mcp?token=YOUR_TOKEN".
Connecting with Claude Code CLI
Use the --header flag to pass the token via Authorization: Bearer:
claude mcp add --transport http actuallytracking https://api.actuallytracking.com/mcp \
--header "Authorization: Bearer YOUR_TOKEN"Or with the token in the URL:
claude mcp add --transport http actuallytracking "https://api.actuallytracking.com/mcp?token=YOUR_TOKEN"Available tools
Project access
| Tool | Description |
|---|---|
list_projects | List all projects accessible with your credentials. Root clients see all organization projects; read clients see only their own. |
get_dashboard_urls | Get clickable dashboard links for the current project — overview, events, profiles, sessions, and deep-links to specific items. |
Dashboards & reports
| Tool | Description |
|---|---|
list_dashboards | List all dashboards for a project. |
get_dashboard | Get a dashboard with its complete report configurations and saved layouts. |
list_reports | List all reports in a dashboard with their chart types and tracked events. |
get_report_data | Execute a saved report and return its data (time-series, funnel, metric, etc.). |
Dashboard management (root clients)
Available to root clients, and to keys for every project with the dashboards:write permission. A key with a permission list needs analytics:read to use MCP at all.
| Tool | Description |
|---|---|
create_dashboard | Create a dashboard in a project. |
update_dashboard | Rename a dashboard. |
delete_dashboard | Delete an empty dashboard, or delete it with its reports using forceDelete. |
create_report | Add a saved chart to a dashboard. |
update_report | Replace a saved chart's configuration. |
delete_report | Delete a saved chart. |
duplicate_report | Duplicate a saved chart in its dashboard. |
update_report_layout | Set a saved chart's dashboard grid position and dimensions. |
reset_dashboard_layout | Remove all saved chart layouts from a dashboard. |
Discovery
| Tool | Description |
|---|---|
list_event_names | Get the top 50 most common event names in the project. Call this first if you don't know exact event names. |
list_event_properties | List all property keys tracked for an event (or across all events). |
get_event_property_values | Get all distinct values for a specific event property. |
Events & sessions
| Tool | Description |
|---|---|
query_events | Query raw events with optional filters. Returns individual records with path, device, country, referrer, and custom properties. |
query_sessions | Query sessions with optional filters. Each session includes duration, entry/exit pages, bounce status, and attribution data. |
Profiles (users)
| Tool | Description |
|---|---|
find_profiles | Search and filter user profiles by name, email, location, inactivity, session count, or whether they performed a specific event. |
get_profile | Get a specific user profile with their most recent events. |
get_profile_sessions | Get all sessions for a user profile, ordered by most recent first. |
get_profile_metrics | Get computed lifetime metrics for a user: sessions, pageviews, bounce rate, revenue, and more. |
Groups (B2B)
| Tool | Description |
|---|---|
list_group_types | List all group types defined in the project (e.g. company, team). Call this first before querying groups. |
find_groups | Search for groups by name, ID, or type. |
get_group | Get a specific group with its properties and member profiles. |
Aggregated metrics
| Tool | Description |
|---|---|
get_analytics_overview | Key metrics for a date range: visitors, pageviews, sessions, bounce rate, and avg session duration. |
get_rolling_active_users | Time series of active users using a rolling window — DAU (1 day), WAU (7 days), or MAU (30 days). |
get_top_pages | Most visited pages ranked by pageviews. |
get_page_performance | Per-page bounce rate, avg session duration, sessions, and pageviews. |
get_page_conversions | Pages ranked by how many visitors went on to convert after viewing them. |
get_entry_exit_pages | Most common entry pages (session start) or exit pages (session end). |
get_top_referrers | Top traffic sources broken down by referrer name and type. |
get_country_breakdown | Visitor counts by country, region, or city. |
get_device_breakdown | Visitor counts by device type, browser, or OS. |
get_bot_traffic | AI crawlers and other bots: visits by group, each crawler's verified and spoofed visits, and the pages AI crawlers read most. |
get_releases | Commits on the project's connected GitHub branch for a date range: what shipped and when. |
get_release_impact | Visitors, sessions, the main KPI, revenue and bounce rate after a release, against the same length of time before it. |
get_realtime | Who is on the site right now: active count, locations, visitors of the last 30 minutes with their current page, and their latest events and payments. |
User behavior
| Tool | Description |
|---|---|
get_funnel | Analyze a conversion funnel between 2+ events — sign-up flows, checkout, onboarding. |
get_retention_cohort | Weekly user retention cohort table showing long-term product stickiness. |
get_weekly_retention_series | Week-over-week retention as a time series. |
get_user_last_seen_distribution | Histogram of user recency — useful for churn analysis. |
get_user_flow | Visualize user navigation flows as a Sankey diagram (before/after/between events). |
get_engagement_metrics | Engagement metrics over time. |
Google Search Console
These tools require GSC to be connected for the project from the project's settings in the dashboard (the "Google Search" tab). On a self-hosted instance the integration must first be enabled by the operator.
| Tool | Description |
|---|---|
gsc_get_overview | GSC performance over time: clicks, impressions, CTR, and avg position. |
gsc_get_top_pages | Top-performing pages from GSC ranked by clicks. |
gsc_get_page_details | Detailed GSC performance for a specific page including all queries driving traffic to it. |
gsc_get_top_queries | Top search queries ranked by clicks. |
gsc_get_query_opportunities | Low-hanging-fruit SEO opportunities: queries ranking 4–20 with meaningful search volume. |
gsc_get_query_details | Detailed GSC data for a specific search query with all pages that rank for it. |
gsc_get_cannibalization | Queries where multiple pages on your site compete against each other in Google. |
Rate limiting
60 requests per minute per client.