MCP (AI access)
MCP lets your own AI client read your TrueMetriks analytics and answer questions in plain language. This page covers what it is, who can set it up, generating the key, the config for each client, all 14 tools your AI can call, and the limits.
Point your own AI at your TrueMetriks data and ask questions in plain language, instead of reading the dashboard yourself.
Let an AI set this up for you
Copy the prompt below into Claude, ChatGPT or any other AI. It carries the whole setup: where to generate the key, both client configs, and where each client keeps its config file.
I use TrueMetriks, a server-side tracking and conversion attribution platform.
It offers MCP access, which lets an AI client read my analytics directly. Walk
me through connecting my AI client to it, step by step.
BEFORE ANYTHING ELSE, ask me these two things and wait for my reply:
1. Which AI client I want to connect (for example Claude Desktop, Claude Code,
Cursor, or something else).
2. My TrueMetriks MCP key.
Tell me exactly where to get the key:
- Sign in at https://app.truemetriks.com
- Open "Settings" for the site I want (the site's OWN settings, NOT Account
Settings), then click the "Integrations" tab.
- In the tile grid, after "Webhooks", click the "MCP (AI access)" tile.
- If my workspace has more than one site, pick the site under "Site this key
reads" first. A key reads exactly ONE site.
- Click "Generate key" and copy the key from the dialog.
- IMPORTANT: the key is shown ONCE and cannot be looked up again. Tell me to
paste it somewhere safe, such as a password manager, before closing the
dialog. If it is lost, the only fix is to generate a new one, which stops
the old one working immediately.
- Only workspace OWNERS and ADMINS can do this. If I do not see the MCP tile
at all, I am a plain member and need an owner or admin to do it for me.
- MCP requires the Unlimited plan. If the tile is greyed out with a padlock
reading UNLIMITED, I am on a lower plan and need to upgrade first.
Never print my key back to me in full, never paste it into a public place, and
never commit it to a repository.
THE SERVER
URL: https://app.truemetriks.com/mcp
Transport: Streamable HTTP (POST)
Auth: Authorization: Bearer <MY_MCP_KEY>
THE TWO CONFIGS, WHICH ARE NOT INTERCHANGEABLE
Claude Desktop is stdio only. It has no field for a bearer header, so it needs
the npx mcp-remote bridge. Its config file is claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Give it EXACTLY this, with my key in place of YOUR_MCP_KEY:
{
"mcpServers": {
"truemetriks": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://app.truemetriks.com/mcp",
"--header",
"Authorization: Bearer YOUR_MCP_KEY"
]
}
}
}
Cursor, Claude Code and other remote-capable clients take the url and headers
directly and must NOT be given the bridge form. Give them EXACTLY this:
{
"mcpServers": {
"truemetriks": {
"url": "https://app.truemetriks.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_MCP_KEY"
}
}
}
}
Cursor keeps this in ~/.cursor/mcp.json, or .cursor/mcp.json inside a project.
Claude Code keeps it in .mcp.json in the project root.
Tell me to restart the client after saving the config.
THE 14 TOOLS AND HOW TO CALL THEM
Once connected you will also receive these from the server, but here they are
so you know what is available before we start, and can pick the right one.
Every tool takes start_date and end_date as YYYY-MM-DD strings, EXCEPT
get_buyer_detail and compare_periods. NO tool takes a site or organization
parameter: the key is bound to one site, so never ask me which site I mean and
never invent such an argument. Optional arguments are marked.
get_overview(start_date, end_date)
Sessions, pageviews, unique users, bounce rate, session duration.
get_channel_breakdown(start_date, end_date, traffic?)
By marketing ecosystem (facebook, google, tiktok, email, direct): visits,
visitors, revenue, ad spend, ROAS. traffic is "all" (default), "paid" or
"organic". Purchases attribute to the earliest touch inside the range.
get_campaign_performance(start_date, end_date)
Per campaign: visits, revenue, spend, ROAS, cost per sale. Use for best
and worst performing campaigns.
get_ad_spend(start_date, end_date, group_by?)
Spend from synced ad accounts. group_by is "platform" (default) or
"campaign". Top 100 rows; check the truncated flag.
get_revenue_summary(start_date, end_date)
Revenue, purchases, average order value, conversion rate, LTV. This is the
ATTRIBUTED view and matches the dashboard exactly, so use it for headline
revenue and for any LTV figure I might compare against the dashboard.
get_product_performance(start_date, end_date)
Per product: revenue, orders, average order value.
get_customer_ltv(start_date, end_date)
Per-buyer spend distribution: average and median LTV, repeat rate. Counted
straight from Purchase events with NO attribution scoping, so it can
differ from get_revenue_summary. Do not present the two as the same
metric.
get_buyer_journeys(start_date, end_date, limit?)
Per-buyer lifetime attribution: first touch, last touch, sessions,
revenue, days to purchase. limit is 1-100, default 20.
get_buyer_detail(buyer_id)
Full event timeline for ONE buyer. buyer_id is an email or visitor id as
returned by get_buyer_journeys. Takes NO dates. Capped at 500 events.
get_time_to_purchase(start_date, end_date)
First visit to first purchase: buyer count, average and median days.
get_event_funnel(start_date, end_date, from_event, to_event?)
Event-to-event conversion per person, with average and median hours
between. from_event is REQUIRED, for example "Lead" or "Schedule".
to_event defaults to "Purchase".
get_funnel_ab_results(start_date, end_date, funnel_id?)
Saved funnels including A/B variant splits. Call WITHOUT funnel_id first
to list the saved funnels, then again with the id you want.
get_traffic_dimensions(start_date, end_date, dimension)
Top pages or referrers. dimension is REQUIRED: "pathname" or "referrer".
Top 25 only; check the truncated flag.
compare_periods(tool, period_a_start, period_a_end, period_b_start,
period_b_end)
Runs another tool over two ranges and returns both. tool is the NAME of
one of the tools above, for example "get_revenue_summary". Use this for
any this-versus-that question rather than calling a tool twice yourself.
Resolve relative dates like "last week" into real YYYY-MM-DD values before
calling, and tell me the exact range you used so I can check it.
Good first questions to suggest to me:
- How much revenue did I make last week, and which channel drove it?
- What is my best performing campaign by ROAS this month?
- How long do buyers take from first visit to first purchase?
- Compare this month with last month.
LIMITS TO KNOW
- One request may span at most 180 days. Longer ranges are refused, so split
them into shorter periods.
- 30 requests per minute and 2000 per day per key, with at most 3 running at
once.
- Everything is read-only. Nothing my AI does can change my data.
IF IT DOES NOT WORK
401 the key is wrong, revoked, or is a plain API key rather than an MCP key.
403 TIER_NO_MCP means the workspace is not on the Unlimited plan.
429 too many requests, wait and retry.
Tell me to restart the AI client after any config change, because most
clients only read their MCP config at startup.
What MCP is, and what it costs
MCP is a standard way for an AI client to call an outside tool. Connect TrueMetriks once and you can ask things like "how much revenue did Facebook bring me last week" or "which campaign has the best ROAS this month" and get the answer straight from your own data.
The important part: you use your own AI client and your own tokens. Whatever you already pay for Claude, Cursor or your AI of choice covers the conversation. We do not charge per message or per token, which is why there is no usage fee on this feature.
Everything MCP exposes is read-only. Your AI can read your analytics; it cannot change a setting, edit data, or spend money.
What you need
- The Unlimited plan. On Starter and Growth the tile is greyed out with a padlock chip reading
UNLIMITED. - Owner or admin access to the workspace. A member does not see the tile at all, and a direct link shows a notice saying to ask an owner or admin.
MCP (AI access)
UNLIMITED
API Keys
UNLIMITED
If a workspace drops to a lower plan, the key stays in place but every call is refused with 403 TIER_NO_MCP until you upgrade. Upgrading restores it immediately, with the same key.
Generate your key
- Open Settings for the site you want (the site's settings, not Account Settings).
- Click the Integrations tab.
- After Webhooks, click the MCP (AI access) tile. Its status line tells you where you stand:
No key yet,Key active, orKey active ยท reads <domain>.
Integrations
Connect third-party data sources to fire events into TrueMetriks.
Typeform
Connected
Calendly
Connected
Microsoft Clarity
Configured (1 project)
Stripe
Connected
Whop
Not connected
PayPal
Not connected
Webhooks
Receiving 4, sending 2
MCP (AI access)
No key yet
API Keys
No keys yet
- If your workspace owns more than one site, choose which one the key reads under Site this key reads.
- Click Generate key.
Back to Integrations
MCP Access
Connect an AI client to your TrueMetriks analytics over MCP. One key per workspace.
What MCP is
Your AI client queries your own analytics, using your own tokens. 14 read-only tools.
Your MCP key
Key …e084 created Aug 5, 2026, 10:41 AM reads demo-brand.example
Site this key reads
demo-brand.exampleA key reads one site. To cover another site, generate a separate key for it.
Regenerating replaces the key. The current key stops working right away.
How to connect
Point your MCP client at this server URL and send the key as a bearer token.
Replace the placeholder with your key. Pick the config that matches your client.
The key is shown once, together with both ready-made client configs. Copy what you need before closing the dialog: it cannot be recovered afterwards.
Your MCP key
Copy it now. This is the only time it is shown, and it cannot be recovered later.
Key
Claude Desktop config
Cursor / Claude Code config
One key, one workspace, one site
- There is one MCP key per workspace. Generating again replaces it, and the old key stops working immediately, so any client still using it fails until you paste in the new one.
- The key is bound to one site. No tool takes a site parameter, so your AI can never reach another site: the key decides, not the question. To cover a second site, generate a separate key for it.
- Revoke cuts off access right away. You can generate a new key afterwards.
- The MCP tile is the only place this key is managed; it is not listed with your other API keys.
Connect your AI client
The server is:
https://app.truemetriks.com/mcp
There are two config shapes and they are not interchangeable. Use the one that matches your client, or it will not connect.
Claude Desktop
Claude Desktop speaks stdio only. It has nowhere to put a bearer header, so it needs the mcp-remote bridge, which turns our HTTP endpoint into the stdio server it expects. This needs Node installed, since it runs through npx.
Its config file lives at:
macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Windows %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"truemetriks": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://app.truemetriks.com/mcp",
"--header",
"Authorization: Bearer YOUR_MCP_KEY"
]
}
}
}
Cursor, Claude Code and other remote MCP clients
Anything that can talk to a remote MCP server takes the URL and headers directly, and must not be given the bridge form:
{
"mcpServers": {
"truemetriks": {
"url": "https://app.truemetriks.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_MCP_KEY"
}
}
}
}
Cursor reads ~/.cursor/mcp.json, or a .cursor/mcp.json inside a project. Claude Code reads .mcp.json in the project root. Other clients differ, so check your client's own documentation for where its MCP config lives.
Replace YOUR_MCP_KEY with your key, save, and restart the client. Most clients only read their MCP config at startup, so a config change without a restart looks exactly like a broken key.
What your AI can answer
Fourteen read-only tools are exposed. Your AI picks the right one; this list is here so you know what is in reach.
| Tool | What it answers |
|---|---|
get_overview |
Traffic overview: sessions, pageviews, unique users, bounce rate, session duration |
get_channel_breakdown |
Acquisition by marketing ecosystem (facebook, google, tiktok, email, direct): visits, visitors, revenue, ad spend, ROAS. Optional paid or organic filter |
get_campaign_performance |
Per campaign: visits, revenue, spend, ROAS, cost per sale. Best and worst performers |
get_ad_spend |
Spend from synced ad accounts, by platform or by campaign |
get_revenue_summary |
Revenue, purchases, average order value, conversion rate and LTV, matching the dashboard's attributed view |
get_product_performance |
Per product: revenue, orders, average order value |
get_customer_ltv |
Per-buyer spend distribution: average and median LTV, repeat purchase rate |
get_buyer_journeys |
Per-buyer lifetime attribution: first touch, last touch, sessions, revenue, days to purchase |
get_buyer_detail |
The full event timeline for one buyer, by email or visitor id, including their anonymous visits before they identified |
get_time_to_purchase |
How long buyers take from first visit to first purchase: average and median days |
get_event_funnel |
Event-to-event conversion per person, for example Lead to Purchase, with average and median hours between |
get_funnel_ab_results |
Your saved funnels, including A/B variant splits |
get_traffic_dimensions |
Top pages or top referrers, top 25 only |
compare_periods |
Runs another tool over two date ranges and returns both side by side |
Every tool takes start_date and end_date as YYYY-MM-DD, except get_buyer_detail (a buyer_id) and compare_periods (a tool name plus two ranges). No tool takes a site or organization parameter. The site comes from the key, which is what keeps one workspace's questions from reaching another's data.
Some results are capped and say so: get_traffic_dimensions returns the top 25, get_ad_spend the top 100, get_buyer_detail at most 500 events. Each sets a truncated flag worth checking before treating a list as complete.
Limits
| Limit | Value |
|---|---|
| Date range per request | 180 days |
| Requests per minute | 30 per key |
| Requests per day | 2000 per key |
| Requests at once | 3 per key |
Ask for more than 180 days and the request is refused cleanly, telling the caller to split it into shorter periods. A good AI client does that by itself and stitches the answers together.
Calling the server directly
Most people never need this, but if you are testing by hand, two details matter:
- The
Acceptheader must list both types:application/json, text/event-stream. Sending one gets a406, which is easy to mistake for a broken key. - Auth is
Authorization: Bearer <your key>. No key gets401.
curl -X POST https://app.truemetriks.com/mcp \
-H "Authorization: Bearer $TM_MCP_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}'
When it does not work
| What you see | What it means |
|---|---|
401 AUTH_REQUIRED |
No Authorization header reached the server |
401 INVALID_API_KEY |
The key is unknown, expired or revoked. Regenerating replaces the old key, so an old config fails this way |
401 NOT_MCP_KEY |
That is an API key, not an MCP key. The two are separate and are not interchangeable |
403 TIER_NO_MCP |
The workspace is not on the Unlimited plan |
403 MCP_NOT_ENABLED |
MCP is not switched on for this account yet |
406 |
The Accept header did not include both application/json and text/event-stream |
429 RATE_LIMITED |
Over the per-minute or per-day limit. Wait and retry |
409 NO_SITE |
The workspace has no site for MCP to read |
409 AMBIGUOUS_SITE |
The workspace has several sites and the key is not bound to one. Regenerate it and pick a site |
| No MCP tile at all | You are a member, not an owner or admin, of this workspace |
One more worth checking before you go hunting: a key also stops working if the owner or admin who generated it is later removed from the workspace or demoted to member. Regenerating it under a current admin fixes that.
MCP or the API?
Both read the same data and both are Unlimited-only. MCP is for asking questions in an AI client, with no code. The v1 REST API is for building something: a scheduled report, a self-refreshing sheet, your own dashboard. Separate keys, so you can use both.
Frequently asked questions
What is MCP?
MCP is a standard way for an AI client to call an external tool. You give your AI client a TrueMetriks key, and it can then read your analytics and answer questions like "how much revenue did Facebook bring me last week" without you opening the dashboard.
Does MCP cost extra?
No. You use your own AI client and your own tokens, so there is no per-message charge from TrueMetriks. It is included with the Unlimited plan.
Who can set up MCP?
Workspace owners and admins only. A plain member does not see the MCP tile at all, and following a direct link shows a notice asking them to contact an owner or admin.
Can one key read more than one site?
No. A key is bound to one site when it is generated. If your workspace owns more than one site, the panel shows a site picker, and to cover another site you generate a separate key for it.
I lost my MCP key. Can I look it up?
No. The key is shown once when it is generated and cannot be recovered. Generate a new one, which replaces the old key immediately, and update your AI client's config.