Skip to content
measure

Ask your AI agent about your traffic

We built an MCP server so AI assistants can query analytics directly. Here's what happened when the agent started monitoring itself.

Product5 min readBy Measure team

Last month I asked our AI assistant how our blog was performing.

It told me to go check the analytics dashboard.

That’s not how it’s supposed to work. An agent that can browse the web, write code, and send emails — but has to tell you to check a dashboard yourself — isn’t really autonomous. It’s a very expensive interface for tasks you still have to do manually.

So we built a fix: an MCP server for Measure that lets any MCP-compatible AI agent query your analytics directly.

What “agent-native analytics” actually means

Most analytics tools were designed for humans staring at dashboards. The data lives in a UI. You pull it. You interpret it. You act.

Agent-native analytics flips this. The agent pulls the data, interprets it, and acts — without a human in the loop on the read step.

Here’s what that looks like in practice. Our assistant’s cron job runs every hour:

  1. Pull pageview data for all tracked sites
  2. Compare to prior 7-day average
  3. Flag anomalies (traffic spike, referrer surge, new top page)
  4. Take action if warranted (update content, note the pattern, alert Hondo)

No dashboard open. No human reading it. The agent does the loop.

This sounds simple. But it required rethinking what an analytics API looks like when the consumer is an agent, not a human.

The API design problem

Standard analytics APIs are built for dashboards. You get JSON back. The dashboard renders it. A human reads it.

Agents don’t render JSON — they read it. Which means the API has to do more of the interpretive work that the dashboard usually handles:

  • Natural language summaries instead of raw numbers
  • Context-aware comparisons (not just “70 pageviews” but “70 pageviews, down 15% from last week, lower than your 7-day average of 82”)
  • Insight surfacing instead of data retrieval (“your /pricing page has 3x more traffic than average — possible acquisition intent”)

So we built a summary that returns structured natural language, and our MCP server exposes it as a tool the agent can call directly.

JSON
// Tool call: get_site_summary
{
  "site": "example.com",
  "period": "7d"
}

// Response
{
  "summary": "Your site received 391 pageviews this week, up 1% from last week. Top traffic source is Google (10 PV), followed by ChatGPT (6 PV) — notable that AI referrals are close to organic search for a 2-week-old site. Your highest-traffic page is the no-consistency-rule comparison hub at 35 PV, suggesting this angle resonates with your audience."
}

The agent can actually use that. It can decide whether to write more content on this topic, check what’s ranking, or just note the trend and move on.

The weird thing that happened

When we pointed our assistant at its own analytics, something unexpected happened.

The assistant started noticing patterns that a human would have missed — not because it’s smarter, but because it was reading the data fresh every hour with no prior assumptions baked in.

A few examples:

The ChatGPT referral signal. On a 12-day-old site, getting 6 pageviews from ChatGPT in a week is unusual. That’s not organic search — it means someone asked ChatGPT about prop firms and it cited our site. The assistant flagged this as a content quality signal: if ChatGPT is recommending your pages, they’re probably well-structured and comprehensive.

The docs traffic spike. Measure’s AI agents docs page suddenly got 2x more traffic after our MCP server was listed in awesome-mcp-servers. The assistant noticed the timing, connected it to the listing going live, and noted that this was the highest-quality referral source by intent (developers actively looking for MCP servers).

The 3am engagement mystery. ForGeorgetown.com, a local Georgetown TX newsletter, got a 3x traffic spike that all appeared to come from internal links (newsletter sends). The assistant correctly identified this as newsletter-driven traffic — newsletter sends often don’t show a referrer domain. It suggested checking the email platform open rates to confirm.

None of these required human intervention. The loop closed itself.

The MCP server

The Measure MCP server lives at https://lets.measure.events/mcp.

Its read tools cover what an agent needs to watch a site:

  • list_sites — list all your tracked sites
  • get_site_summary — a natural language summary of site performance
  • get_site_analytics — pageviews and visitors for a date range
  • get_breakdown — traffic by page, referrer, country and more
  • get_insights — notable changes and observations
  • get_live — what’s happening right now
  • get_agents, get_agent_report, get_llms_txt — AI agent traffic, counted separately from humans and bots

There are write tools too: track_event, create_site, log_checkin and signup.

To use it, you need a Measure account and an API key (keys start with mk_). Then add to your MCP configuration:

JSON
{
  "mcpServers": {
    "measure": {
      "url": "https://lets.measure.events/mcp",
      "headers": {
        "Authorization": "Bearer mk_your_api_key"
      }
    }
  }
}

It works with Claude Desktop, Cursor, Windsurf, and any other MCP-compatible client.

Why privacy-first matters for agent analytics

One thing I didn’t expect to care about until we built this: privacy-first analytics is genuinely better for agents.

Cookie-consent banners can drop 20–40% of your data. If your AI agent is making decisions based on analytics data, and 30% of that data is missing because users clicked “reject all,” your agent is operating on a systematically biased sample.

Measure doesn’t use cookies, stores nothing on the visitor’s device, and doesn’t fingerprint. Visitors are counted with a salted hash that rotates daily, and IP addresses and user-agent strings aren’t stored. So there’s no cookie banner for Measure, nobody to “reject all” — and your agent works with the full picture.

What’s next

The loop we’re working toward: goal → track → observe → act → goal. You set a target, the agent watches whether you’re on track and surfaces what’s working and what’s not. No dashboard required.

If you’re building with MCP or want to try the server, Measure is $29/month for up to 40 sites with a 14-day trial — see pricing.

Let your agent read the numbers.

$29 a month covers 40 sites, then $0.50 a site. 14-day trial.