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.

What were my top pages last week?

Your top pages for the last 7 days:

PageVisitorsConversions
/blog/cookieless-tracking1,28438
/pricing86251
/docs/getting-started59024

/pricing converts best: 5.9% of its visitors reached a goal.

used get_breakdown · dimension: page · period: 7d

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 Settings → API keys for the site you want to connect. 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?"
What can I ask you about this site?

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?

used describe_site

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 reads Authorization: Bearer ck_live_….
  • 403 — the key lacks the read scope. 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.