Connect your AI to your analytics

Peeko hosts a remote MCP server, so the agent that built your site can answer questions about its traffic in plain language.

What this is

Point Claude Code, Claude Desktop, Cursor, Codex or any MCP client at https://usepeeko.com/api/mcp with an API key, and ask questions in plain language.

  • "How many visitors this week?"
  • "Which pages hold people longest?"
  • "Which AI crawlers hit my site, and what did they 404 on?"

It is read only except for one tool that creates a site, and it is scoped to your own data by construction: every call goes through the same site scoped queries the dashboard uses, so a key can only ever read its own team's sites, never raw SQL, and never a visitor's address.

What a key can see. A key belongs to a person, and sites belong to a team, so a key reaches every site of every team you are a member of and no more. Join a second team and its sites appear on the same key. Leave one and they stop. Membership is re-checked on every single call rather than baked into the key, so removing someone closes their access at the same moment it closes their dashboard.

Billing applies here too. The data tools follow the same rule as the dashboard: a team whose subscription is not active drops out of what your key can read, while teams that are still paying are unaffected. Reactivating restores it with no new key and no reconnect.

No account yet? Sign up from your agent

You do not need an account, or a key, to connect. Point your agent at the same address with no header and it gets exactly one tool.

claude mcp add --transport http peeko https://usepeeko.com/api/mcp
codex mcp add peeko --url https://usepeeko.com/api/mcp
gemini mcp add --transport http peeko https://usepeeko.com/api/mcp

Then ask it: "Use the peeko MCP server to send a Peeko sign in link to my email address."

You finish in a browser. Opening the emailed link is what creates the account, or signs you in, because one link does both. Choosing a size and paying happen on the web. An agent never touches checkout, and this tool never returns a session, a token or a key.

Its answer is the same sentence whether or not the address already has an account. That is deliberate, so nobody can use this endpoint to discover who has a Peeko account. It is rate limited per address and per network, so asking repeatedly will not produce more mail.

Once you are signed up and subscribed, come back for a key. The analytics tools stay invisible until you reconnect with one, and the sign up tool disappears from the list once you do.

Get an API key

A key authenticates a client as your account. It is shown once, so copy it immediately: only a hash is stored and it cannot be recovered.

The API keys card on your settings page mints one. Name the key, create it, and copy either the raw key or the ready made connect command from the panel that appears once. The same card lists your keys with their prefix, creation date and last use, and revokes them.

Send the key as a bearer token: Authorization: Bearer mcpk_.... It is never a session cookie.

Connect a client

Every client below reads the same endpoint. Two of them take a command, the rest take a config file.

Claude Code

claude mcp add --transport http peeko https://usepeeko.com/api/mcp \
  --header "Authorization: Bearer mcpk_your_key_here"

claude mcp list should then show peeko as connected. The tools load at the start of a new session, or check /mcp in the one you are in.

Codex

codex mcp add peeko --url https://usepeeko.com/api/mcp \
  --header "Authorization: Bearer mcpk_your_key_here"

Claude Desktop, Cursor, or any client with a config file

An HTTP server with a header. Cursor reads ~/.cursor/mcp.json for every project, or .cursor/mcp.json for one.

{
  "mcpServers": {
    "peeko": {
      "type": "http",
      "url": "https://usepeeko.com/api/mcp",
      "headers": { "Authorization": "Bearer mcpk_your_key_here" }
    }
  }
}

Then ask the assistant to list your sites and go from there. Call the explain_metrics prompt for exact metric definitions, including the one that catches people out: visitors are distinct daily hashes, so a multi day total sums daily uniques.

Tools

All tools except the one that creates a site take a site id, which the site list gives you. The analytics tools take an optional range and optional filters.

Ranges are today, 24h, 7d, 30d, 90d and all, defaulting to 7d. Filters are any of page, source, country, device, browser, browser_version, os, os_version, screen, viewport, utm_source, utm_medium and utm_campaign, and they are the same filter model as the dashboard, narrowing every metric at once.

