MCP server
Takt’s Model Context Protocol server lets any MCP-aware AI agent (Claude Desktop, Claude Code, Cursor, …) query your Takt analytics in natural language. Ask “how many visitors did example.com get this week?” and the agent calls the right read endpoint for you.
It reads your statistics, built on the HTTP Read API, and can manage your sites, goals, funnels, segments and alerts, as well as your team’s members, invitations and site access, the way an owner or admin would in the dashboard. The server is hosted by Takt: you point your MCP client at a remote URL and authorize access from your browser via OAuth 2.1: nothing to install, no API key to generate or copy.
AI agent ──HTTP (MCP)──▶ Takt remote MCP server ──▶ your analytics Connecting
Point your MCP client at the remote URL https://taktlytics.com/mcp over HTTP transport.
With Claude Code:
claude mcp add --transport http takt https://taktlytics.com/mcp On first use, the client opens a browser window: you log into your Takt account (2FA included), then choose on the consent screen which teams (organizations) and which permissions to grant the agent. Once approved, the agent gets access to all authorized sites at once, with no need to create a key or run one instance per site.
Claude (web and desktop)
In Settings → Connectors, choose Add custom connector, name it Takt and paste https://taktlytics.com/mcp. Claude then opens the Takt consent screen described below.
ChatGPT
In Settings → Apps & Connectors, create a connector with the URL https://taktlytics.com/mcp and OAuth authentication. ChatGPT opens the same consent screen.
Other clients
Any client that speaks MCP over remote HTTP transport connects the same way, using the https://taktlytics.com/mcp URL. Clients that only speak local stdio can use a generic
bridge such as mcp-remote:
npx -y mcp-remote https://taktlytics.com/mcp Example prompts
- How many visitors did example.com get this week compared to last week?
- Which sources brought the most traffic to example.com over the last 30 days?
- What is the conversion rate of my signup funnel on example.com this month?
- How much traffic do ChatGPT, Claude and Perplexity send to example.com?
- Create a conversion goal on the /thank-you page of example.com.
Consent and permissions
The consent screen lets you grant access to all your teams (present and future) or pick team by team, each with the scopes you want. The read and write scopes that
the tools below consume are offered, and nothing else: for instance orgs:read, which gives
the list of your teams and your role in each, with billing only for the teams you own, audit:read for the audit log, members:read for members and members:write for managing
them. A member can only grant read access, plus reports:write for their own report
subscriptions: the other write scopes are locked for them, and their other write calls are
refused. Management reads (audit log, invitations and a member’s site access) are reserved to
owners and admins: a plain member is refused even when audit:read or members:read was
granted. list_members stays open to members, without emails. sites:write exists only through this OAuth consent: an API key cannot receive it.
Rights are recomputed on every call: they are bounded by your real role in each organization, never by what the client asked for. Losing access to a team removes it from the agent immediately, without touching the consent.
Reauthorize after a new scope
A client connected before a scope was added keeps the consent it received: a tool that needs a
scope missing from that consent is refused with JSON-RPC error -32001, which names the
missing scope and says what to do:
- Scope not granted: your role allows it, only the consent lacks it. The message is “scope sites:write non accordé à ce client : réautorise le connecteur MCP pour l’ajouter” (scope not granted to this client, reauthorize the MCP connector to add it). Disconnect and reconnect the connector (or restart authorization from your client): the consent screen then offers the new scope.
- Insufficient role: your role in the team does not open this scope, for example a member
calling
update_site. The message is “droits insuffisants : ton rôle ne permet pas le scope sites:write, réautoriser le connecteur n’y changera rien” (insufficient rights, reauthorizing will not help). Only an owner or an admin can give you this right.
The error’s data field carries missingScope (the missing scope) and reauthorize (true when reauthorizing is enough), so a client can offer to reconnect on its own.
list_sites and list_orgs span several teams, each with its own consent. A team whose consent
does not grant the tool’s scope (sites:read for the first, orgs:read for the second) is left
out. If at least one team is served, the call succeeds with those teams only; if none is and at
least one was left out for lack of the scope, it answers the same -32001 instead of an empty
list. reauthorize is true only when your role allows the scope in every team left out.
You can revoke access at any time from Settings → Sessions → Connected apps. Tokens are short-lived and refreshed automatically; revoking cuts access immediately.
Tools
| Tool | Description | Permission |
|---|---|---|
list_sites | List every site across the authorized teams (no arguments). | sites:read |
list_orgs | List your teams with your role; billing mode and plan for the ones you own. | orgs:read |
get_org | One team’s detail: slug, name and your role; billing and plan if you own it (org). | orgs:read |
get_summary | Visitors, sessions, pageviews, bounce rate, average duration. | stats:read |
get_timeseries | Visitors/pageviews over time, by hour or day. | stats:read |
get_breakdown | Top values of a dimension (pages, sources, countries, devices…). | stats:read |
get_realtime | Visitors active in the last 5 minutes. | stats:read |
get_goals | Conversions per goal. | stats:read |
get_funnels | Step-by-step funnel reports. | funnels:read |
get_revenue | Revenue grouped by currency for a revenue event. | stats:read |
list_event_properties | Custom property keys recorded for an event. | stats:read |
get_property_breakdown | Break down a custom property of an event by value. | stats:read |
get_ai_visibility | Traffic sent by AI assistants and AI crawler hits. | ai:read |
get_search_console | Clicks, impressions, CTR, position and top Google queries. | search_console:read |
get_breakdowns | Several dimensions of a site in a single call (1 to 14). | stats:read |
get_search_console_drill | Search Console detail for a page or a query. | search_console:read |
suggest_pages | Pages to track: sitemap and pages seen over twelve months. | stats:read |
export_stats | Page ranking as CSV or JSON, capped at 999 rows. | stats:read |
get_site | Settings of a site: domain, verification, public badge and embed, URL normalization. | sites:read |
get_install_snippet | Tracker install script, with or without automatic captures, and its advanced options: enabled, sample-rate (fraction from 0 to 1), track-query and query-params (which requires track-query). | sites:read |
get_site_verification | Ownership verification state: token, method, dates (owners and admins only). | sites:read |
list_goal_definitions | List the goals defined on a site, with their id. | goals:read |
list_funnel_definitions | List the funnels defined on a site, with their id. | funnels:read |
list_segments | List the saved segments of a site, with their id. | segments:read |
list_alerts | List the alert rules of a site (owners and admins only). | alerts:read |
get_google_integration | Google connection state of a site: chosen properties and granted scopes. | integrations:read |
get_google_connect_link | Address of the site’s Settings page, where the Google connection is started from the browser. The tool starts no authorization. | integrations:read |
list_ga4_properties | GA4 properties reachable with the site’s Google connection. | integrations:read |
list_search_console_properties | Search Console properties reachable with the site’s Google connection. | integrations:read |
list_imports | Import jobs of a site, most recent first. | integrations:read |
get_import | Status, progress and any error of an import job. | integrations:read |
list_report_subscriptions | Your email report subscriptions in a team: the team digest or a site report. | reports:read |
list_audit_logs | The team’s audit log, filterable by actor and action. Owners and admins only. | audit:read |
list_members | The team’s members and their role (emails for owners and admins). | members:read |
list_invitations | The team’s pending invitations. Owners and admins only. | members:read |
get_member_site_access | Sites a member can access. Owners and admins only. | members:read |
Write tools
These tools change a site’s configuration. They are reserved for owners and admins: for a
member, the call is refused. Ids (id) come from the list_* tools. A resource from another
site, or from another team, is treated as not found.
| Tool | Description | Permission |
|---|---|---|
create_site | Create an unverified site in a team (org). Respects the site quota of your plan. | sites:write |
update_site | Update a site’s settings, field by field. | sites:write |
delete_site | Delete a site and its data. Irreversible. | sites:write |
check_site_verification | Run the domain ownership check (DNS or file). | sites:write |
regenerate_site_verification_token | Replace the verification token; the old one stops working. | sites:write |
create_goal | Create a goal (pageview, event or revenue) on a site. | goals:write |
delete_goal | Delete a goal. | goals:write |
create_funnel | Create a funnel of at least two steps, with an optional window. | funnels:write |
update_funnel | Replace a funnel’s name, window and steps. | funnels:write |
delete_funnel | Delete a funnel. | funnels:write |
create_segment | Create a saved segment from filters on the allowed dimensions. | segments:write |
update_segment | Replace a segment’s name and definition. | segments:write |
delete_segment | Delete a segment. | segments:write |
create_alert | Create an alert rule: traffic spike or drop, silent site or goal conversion. | alerts:write |
update_alert | Change an alert rule. | alerts:write |
delete_alert | Delete an alert rule. | alerts:write |
set_search_console_property | Links the site to a reachable Search Console property. | integrations:write |
clear_search_console_property | Unlinks the site’s Search Console property; the Google connection stays active. | integrations:write |
disconnect_google | Revokes the site’s Google connection and removes the chosen properties. Irreversible. | integrations:write |
create_import_upload_url | Signed URL where to upload a CSV file (GA4 or Plausible), outside the tool. | integrations:write |
create_import | Starts a GA4 import from a connected property, or from an uploaded file. One import at a time per site. | integrations:write |
delete_import | Deletes an import job and purges the aggregates it produced. Irreversible. | integrations:write |
create_report_subscription | Subscribe to an email report: the team digest (no domain) or a site report (with domain). Idempotent. | reports:write |
delete_report_subscription | Deletes one of your email report subscriptions. | reports:write |
Exception: a member can manage their own report subscriptions with reports:write.
Read tools are annotated read-only. The delete_* tools, disconnect_google and clear_search_console_property are flagged as destructive, so your client can show it. The
report subscription tools take the team’s slug or identifier in org, plus an optional domain for a site report.
Transferring a site to another team is not exposed over MCP: it stays in the dashboard,
behind its stronger confirmation. delete_site and regenerate_site_verification_token are
annotated destructive, which your client can display.
Team management
These tools change a team’s members and invitations, the team being named by its slug or
identifier in org. They are reserved for owners and admins.
| Tool | Description | Permission |
|---|---|---|
create_invitation | Invite an email address to join the team. | members:write |
resend_invitation | Resend a pending invitation, with a new link. | members:write |
revoke_invitation | Revoke a pending invitation. | members:write |
update_member | Change a member’s role. | members:write |
remove_member | Remove a member from the team. | members:write |
set_member_site_access | Set the sites a member can access. | members:write |
update_member, revoke_invitation and remove_member are marked destructive. Demoting a
member to the member role also revokes the API keys that member created on the team’s sites.
An admin cannot promote anyone to admin or owner, nor remove or demote an owner or an admin:
those actions are reserved to the owner role. The last owner of a team cannot be removed or
demoted. Every change of role, removal, site access and invitation is written to the team’s
audit log, with the OAuth grant and client that made it. An invitation, member or site from
another team gets the same “not found” answer as a non-existent identifier.
Most tools accept a time filter: period (day, 7d, 30d, month, 6mo, 12mo), or
an explicit from/to range (YYYY-MM-DD), plus an optional tz (IANA timezone). Tools on
a site require an explicit domain: there is no default site, even when the consent covers a
single one. get_org, create_site and the team tools (audit log, members, invitations, site access, report
subscriptions) take the team’s slug or identifier in org. list_sites and list_orgs take
no team argument and cover every team you are authorized on.
get_search_console additionally requires the site to have a Search Console property
linked from its settings; without one the call fails with an explicit message. Google’s
data lags two to three days behind.
The Google tools, reads and writes alike, and the import writes require a role that manages the site (owner or administrator of the team); reading imports requires access to the site’s statistics. An insufficient role returns a tool error with the message “droits insuffisants”. Report subscriptions are always the ones of the person using the key: no tool can subscribe or unsubscribe someone else.
Statistics tools only expose a site once it is verified. The Google, import and report tools do not require that verification, like their HTTP routes: an unverified site therefore remains manageable from your MCP client.
Filters and segments
The statistics tools (get_summary, get_timeseries, get_breakdown, get_breakdowns, get_ai_visibility, suggest_pages and export_stats) narrow the counted visitors with two
parameters, which cannot be combined:
filters: at most 20 conditions{ "dim", "op", "val", "join" }.dimis one ofpages,sources,countries,regions,cities,devices,browsers,os,utm_source,utm_medium,utm_campaignorai_assistant.opisisornot, andjoinisandoror. Entry and exit pages cannot be filtered: they only serve as breakdown dimensions.segmentId: the identifier of a segment saved on this site. It requires thesegments:readscope on top ofstats:read. An unknown identifier, or one belonging to another site, is refused.
Filters go through the same validation engine as the interface segments: a condition Takt
would refuse is refused here too, before any computation. Passing filters and segmentId in the same call is refused.
get_goals, get_funnels, get_revenue and get_property_breakdown do not accept a segment.
Comparison with the previous period
compareToPrevious (boolean) on get_summary, get_timeseries, get_breakdown, get_breakdowns, get_goals and get_funnels also returns the previous period of the same
length. It does not exist on get_revenue or get_property_breakdown: the API cannot compare
them.
Exports and multiple breakdowns
get_breakdowns breaks down several dimensions in a single call (1 to 14, no duplicates),
with the same limit for each.
export_stats exports the page ranking (label, visitors, pageviews) as CSV (format csv,
the default) or JSON (format json). The export is capped at 999 rows and 256 KB of response sent: beyond
that, truncated is true and you should narrow the period or the segment. CSV cells that
start with =, +, -, @, a tab or a carriage return are prefixed with an apostrophe, so they do not run as
formulas in a spreadsheet.
suggest_pages lists pages to track: those in the sitemap and those seen over the twelve
months ending at the end of the requested period. Each suggestion says whether it comes from
the sitemap, from Takt, or from both.
get_search_console_drill details the Search Console data of a page (value: its URL) or of a
query (value: its text). Like get_search_console, it requires a Search Console property
linked to the site.
-32001 "accès restreint". list_sites and list_orgs span several teams: a team without access is left out of the list when another one is served.
If no team is served and at least one is restricted, they answer -32001 "accès
restreint" instead of an empty list, ahead of any missing scope error.An anti-abuse rate limit applies per MCP connection: 200 requests per 10 seconds and 600 requests per minute. Past that, the response stays HTTP 200 with a Retry-After header and JSON-RPC error -32003 “trop de requêtes, réessaie dans N s”.
Its data.retryAfter field gives the delay in seconds (10 for the burst, 60 for the
minute). Your MCP client just needs to wait for that delay before calling again.
Upstream, the gateway also applies a cap per IP address, across all connections: 20 requests per second, with bursts of up to 150. Past that, it answers HTTP 429 with an HTML body, no JSON-RPC error and no Retry-After header: wait one second before retrying.