Agents and API

MCP server

The dashboard's own read path, exposed as 26 tools. Any client that speaks MCP gets the same figures the dashboard shows, and so does a curl, because the server is plain JSON-RPC over HTTP.

Updated All docs as one Markdown file

Connect a client

Claude Code
claude mcp add --transport http geckostats https://geckostats.com/api/mcp \ --header "Authorization: Bearer <site-key>"

Cursor, ChatGPT, Claude, Gemini CLI and anything else that speaks MCP: the server is at /api/mcp, the transport is HTTP, the auth is the website's key as a bearer token. The key is on the API and MCP keys step of the website, and is scoped to that website alone.

The 26 tools

ToolWhat it answers
list_sitesThe website this key can read, with its timezone and revenue currency.
site_overviewHeadline numbers for a period and the period before it: visitors, sessions, pageviews, bounce rate, revenue, payments, customers.
top_pagesMost visited pages, with the revenue from people who saw each one.
top_sourcesWhere visitors came from, with visitors, revenue and paying customers each.
top_goalsGoals reached in the period, with the revenue of the visitors who reached them.
geographyVisitors and revenue by country, region or city.
devicesVisitors and revenue by device type, browser or operating system.
breakdownVisitors and revenue by any dimension: campaigns, ref tags, channels, entry and exit pages, hostnames.
customersEvery payment in the period: amount, who paid, renewal or not, and the visit it is credited to.
visitorsRecent visitors, where they came from, what they spent, and anything identify() knows about them.
visitor_profileOne visitor end to end: visits, every event in order, payments.
realtimeWho is on the site now, which page, and the last events as they happened.
list_funnelsThe funnels defined for this website, with their steps and ids.
funnel_statsHow many visitors reached each step of a funnel, and where they dropped out.
retentionWho came back, week by week, and what the returners were worth.
subscriptionsMRR now, how many subscriptions are running, trialing, past due or cancelling, churn and lifetime value by source.
deploysReleases recorded in the period, newest first.
search_queriesWhat people searched on Google to reach the site: clicks, impressions, CTR, position, by query, page, country, device or Discover.
seo_opportunitiesWhat is worth doing about search, ranked by money: striking-distance queries, pages losing clicks, and the rest.
index_statusWhat Google's index says about the pages that earn.
ai_vs_searchGoogle against the AI assistants, day by day: Search Console clicks next to visits from ChatGPT, Claude, Perplexity and the rest.
ctr_pressureQueries losing clicks while holding their position, the shape an answer above the results leaves.
vitals75th-percentile LCP, INP, CLS and TTFB from real visits.
site_installThe snippets for this website: the tag, a goal, an identify call.
create_funnelWrites. Defines a funnel of 2 to 10 steps, each a page path (wildcards allowed) or a goal name.
rematch_paymentsWrites. Tries again to link payments that have no visitor yet, and reports why each could or could not be matched. Safe to re-run.

Twenty-four tools only read, and say so in their annotations. Every tool runs the dashboard's own queries against your data and returns that figure or an error; nothing is reasoned about on the server, so a tool cannot make a number up. Periods are the dashboard's: today, yesterday, 24h, 48h, 7d, 30d, 90d, 12m, all, or custom with from and to.

From a script

curl
curl -s https://geckostats.com/api/mcp \ -H "Authorization: Bearer <site-key>" -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call", "params":{"name":"top_sources","arguments":{"period":"30d","limit":5}}}'

The result is standard MCP: result.content[0].text holds the tool's JSON. tools/list returns every tool with its input schema.