ToolAnswersParams
list_sitesWhich sites are on this account: id, name, domain, emoji and organization. Call first.none
create_siteCreates a site and returns its id, its public site key and a ready to paste installation prompt. The one tool that writes.name, domain, org?
get_summaryHeadline numbers: views, visitors, sessions, bounce rate, pages per session, average duration, the previous window for deltas, and returning against new.site, range?, filters?
get_top_pagesMost viewed pages.site, range?, filters?
get_sourcesReferring sources. "Direct" means no referrer.site, range?, filters?
get_engagementPages ranked by dwell, which is to say which pages hold attention longest.site, range?, filters?
get_live_nowVisitors active in the last two minutes: a count, their countries, and recent detail.site
get_bot_summaryAI crawler traffic: totals, 404s, and breakdowns by category, provider, agent, most crawled and most missing pages.site, range?

Plus one prompt, explain_metrics, defining every metric and the privacy model.

Creating a site from your agent

create_site takes a name and a domain and hands back the site id, the public site key, and a prompt with that real key already in it, ready to paste into a coding agent. It seeds the site's allowed origins with your domain and its www version, so a correctly installed snippet records traffic straight away.

If your key reaches more than one organization you must pass org. Peeko will not pick one for you: putting a site in the wrong organization bills it to the wrong party and shows it to the wrong people, and nothing would ever report it.

The names on your dashboard, and the names in the payloads

The dashboard speaks plainly and the payloads keep their original field names. Both are correct. This is the map between them.

Payload fieldOn your dashboardWhat it counts
visitorsPeopleDistinct visitors per UTC day, so a multi day total sums daily uniques.
sessionsVisitsConsecutive page views with no gap longer than 30 minutes.
viewsPage viewsEvery page opened, including the same page twice.
avgDurationTime on siteAverage visit length in seconds. A one page visit counts as zero.
bounceRateLeft after one pageShare of visits that opened one page and went no further. Deltas are in points.
pagesPerSessionPages per visitAverage pages opened per visit.

Two things the crawler summary will not let you assume

Both are properties of how the data is collected, so no parameter turns them off. An agent should check the flag before answering.

404s are not observable on every site

The crawler middleware runs before your response exists, so it can only report a response status where your framework exposes one after the fact. Some frameworks have such a hook. Next's not-found boundary is not one, because it also renders for requests that resolve 200.

The tool therefore returns responseStatusAvailable. When it is false, missingHits is null and the missing list is empty because 404s are unknowable for that site, not because none happened. Check the flag before answering any question about missing pages.

A crawler's identity is a claim, not a fact

Classification is done from the user agent alone, and Peeko stores no address on the crawler path by design. Anything can send Googlebot's user agent, and it will be reported as Google. Treat crawler names as self reported.

Protocol notes

For anyone writing a client rather than configuring one.

  • Transport. Streamable HTTP, specification 2025-06-18, hand rolled. Post a JSON-RPC request and get one application/json response. The server never initiates messages, so there is no server sent event stream and no session state, and GET and DELETE return 405.
  • Auth. A static bearer API key, with no OAuth flow. A missing or invalid key gets a 401.
  • Errors. JSON-RPC error codes for protocol problems, -32601 for an unknown method and -32602 for bad arguments or an unknown tool. A domain failure, such as a site you do not own, comes back as a tool result marked as an error rather than as a protocol error.

Locally the base address is http://localhost:3000 instead of the production origin. Everything else is identical.

Where to go next

  • Put Peeko on your site is what you send somebody. It covers Lovable, v0, Bolt, Cursor, Claude Code, Codex, Next.js and plain HTML, and repeats the client configs above.
  • The Peeko command line is the second front door onto this same endpoint, for when you would rather not leave the terminal.

Let your agent read the numbers.

Get started