Connect an AI assistant (MCP)
Updated October 18, 2026
The Model Context Protocol (MCP) lets AI assistants use your Statsdot data. Once connected, you can ask things like "Which pages brought the most visitors from Google last week?" or "Compare September with August for shop.example.com" and the assistant reads the numbers from Statsdot.
The server address is https://statsdot.com/api/mcp. Claude and ChatGPT connect with OAuth: you sign in to Statsdot and approve the connection. Developer tools such as Claude Code, Cursor and Codex use the same personal access tokens as the REST API.
Claude and ChatGPT (OAuth)
Claude
In Claude (web, desktop or mobile), open Settings > Connectors, choose Add custom connector and enter https://statsdot.com/api/mcp. Claude opens a Statsdot page: sign in if needed and choose Allow.
ChatGPT
In ChatGPT, open Settings > Apps and connectors, turn on developer mode under Advanced if your plan requires it, create a connector with the URL https://statsdot.com/api/mcp and choose OAuth as the authentication. Approve the connection on the Statsdot page that opens.
Connections made this way are read only: the assistant can ask about your statistics but cannot change sites, goals, notes or your team. They appear under Connected assistants on the API and MCP page, where you can disconnect them. An unused connection expires after 30 days.
Developer tools (access token)
1. Create a token
On the API and MCP page of your account, create a token. Read only is enough to ask questions. Choose read and write only if you want the assistant to add sites, goals or team members.
2. Connect your assistant
Claude Code
claude mcp add --transport http statsdot https://statsdot.com/api/mcp \
--header "Authorization: Bearer 12|your-token"
Cursor
In ~/.cursor/mcp.json:
{
"mcpServers": {
"statsdot": {
"url": "https://statsdot.com/api/mcp",
"headers": { "Authorization": "Bearer 12|your-token" }
}
}
}
Codex
In ~/.codex/config.toml:
[mcp_servers.statsdot]
url = "https://statsdot.com/api/mcp"
http_headers = { "Authorization" = "Bearer 12|your-token" }
Other clients that support remote MCP servers over HTTP with a custom header work the same way.
Tools
| Tool | What it does |
|---|---|
get-account |
Your plan, events used and included, limits |
list-sites |
Sites you can see, with their ids |
get-overview |
Visitors, pageviews, bounce rate and visit duration, compared with the previous period |
get-timeseries |
Visitors and pageviews per day or month |
get-breakdown |
Top pages, entry and exit pages, referrers, campaigns, countries, devices, browsers, systems, events |
get-goal-results |
Goals with conversions and conversion rate |
get-realtime |
Visitors in the last five minutes |
get-bot-traffic |
AI crawlers that read the site and the pages they requested |
list-funnels, get-funnel-results, create-funnel, delete-funnel |
Funnels and the visitors at each step |
create-site, update-site, delete-site |
Manage sites, including alerts and the main goal (write tokens) |
create-goal, delete-goal |
Manage goals (write tokens) |
list-notes, create-note, delete-note |
Notes on the chart that explain changes in traffic |
list-team, invite-team-member, remove-team-member |
Manage your team (write tokens) |
Read tools are marked read-only, and tools that delete are marked destructive, so assistants ask before using them. Ranges and filters work as in the API.
Privacy
The assistant sees the same aggregated statistics as your dashboard. Statsdot stores no personal data about your visitors, so there is none to share. Revoke the token or disconnect the assistant on the API and MCP page to cut the connection at any time.