MCP Server
Clickport hosts an MCP server: connect it to Claude Code, Claude Desktop, Cursor, or any MCP-capable AI tool, and ask your analytics questions in plain language. The assistant queries your real numbers and answers with them.
Your top pages for the last 7 days:
| Page | Visitors | Conversions |
|---|---|---|
| /blog/cookieless-tracking | 1,284 | 38 |
| /pricing | 862 | 51 |
| /docs/getting-started | 590 | 24 |
/pricing converts best: 5.9% of its visitors reached a goal.
MCP (Model Context Protocol) is the open standard AI tools use to reach external data. Clickport's server is read-only: assistants can query numbers, never change settings, delete data, or write anything. It is scoped to one site per API key, and the same rate limits as the rest of the read API apply.
Get an API key
Create a key under the site's API keys settings for the site you want to connect. The account-level Settings → API page lists every site's keys and holds your team API keys, if you would rather start there. Any key with the read scope works; keys created with default scopes have it. You can revoke the key at any time, which disconnects every assistant using it.
Connect Claude Code
One command:
claude mcp add --transport http clickport https://clickport.io/api/mcp \
--header "Authorization: Bearer ck_live_your_key"
Then ask away: "How is traffic this week compared to last?"
Connect Claude Desktop
Settings → Connectors → Add custom connector, or add this to your claude_desktop_config.json:
{
"mcpServers": {
"clickport": {
"url": "https://clickport.io/api/mcp",
"headers": { "Authorization": "Bearer ck_live_your_key" }
}
}
}
Connect Cursor
Add to .cursor/mcp.json in your project (or the global one):
{
"mcpServers": {
"clickport": {
"url": "https://clickport.io/api/mcp",
"headers": { "Authorization": "Bearer ck_live_your_key" }
}
}
}
Other clients
Any MCP client that supports remote servers (Streamable HTTP) with custom headers can connect: endpoint https://clickport.io/api/mcp, header Authorization: Bearer <your key>. The server is stateless, so no session setup is needed.
The tools
Assistants discover these automatically; you never call them by hand. Knowing what exists helps you know what to ask.
- describe_site — the connected site, its timezone, when data starts, and the valid metrics, dimensions, and periods. Assistants call it first to orient themselves.
- get_stats — aggregate numbers for a period, optionally compared to the previous one. "How many visitors this month?"
- get_breakdown — top values of any dimension: pages, sources, channels, countries, devices, campaigns, UTM values. "Which sources brought the most signups?"
- get_timeseries — one metric over time by hour, day, week, or month. "Plot daily visitors for the last 90 days."
- get_realtime — who is on the site right now. "Anyone on the pricing page at the moment?"
- list_goals — the goals configured for the site.
- get_goal_conversions — conversions, conversion rate, and revenue for one goal. "How did the newsletter goal do in July?"
- get_ai_agents: AI agent KPIs, the per-company funnel, and the agents table. Which AI read the site, how much, and what it did. "Which AI companies are reading my site the most?"
- get_ai_agent_pages: the pages AI agents read most, or the company breakdown for one page. "Which pages get cited by AI search the most?"
- get_ai_agent_series: one company's or one page's AI reads over time. "Plot ClaudeBot's reads for the last 30 days."
- get_ai_agent_hits: the raw per-fetch feed, timestamp, agent, intent, and path for individual requests. "List the last 20 times Perplexity fetched my pricing page."
?site_domain=<domain> to the MCP URL to say which one, for example https://clickport.io/api/mcp?site_domain=example.com. See Team API in the API reference.
This is mywebsite.com (Europe/Berlin), with data since January 15. I can break down visitors, pageviews, bounce rate, duration, conversions, and revenue by page, source, channel, country, device, campaign, and more, over any period up to about a year, plus live visitors and per-goal conversion numbers. What would you like to know?
Limits and security
- Read-only by design. The MCP surface has no write tools. A leaked key can read one site's stats, nothing more, and revoking it closes that.
- One site per key. Connect several sites by adding the connector once per site with that site's key.
- Rate limits: 300 requests per hour and 5 concurrent per key, shared with the rest of the read API. A typical question uses 1–4 requests.
- Your numbers stay yours. The assistant you connect sees query results; Clickport sends nothing anywhere else.
Troubleshooting
401— the key is wrong or was revoked. Check the header readsAuthorization: Bearer ck_live_….403— the key lacks thereadscope. Create a fresh key with default scopes.429— rate limit reached; the response says when to retry. Agents usually handle this themselves.- Client says the server "doesn't support streaming" — connect with the Streamable HTTP transport (sometimes labeled just "HTTP"), not SSE.
For what to do with all this, see MCP use cases.