Firstlytics MCP server
OfficialThis server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
Firstlytics MCP server
Firstlytics is first-party web and product analytics: cookieless by default, with the tracker on your own domain. This is its Model Context Protocol server: Claude, Cursor and other AI assistants can answer questions such as "Where did last week's signups come from?" with your data, and manage your goals and funnels.
There are two ways to connect, with the same tools:
Hosted, at
https://api.firstlytics.com/v1/mcp(Streamable HTTP), for clients that connect to remote servers: Claude Code, Cursor, VS Code, Windsurf and others. Nothing to install.This package,
@firstlytics/mcp, over stdio, for clients that start local servers, such as Claude Desktop:npx -y @firstlytics/mcp. It is a bridge to the hosted server, so its tools are always the hosted server's.
Both sign in with an organisation API key.
The API key
In Firstlytics, Organization settings → API keys → New key. The key's scopes decide what the assistant can do, and a key limited to some sites sees only those:
Scope | Tools |
| reports (overview, timeseries, breakdowns, live, visits, events, errors, Web Vitals, journeys, goal conversions, funnel results) and custom SQL ( |
|
|
| creating, changing and deleting sites, goals and funnels |
|
|
| inviting people (not admins) and choosing which sites a member sees |
For an assistant that only reads reports, give it stats:read and sites:read. Add the write scopes only when
you want it to change things; it asks before deleting anything.
Related MCP server: KrystalView MCP Server
Set it up
Replace fl_live_... with your key.
Claude Code
claude mcp add --transport http firstlytics https://api.firstlytics.com/v1/mcp \
--header "Authorization: Bearer fl_live_..."Claude Desktop
Settings → Developer → Edit Config, then in claude_desktop_config.json:
{
"mcpServers": {
"firstlytics": {
"command": "npx",
"args": ["-y", "@firstlytics/mcp"],
"env": { "FIRSTLYTICS_API_KEY": "fl_live_..." }
}
}
}Restart Claude Desktop after saving. It needs Node.js 20 or later.
Cursor
In ~/.cursor/mcp.json (every project) or .cursor/mcp.json (one project):
{
"mcpServers": {
"firstlytics": {
"url": "https://api.firstlytics.com/v1/mcp",
"headers": { "Authorization": "Bearer fl_live_..." }
}
}
}VS Code
In .vscode/mcp.json; VS Code asks for the key the first time and keeps it:
{
"inputs": [
{ "type": "promptString", "id": "firstlytics-key", "description": "Firstlytics API key", "password": true }
],
"servers": {
"firstlytics": {
"type": "http",
"url": "https://api.firstlytics.com/v1/mcp",
"headers": { "Authorization": "Bearer ${input:firstlytics-key}" }
}
}
}Other clients
A client that connects to remote servers: https://api.firstlytics.com/v1/mcp, Streamable HTTP, with the header
Authorization: Bearer fl_live_....
A client that starts local servers: the command npx -y @firstlytics/mcp, with FIRSTLYTICS_API_KEY in its
environment.
Tools
Tool | What it does |
| the sites the key sees, with visitors in the last 24 hours; one site's settings |
| add a site, change its settings, delete it |
| visitors, visits, page views, bounce rate, duration, over a period and over time |
| top pages, sources, countries, devices, events, properties ... |
| visitors now and in the last 30 minutes |
| visits, and every event of one visit |
| recent events; custom events with counts |
| JavaScript errors, Core Web Vitals, common paths |
| funnels and where visitors drop off |
| goals and their conversions |
| annotations, saved segments, a report with a segment |
| members, invitations, which sites a member sees |
| custom SQL over the site's own data (Scale plan) |
| Search Console: clicks, impressions, CTR and position |
| signed-in users, one user's profile across days, users by trait |
| retention cohorts, DAU, WAU, MAU and stickiness, feature adoption |
| erase a user for an erasure request (asks for |
Every tool does what the matching API endpoint does, with the same checks. The user tools read data collected with cookies, so they need a site in a cookie mode; on a cookieless site they find no users.
The full guide: firstlytics.com/docs/settings/mcp-server.
Configuration
Environment variable | |
| an organisation API key ( |
| another server than |
Good to know
The assistant reads what your visitors left in your data: page titles, paths, referrers, event names. Treat what it suggests from them as you would any text from the web.
Delete a key in Organization settings when you no longer use it; the assistant loses access at once.
The key is sent only to the server in
FIRSTLYTICS_MCP_URL, over HTTPS. This package keeps nothing on disk.
Development
npm install
npm testThe tests run the bridge against a stand-in for the hosted server, in memory and as the firstlytics-mcp
command over stdio.
Questions and bugs: GitHub issues or support@firstlytics.com.
License
MIT, © FunFirst s.r.o.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Ask your website analytics in plain language and set up funnels, features and dashboards.
Query your Betterlytics web analytics from AI agents: traffic, funnels, journeys, errors, uptime.
Query your Logspot analytics, companies, and revenue from any AI assistant, and run your actions.
Real-time web analytics for AI agents: query traffic, funnels, revenue, and manage your sites.
Related MCP Servers
- AlicenseAqualityBmaintenanceConnects Google Analytics 4 data to Claude, Cursor and other MCP clients, enabling natural language queries of website traffic, user behavior, and analytics data with access to 200+ GA4 dimensions and metrics.124,647 PyPI243MIT
- AlicenseAqualityDmaintenanceEnables AI agents to access website analytics, including visitor sessions, UX friction, conversion funnels, and anomaly alerts.6MIT
- AlicenseNot gradedqualityDmaintenanceConnects to GA4, Mixpanel, PostHog and other analytics platforms, providing 9 tools for trend analysis, anomaly detection, funnel analysis, and more via natural language queries.1MIT
- AlicenseAqualityBmaintenanceEnables AI agents to query a privacy-focused analytics service for aggregate stats, breakdowns, realtime visitors, and time-series trends across cloud or self-hosted deployments. It also provides connectivity checks and guided analytics playbooks.8MIT