@vskstudio/takt-mcp
OfficialA read-only MCP server that lets AI agents query Takt's privacy-friendly web analytics for a site over stdio.
List the sites/domains in an organization (
list_sites, needssites:read).Get top-line metrics — visitors, sessions, pageviews, bounce rate, avg duration — with optional previous-period comparison (
get_summary).Get visitor/pageview time series bucketed by hour or day (
get_timeseries).Rank top values of a dimension: pages, sources, countries, regions, cities, devices, browsers, OS, UTMs, entry/exit pages (
get_breakdown), filterable by country and limit.See visitors active in the last 5 minutes (
get_realtime).Report goal conversions and step-by-step funnels (
get_goals,get_funnels).Report revenue grouped by currency for a revenue event (
get_revenue).Inspect event data: list custom property keys and break a property down by value (
list_event_properties,get_property_breakdown).Filter most tools by preset
period(day/7d/30d/month/6mo/12mo), customfrom/todates, and an IANAtz.Expose a
takt://sitesMCP resource (whenTAKT_ORGis set) for site context without a tool call.Note: this static-key stdio package is deprecated in favor of the hosted remote MCP server at
https://taktlytics.com/mcp.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@vskstudio/takt-mcp Show me the summary stats for today"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@vskstudio/takt-mcp
Deprecated. This static-key stdio package is no longer the recommended way to connect
an AI agent to Takt. Takt now hosts a remote MCP server with OAuth 2.1 — no API key to
generate or copy, per-team and per-scope consent, and one-click revocation. Point your MCP
client at https://taktlytics.com/mcp instead:
claude mcp add --transport http takt https://taktlytics.com/mcpSee the MCP docs. This repository is archived and no longer maintained.
Model Context Protocol server for Takt — query your sites' privacy-friendly analytics from any MCP-aware AI agent (Claude Desktop, Claude Code, Cursor, …).
The server is a thin, read-only client over the Takt public API. It runs on your machine and talks to a Takt instance using your API key — by default the hosted origin https://taktlytics.com, or your own self-hosted instance via TAKT_BASE_URL.
┌─────────────┐ stdio (MCP) ┌────────────┐ HTTPS + Bearer ┌──────────────┐
│ AI agent │ ───────────────▶│ takt-mcp │ ──────────────────▶│ Takt instance│
│ (Claude, …) │ ◀────────────── │ (this pkg) │ ◀───── JSON ────── │ /api/v1 │
└─────────────┘ └────────────┘ └──────────────┘Requirements
Node.js ≥ 18
A Takt account on the hosted service (
https://taktlytics.com), or a self-hosted Takt instance (setTAKT_BASE_URL)A Takt API key (Dashboard → Settings → API keys) with the permissions for the tools you want to use:
stats:read— every reporting tool (summary, timeseries, breakdown, realtime, goals, funnels, revenue, event properties, property breakdown)sites:read—list_sites
A Takt API key is bound to a single site. So
list_sitesreturns just that one site, and thedomainyou pass to the other tools must be the key's own domain (any other domain returns "site not found"). To cover several sites, mint one key per site and run one server instance per key.
Related MCP server: plausible-whenever-mcp
Quick start
The server runs straight from npm with npx — nothing to install or build. Every
client below boils down to the same command, npx -y @vskstudio/takt-mcp, plus
your TAKT_BASE_URL / TAKT_API_KEY in the environment.
Claude Code
One command, no file to edit (use -s user for a global install instead of the
current project):
claude mcp add takt \
-e TAKT_BASE_URL=https://taktlytics.com \
-e TAKT_API_KEY=takt_sk_… \
-e TAKT_ORG=my-org \
-- npx -y @vskstudio/takt-mcpClaude Desktop
Edit claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"takt": {
"command": "npx",
"args": ["-y", "@vskstudio/takt-mcp"],
"env": {
"TAKT_BASE_URL": "https://taktlytics.com",
"TAKT_API_KEY": "takt_sk_…",
"TAKT_ORG": "my-org"
}
}
}
}Codex CLI
Add a block to ~/.codex/config.toml:
[mcp_servers.takt]
command = "npx"
args = ["-y", "@vskstudio/takt-mcp"]
env = { TAKT_BASE_URL = "https://taktlytics.com", TAKT_API_KEY = "takt_sk_…", TAKT_ORG = "my-org" }Cursor / Windsurf
Use the same mcpServers JSON as Claude Desktop, in ~/.cursor/mcp.json
(Cursor) or ~/.codeium/windsurf/mcp_config.json (Windsurf).
VS Code (Copilot / Cline)
code --add-mcp '{"name":"takt","command":"npx","args":["-y","@vskstudio/takt-mcp"],"env":{"TAKT_BASE_URL":"https://taktlytics.com","TAKT_API_KEY":"takt_sk_…","TAKT_ORG":"my-org"}}'Or commit a .mcp.json (Cline) / .vscode/mcp.json (Copilot, under a "servers"
key) with the same fields.
Any other MCP client
The package ships a takt-mcp binary speaking MCP over stdio, so any client that
can launch a command works:
TAKT_BASE_URL=https://taktlytics.com TAKT_API_KEY=takt_sk_… npx -y @vskstudio/takt-mcpUseful flags:
npx @vskstudio/takt-mcp --version # print the version
npx @vskstudio/takt-mcp --help # print usage and the full environment referenceConfiguration
The server is configured entirely through environment variables:
Variable | Required | Default | Description |
| no |
| Base URL of the Takt instance. Defaults to the hosted origin; set it to point at a self-hosted instance. Must be |
| yes | — | API key, sent as a |
| no | — | Default organization slug for |
| no |
| Per-request timeout in ms (range |
| no |
| Retries on transient failures — |
| no |
| Set to |
Invalid values fail fast at startup with a clear message on stderr.
Tools
Tool | Description | Permission |
| List the sites (domains) in an organization. |
|
| Top-line metrics: visitors, sessions, pageviews, bounce, duration. |
|
| Visitors/pageviews over time, bucketed by hour or day. |
|
| Top values of a dimension (pages, sources, countries, devices, …). |
|
| Visitors active in the last 5 minutes. |
|
| Conversions per goal. |
|
| Step-by-step funnel reports. |
|
| Revenue grouped by currency for a revenue event. |
|
| List the custom property keys recorded for an event. |
|
| Break down a custom property of an event by value. |
|
Most tools accept a time filter:
period— one ofday,7d,30d,month,6mo,12mo(default7d),or an explicit
from/torange (YYYY-MM-DD),plus an optional
tz(IANA timezone, e.g.Europe/Paris).
get_summary and get_timeseries also accept compareToPrevious to return the previous period of equal length. get_breakdown accepts dimension, an optional country (ISO-3166 alpha-2), and limit.
See the Tools reference for the full parameter list of each tool.
Resources
When TAKT_ORG is set, the server exposes one MCP resource:
URI | Description |
| The sites in your organization, as JSON — context without a tool call. |
How it works
stdio transport. stdout carries the MCP protocol; all diagnostics go to stderr.
Resilient HTTP. Each request has a timeout (
TAKT_TIMEOUT_MS) and retries transient429/5xx/network errors with exponential backoff and jitter, honouringRetry-After.Clean errors. Non-2xx responses are normalised to a
Takt API error (status code): message, including the402 quota_api_depassebilling case.Safe by construction. The base URL is validated; org/domain inputs are URL-encoded so they can't inject path segments; the API key never appears in any output.
See docs/architecture.md for the module layout and design rationale.
Troubleshooting
Symptom | Likely cause / fix |
| If set, it must be a full URL — e.g. |
| Include the scheme, e.g. |
| The key is wrong or revoked. |
| The key lacks the required permission ( |
| The |
| The API quota for your plan is exhausted. |
| Raise |
Set TAKT_DEBUG=1 to see each request (method, path, query) and retry decisions on stderr.
Development
pnpm install
pnpm test # vitest
pnpm typecheck # tsc --noEmit
pnpm lint # eslint
pnpm build # tsup → dist/The full gate (what CI runs): pnpm lint && pnpm typecheck && pnpm test && pnpm build. See CONTRIBUTING.md.
Documentation
Tools reference — every tool and parameter
Configuration — env vars and tuning
Architecture — modules and design
Recipes — example prompts and flows
Project wiki
License
MIT © VSK Studio
Available Tools
10 toolsget_breakdownB
Top values of a dimension for a site (e.g. top pages, traffic sources, countries, devices, browsers).
Inputs: domain (required), dimension (required), to, tz, +4 more.
get_funnelsC
Funnel reports (step-by-step conversion) for a site. Requires a key with the stats:read permission.
Inputs: domain (required), to, tz, from, +1 more.
get_goalsB
Conversions per goal for a site. Requires a key with the stats:read permission.
Inputs: domain (required), to, tz, from, +1 more.
get_property_breakdownC
Break down a custom property of an event by value (e.g. counts per plan for a Signup event).
Inputs: key (required), event (required), domain (required), to, +3 more.
get_realtimeA
Number of visitors active on a site in the last 5 minutes.
Inputs: domain (required).
get_revenueB
Revenue grouped by currency for a given revenue event on a site.
Inputs: event (required), domain (required), to, tz, +2 more.
get_summaryA
Top-line metrics for a site over a period: unique visitors, sessions, pageviews, bounce rate, average visit duration. Set compareToPrevious to also get the previous period figures.
Inputs: domain (required), to, tz, from, +2 more.
get_timeseriesB
Time series of visitors and pageviews for a site, bucketed by hour or day.
Inputs: domain (required), to, tz, from, +3 more.
list_event_propertiesC
List the custom property keys recorded for a given event on a site.
Inputs: event (required), domain (required), to, tz, +2 more.
list_sitesA
List the sites (domains) in an organization. Requires a key with the sites:read permission.
Inputs: org.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct analytics metric or resource (funnels, goals, revenue, realtime, etc.). Despite many 'get_' prefixed tools, the descriptions clearly differentiate their purposes, leaving no ambiguity for an agent.
All tool names follow a consistent verb_noun pattern in snake_case with 'get_' for data retrieval and 'list_' for enumeration. This creates a predictable and easy-to-understand naming convention.
With 10 tools, the server is well-scoped for its purpose of providing analytics data. The count covers essential metrics without being excessive or sparse.
The tool set covers core analytics needs: top metrics, breakdowns, funnels, goals, revenue, realtime, time series, and property listing. Minor gaps exist, such as no tool for filtering or segmentation, but the core retrieval functionality is comprehensive.
Maintenance
Related MCP Connectors
Cookie-free web analytics MCP server: read stats, create UTM links, goals and ad costs.
Analytics for MCP servers. Query your tool calls, first-call success, retries and schema cost.
Privacy-first cookieless web analytics with agent one-prompt setup via remote MCP OAuth.
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
Related MCP Servers
- AlicenseAqualityDmaintenanceRead-only MCP server for Umami analytics. It talks to the Umami REST API directly over HTTP, supporting self-hosted and cloud setups.88 npmMIT
- AlicenseAqualityDmaintenanceMCP server that provides read access to Plausible Analytics data with natural-language date resolution, enabling users to query analytics like 'yesterday' or 'last week' without needing to know exact date formats.8MIT
- AlicenseNot gradedqualityDmaintenanceMinimal MCP server for OpenPanel analytics, enabling queries for landing pages, page events, and tracked event names.94 npmMIT
- AlicenseBqualityFmaintenanceMCP server for Plausible Analytics, enabling querying of traffic, conversions, sources, and device breakdowns from any MCP-compatible AI assistant.1263 npmMIT