Skip to content
More languages coming soon
All articles

Asking your analytics in Claude, Cursor or VS Code ​

Most questions about a product's numbers are short: which sources converted best last month, whether people came back more this month than last, how many people from one country use one browser. The answer is in the dashboard, three filters and a date range away. An AI assistant connected to your analytics can ask for it in a sentence, read the totals, and explain them in the same conversation where you are writing the code or the plan they inform.

This article covers how that connection works, what to ask, what an assistant should and should not be able to reach, and what happens to the answers.

What MCP is ​

The Model Context Protocol is "an open-source standard for connecting AI applications to external systems" (Model Context Protocol: introduction). An analytics service that offers an MCP server publishes a set of tools, such as "get the overview" or "break down by source", and an AI client that speaks the protocol can call them. Claude Code, Claude Desktop, Cursor and VS Code are among the clients that do.

The assistant does not log in to your dashboard or read your database. It calls the tools, with a credential you gave it, and gets back what each tool returns.

Your AI clientClaude Code, Cursor,VS Code…tokentotalsMCP toolsreports, goals,funnels, journeysNever reachedraw events, identifiers,exports, members, settingsWhat you ask, and the answers, go to the AI providerbehind the client, under its terms.
The assistant calls tools with your token and gets totals back; the raw events stay where they are.

Setting it up ​

A remote MCP server needs three things from a client: its address, the transport, which for a server on the web is usually Streamable HTTP, and a header carrying the credential. A client that can send a header takes those three values in its settings; some take them in one command. Claude Code, for example, adds a server with claude mcp add, given the transport, the address and the header.

Keep the credential out of files you might commit. Clients such as Cursor can read it from an environment variable, and VS Code can ask for it once and keep it out of the file entirely.

What to ask ​

The good questions are the ones you would answer with a report and a filter:

  • "Which sources converted best on newsletter signup last month?"
  • "How many visitors came from Canada this week, by browser?"
  • "Did people first seen in September come back more than those from August?"
  • "What do people do after the pricing page?"

And, when the assistant may make changes, the ones you would otherwise click through a form for:

  • "Create a goal for /thank-you."
  • "Build a funnel from pricing viewed to signup completed, within a day."

An assistant is good at the second half of the work: comparing two periods, noticing that one source's rate dropped, writing the summary for a weekly note. It is only as right as the totals it reads, and it can misread them, so check a surprising answer against the dashboard.

What it should reach, and what it should not ​

Connecting an assistant to analytics is a decision about access, and the safe default is narrow:

  • Totals, not raw events. The same figures the dashboard shows, for a range and filters. Never the event log, and never a visitor identifier.
  • Your account, at your role. A credential that belongs to one person in one account, and that stops changing anything the moment that person's role no longer allows it.
  • Reading by default. Creating goals and funnels only with a credential made for it, and deleting nothing.
  • An expiry. A credential that stops working on a date you chose, and that you can revoke.

The same privacy floors apply as on the screen. A funnel step reached by fewer than five people stays withheld, so an assistant cannot be used to single anyone out by asking more precisely.

Good habits with tokens ​

  • One token for each device or client, named after it, so revoking the laptop's leaves the desktop's working.
  • The shortest expiry that is not a nuisance. A week for trying it out; months only for a client you use every day.
  • Read-only unless you mean it. A token that may create goals and funnels is worth having only when you will ask for them.
  • Revoke on leaving. When someone leaves the team, their tokens should go with them, without anyone having to remember.

Where the answers go ​

Whatever you ask an assistant, and whatever the analytics answers, goes to the AI provider behind the assistant, under that provider's terms. That is a choice for you and your team to make. When the answers are totals, which identify nobody, the choice is about your business's figures, not about the people you measure.

Common questions ​

Does the assistant see my visitors? ​

Not if the analytics is built for it. Here it receives totals, the same ones the dashboard shows, never raw events or identifiers.

Can it change my reports? ​

Only by adding projects and creating and changing goals and funnels, only with a credential made to change them, and only while your role allows it. It cannot delete anything.

Is this an assistant inside the dashboard? ​

No. It is your own AI client, connected from outside, with your own credential. The dashboard itself has no assistant.

How AnalyticsTrend does it ​

AnalyticsTrend has an MCP server at https://analyticstrend.com/mcp. An assistant connects to it with a personal access token: yours, in one account, expiring within 6 months at most, made on Account → Access tokens once an Admin allows you. A token reads reports, or, for Write and Admin members, also creates projects and creates and changes goals and funnels. Nothing is ever deleted through MCP, and your role is checked on every call.

It reaches the totals of every report for every project in the token's account: the overview, breakdowns by source, campaign, page, country, device and version, events, goals, funnels, journeys and retention. It never reaches raw events, visitor identifiers, exports, members, settings or the write keys of existing projects. A funnel step reached by fewer than 5 visitors stays withheld.

Connect an AI assistant has the steps for Claude Code, Claude Desktop, Cursor and VS Code; MCP tools lists every tool. The bounds on tokens are in Capabilities and limits.


Checked against the sources linked above on 28 October 2026.