Agents and MCP

Cookieless traffic, readable by your agent.

Cloudflare Web Analytics is free and private, and its numbers usually stay in the dashboard. Connect it to LopeBase and your agent can read pageviews, visits, top pages, and referrers for each site, without a cookie banner anywhere.

Connect Cloudflare in one click, read-only. A read-only API token works too.

Ask your free analytics real questions

Your agent reads the same numbers the Cloudflare dashboard shows, shaped into tables it can compare across sites.

agent · Cloudflare, acme.com

Where did yesterday's spike come from?

read_sourcecf_analytics-acmedaily_pageviews

read_sourcecf_analytics-acmetraffic_sources

referrervisits (28d)
Direct6,204
news.ycombinator.com3,918
www.google.com2,771
github.com640

Pageviews tripled on the 14th, and almost all the extra visits came from Hacker News. Your blog post on invoice automation is the landing page. Want a follow-up post planned while interest is high?

No cookies, no banner

Cloudflare counts visits without cookies. LopeBase reads those counts; it adds no tracking of its own.

Referrers included

traffic_sources lists the sites that send visits over the last 28 days.

Every site, side by side

Each site is its own connection, so an agent can rank all your products by traffic in one ask.

What your agent can read

Four datasets per site. Cloudflare counts visits, not unique people, so these report visits.

  • web_analyticsPageviews and visits for the last 7 and 28 days.pageviews_7d · pageviews_28d · visits_7d · visits_28d
  • daily_pageviewsPageviews and visits per day.day · pageviews · visits
  • top_pathsThe most viewed pages.url · views · visits
  • traffic_sourcesVisits per referring site over 28 days.source · sessions

Workflows worth stealing

Small, useful checks that free analytics rarely gets.

Explain a spike

What caused the traffic spike this week, and which page did people land on?

The daily trend gives the date; referrers give the cause.

daily_pageviewstraffic_sources

Rank your sites

Rank all my sites by visits this week and last week.

One ask across every Cloudflare site you connected.

web_analytics

Find pages worth updating

Which pages get steady views but have not changed in a year?

Your agent checks the page's history in your repo.

top_paths

Tell launch traffic from search

After launch day, how much traffic still comes from search?

Shows whether a launch turned into lasting visitors.

traffic_sourcesdaily_pageviews

Set it up in a few minutes

  1. 01

    Connect Cloudflare. Start free, press Connect Cloudflare, and approve read access to your analytics. Each site is matched by domain.

  2. 02

    In a terminal agent, run npx lopebase in a project folder. It signs you in and adds LopeBase to Claude Code, Codex, Gemini CLI, opencode, or Cursor Agent.

  3. 03

    In a chat app or editor, add the remote MCP server https://app.lopebase.com/api/mcp and sign in when it asks. Any client that supports remote MCP servers with sign-in works.

Web Analytics must be turned on for the site in Cloudflare. It works whether or not the site is proxied through Cloudflare.

Good to know

  • Visits, not peopleCloudflare does not count unique visitors, so weekly active users are not offered for these sites.
  • No goals or funnelsCloudflare Web Analytics does not record events, so conversions are not available. Pair it with PostHog or GA4 if you need them.
  • Read onlyLopeBase never changes anything in your Cloudflare account.
  • One token, one workspaceAn agent's token only reads the workspace that issued it.

Cloudflare Web Analytics MCP questions

Something else? Email us.

Is this the same as Cloudflare's own MCP servers?

No. Cloudflare publishes its own MCP servers for working in your Cloudflare account. LopeBase puts Web Analytics next to your other products and sources, in one set of tools.

Does it work for sites not proxied through Cloudflare?

Yes, as long as the Web Analytics beacon is on the site.

Why are weekly active users missing?

Cloudflare counts visits, not people. LopeBase reports what Cloudflare measures and leaves out what it does not.

Can my agent read Workers or D1 too?

The Cloudflare connector shows Workers, deploys, and D1 in the console. Agents read the analytics datasets.

Make your free analytics answer questions.

Free for one product. No card. Agent access is on every plan.