20
15 Comments

Using MCP to give AI agents real user behavior data

Last night we released MCP support for Betterlytics.

The idea: give AI agents access to real website usage data so they can make better decisions about code and product changes.

Right now most analytics lives inside dashboards; charts, filters, tables, etc. Humans open the dashboard, interpret the data, and then decide what to change in the product.

With MCP (Model Context Protocol), analytics can be exposed as tools that an AI agent can query directly.

That means an agent working on your codebase can ask things like:

  • "Which pages get the most traffic?"

  • "Did the landing page change yesterday affect conversions?"

  • "Which pages have high traffic but poor engagement?"

  • "Where in our onboarding flow do users drop off?"

The agent can query Betterlytics through MCP and use that information as real-world context for product or code decisions.

Instead of making changes blindly, the agent can reason about how users actually interact with the site.

The implementation itself was relatively small, but the UX shift feels significant, where analytics stops being just a dashboard and becomes context that tools and agents can actively use to make product decisions.

Has anyone else experimented with giving agents access to real product data like this?

posted toAvatar for product Betterlytics
Betterlytics
  1. 3

    This feels like one of those features that sounds powerful but becomes much clearer when it’s demonstrated. A quick demo showing an agent reasoning about real user data through Betterlytics could make the impact immediately obvious for developers and teams. I help SaaS builders turn new features into simple launch videos that communicate the value quickly, so if you ever plan to promote this release I’d be glad to help.

    1. 2

      Great feedback. Show don’t tell

      1. 1

        Sure, i just drop some of my work above please check, if you want we can connect over LinkedIn, let me know what you think

    2. 1

      Thank you, feel free to drop your portfolio. A video would indeed capture the essence better :)

      1. 1

        if you want we can connect over LinkedIn, Please let me know your LinkedIn profile

  2. 1

    Yes, but I didn't see much improvement in agent performance

  3. 1

    The framing here is spot on. "Analytics stops being a dashboard and becomes context" is exactly the shift. Agents work better when context is structured and queryable, not buried in a wall of text.

    Same principle applies to how you write the prompts that instruct those agents. A flat blob of instructions gives the model everything at the same priority level. Breaking it into explicit blocks (role, context, constraints, output format separately) makes a real difference in how reliably the agent follows through.

    I've been building flompt (https://flompt.dev) for exactly this, a visual prompt builder that decomposes prompts into 12 semantic blocks and compiles to Claude-optimized XML. Open-source: github.com/Nyrok/flompt

  4. 1

    This is interesting because it feels like the difference between “AI guessing” and “AI working with context.”

    The question I’d have is whether the real unlock is analytics access itself, or the layer that turns raw product data into decisions an agent can actually act on reliably.

  5. 1

    The framing of analytics as context infrastructure is spot on. The next challenge becomes how you structure the prompt that tells the agent what to do with that data. When the agent gets a blob of analytics context mixed in with its task instructions, it often underweights it. When the analytics come in as a clearly labeled input block separate from the objective and constraints, the agent reasons with it much more reliably.

    It is the same structural problem you solved on the data side. The prompt side has the same gap.

    I built flompt (https://flompt.dev) for this, a visual prompt builder that separates prompts into typed blocks (role, objective, input, constraints, output format). The input block is specifically for this kind of structured context injection. Open-source: github.com/Nyrok/flompt

    If you find it useful, a star on github.com/Nyrok/flompt would mean a lot. Solo open-source project.

  6. 1

    The framing of analytics as "context infrastructure rather than a dashboard" really stuck with me. That's the shift. Nice execution on the MCP integration.

  7. 1

    This is a really interesting direction. Exposing analytics as a queryable layer for agents feels like a natural evolution beyond dashboards.

    One question I keep thinking about with MCP-style integrations is how agents deal with partial or misleading data windows. For example, if an agent sees a drop in conversions shortly after a deploy but only has a few hours of data, it might prematurely roll something back or optimize for noise rather than signal.

    Humans usually handle this with context (“let’s wait 24 hours before deciding”), but an agent needs explicit guardrails. Do you handle this with query constraints (e.g., minimum time ranges, confidence thresholds), or do you expect the agent layer to manage that reasoning?

    The idea of analytics becoming context infrastructure rather than a dashboard is compelling though. It reminds me of how observability tools evolved from graphs into APIs that automated systems can reason about.

  8. 1

    The question I keep thinking about: how do you handle the agent acting on incomplete data? Like if it only has 2 days of post-change data, does it wait or

  9. 1

    This is exactly where analytics should be heading. Dashboards are for humans who have time to interpret. Agents need raw queryable access.

    The "did the landing page change affect conversions" example is the killer use case. Right now, that workflow is: deploy change → wait → open dashboard → stare at charts → guess. Giving the agent direct access means it can correlate the change with outcomes in near real-time and even roll back if things go south.

    I've been thinking about this same pattern in game dev. Imagine an AI agent that has access to player behavior data; drop-off points, engagement heatmaps, where players get stuck and can adjust NPC difficulty or tutorial flow dynamically. Suddenly your game isn't just reacting to code, it's reacting to how people actually play.

    The MCP layer is interesting because it's not another dashboard. It's a bridge. Analytics becomes a live context engine instead of a retrospective report.

    Curious: have you run into any challenges with query complexity or rate limiting? Real user data at scale gets messy fast.

    (Full disclosure: exploring similar agent-data integrations in game dev via AI Powered Game Dev For Beginners - different domain, same "give agents real context" philosophy.)

    Nice launch.

    1. 1

      Thank you :)

      In terms of query complexity, we have abstract layers where the agent can select it's own dimensions to query by, that is time ranges, data dimensions, granularity and so on. This gives flexibility for everyone :)

      In regards to rate limiting, it is not an issue. We've set a generous rate limit of 60 requests per second - an agent won't ever hit this and our servers can handle much higher loads than that :)