takt

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.

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

ToolDescriptionPermission
list_sitesList every site across the authorized teams (no arguments).sites:read
list_orgsList your teams with your role; billing mode and plan for the ones you own.orgs:read
get_orgOne team’s detail: slug, name and your role; billing and plan if you own it (org).orgs:read
get_summaryVisitors, sessions, pageviews, bounce rate, average duration.stats:read
get_timeseriesVisitors/pageviews over time, by hour or day.stats:read
get_breakdownTop values of a dimension (pages, sources, countries, devices…).stats:read
get_realtimeVisitors active in the last 5 minutes.stats:read
get_goalsConversions per goal.stats:read
get_funnelsStep-by-step funnel reports.funnels:read
get_revenueRevenue grouped by currency for a revenue event.stats:read
list_event_propertiesCustom property keys recorded for an event.stats:read
get_property_breakdownBreak down a custom property of an event by value.stats:read
get_ai_visibilityTraffic sent by AI assistants and AI crawler hits.ai:read
get_search_consoleClicks, impressions, CTR, position and top Google queries.search_console:read
get_breakdownsSeveral dimensions of a site in a single call (1 to 14).stats:read
get_search_console_drillSearch Console detail for a page or a query.search_console:read
suggest_pagesPages to track: sitemap and pages seen over twelve months.stats:read
export_statsPage ranking as CSV or JSON, capped at 999 rows.stats:read
get_siteSettings of a site: domain, verification, public badge and embed, URL normalization.sites:read
get_install_snippetTracker 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_verificationOwnership verification state: token, method, dates (owners and admins only).sites:read
list_goal_definitionsList the goals defined on a site, with their id.goals:read
list_funnel_definitionsList the funnels defined on a site, with their id.funnels:read
list_segmentsList the saved segments of a site, with their id.segments:read
list_alertsList the alert rules of a site (owners and admins only).alerts:read
get_google_integrationGoogle connection state of a site: chosen properties and granted scopes.integrations:read
get_google_connect_linkAddress of the site’s Settings page, where the Google connection is started from the browser. The tool starts no authorization.integrations:read
list_ga4_propertiesGA4 properties reachable with the site’s Google connection.integrations:read
list_search_console_propertiesSearch Console properties reachable with the site’s Google connection.integrations:read
list_importsImport jobs of a site, most recent first.integrations:read
get_importStatus, progress and any error of an import job.integrations:read
list_report_subscriptionsYour email report subscriptions in a team: the team digest or a site report.reports:read
list_audit_logsThe team’s audit log, filterable by actor and action. Owners and admins only.audit:read
list_membersThe team’s members and their role (emails for owners and admins).members:read
list_invitationsThe team’s pending invitations. Owners and admins only.members:read
get_member_site_accessSites 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.

ToolDescriptionPermission
create_siteCreate an unverified site in a team (org). Respects the site quota of your plan.sites:write
update_siteUpdate a site’s settings, field by field.sites:write
delete_siteDelete a site and its data. Irreversible.sites:write
check_site_verificationRun the domain ownership check (DNS or file).sites:write
regenerate_site_verification_tokenReplace the verification token; the old one stops working.sites:write
create_goalCreate a goal (pageview, event or revenue) on a site.goals:write
delete_goalDelete a goal.goals:write
create_funnelCreate a funnel of at least two steps, with an optional window.funnels:write
update_funnelReplace a funnel’s name, window and steps.funnels:write
delete_funnelDelete a funnel.funnels:write
create_segmentCreate a saved segment from filters on the allowed dimensions.segments:write
update_segmentReplace a segment’s name and definition.segments:write
delete_segmentDelete a segment.segments:write
create_alertCreate an alert rule: traffic spike or drop, silent site or goal conversion.alerts:write
update_alertChange an alert rule.alerts:write
delete_alertDelete an alert rule.alerts:write
set_search_console_propertyLinks the site to a reachable Search Console property.integrations:write
clear_search_console_propertyUnlinks the site’s Search Console property; the Google connection stays active.integrations:write
disconnect_googleRevokes the site’s Google connection and removes the chosen properties. Irreversible.integrations:write
create_import_upload_urlSigned URL where to upload a CSV file (GA4 or Plausible), outside the tool.integrations:write
create_importStarts a GA4 import from a connected property, or from an uploaded file. One import at a time per site.integrations:write
delete_importDeletes an import job and purges the aggregates it produced. Irreversible.integrations:write
create_report_subscriptionSubscribe to an email report: the team digest (no domain) or a site report (with domain). Idempotent.reports:write
delete_report_subscriptionDeletes 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.

ToolDescriptionPermission
create_invitationInvite an email address to join the team.members:write
resend_invitationResend a pending invitation, with a new link.members:write
revoke_invitationRevoke a pending invitation.members:write
update_memberChange a member’s role.members:write
remove_memberRemove a member from the team.members:write
set_member_site_accessSet 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" }. dim is one of pages, sources, countries, regions, cities, devices, browsers, os, utm_source, utm_medium, utm_campaign or ai_assistant. op is is or not, and join is and or or. 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 the segments:read scope on top of stats: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.

The MCP server is included in every plan with no volume limit. Every tool call is counted as an API request of the target team, for information only. Ingestion is never affected. A team without access to the product (trial ended, subscription canceled) answers JSON-RPC error -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.