Connect your AI assistant with MCP
Bring your LiteStats traffic, page and event analytics into your assistant. MCP access is read-only and included with Starter and Pro.
Looking for examples first? Explore the LiteStats MCP feature.
Before you start
- An active Starter or Pro LiteStats plan. Free does not include MCP.
- At least one website you own and have verified in LiteStats.
- An assistant that supports remote MCP over Streamable HTTP. Token connections also need support for an Authorization header.
Your assistant account or workspace may need a separate subscription or permission to use custom connections. LiteStats does not supply the AI model.
Connect your assistant
The MCP server URL is:
https://litestats.io/api/mcpStart in Account → AI Integrations to create a token, manage connections and see usage. For the configured ChatGPT OAuth connection, start the connection in ChatGPT and approve websites in LiteStats.
Create a read-only token
- Open AI Integrations and find Connect another assistant.
- Give the token a name, such as “Cursor on my laptop”.
- Select the verified websites that assistant should read. No sites are selected by default.
- Choose Create read-only token. Copy the token immediately; it is shown only once.
- Follow your assistant's steps below and replace
YOUR_TOKENwith your token.
Keep tokens in your private assistant settings, outside your project repository. Do not paste them into chat messages or commit them to Git. Tokens expire after 30 days.
Codex — VS Code or desktop
Open your personal configuration file in a text editor:
~/.codex/config.tomlOn Mac, use Finder → Go → Go to Folder (⌘⇧G) and enter ~/.codex. On Windows, use %USERPROFILE%\.codex\config.toml. Create the file if needed.
Add this section, replacing YOUR_TOKEN. If the LiteStats section already exists, update it and preserve your other settings.
[mcp_servers.litestats]
url = "https://litestats.io/api/mcp"
http_headers = { Authorization = "Bearer YOUR_TOKEN" }Save, restart the Codex app or extension, and start a new conversation. No Codex CLI installation is needed for this configuration method. Cloud sessions may need separate setup.
Official Codex MCP documentation ↗Cursor
Open your personal MCP configuration:
~/.cursor/mcp.jsonOn Mac, use Finder's Go to Folder (⌘⇧G) to open ~/.cursor. On Windows, use %USERPROFILE%\.cursor\mcp.json.
For a new file, paste this configuration. Replace YOUR_TOKEN. If you already have servers configured, merge only the litestats entry into your existing mcpServers object.
{
"mcpServers": {
"litestats": {
"url": "https://litestats.io/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}Save, restart Cursor, and enable LiteStats in its MCP settings. Open an Agent conversation to use the tools.
Official Cursor MCP documentation ↗Claude Code
Open your personal Claude Code configuration:
~/.claude.jsonAdd the LiteStats entry under the top-level mcpServers object, replacing YOUR_TOKEN. Preserve existing settings and servers.
{
"mcpServers": {
"litestats": {
"type": "http",
"url": "https://litestats.io/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}Save and restart your local Claude Code session. Check LiteStats in its MCP server list.
Official Claude Code MCP documentation ↗Claude — web or desktop
Where your account supports custom remote connectors with request headers, add a custom Web connector named LiteStats, using the MCP server URL above.
For a token connection, choose the option that skips OAuth sign-in (labelled “No sign in” in supported versions), then add this request header:
AuthorizationBearer YOUR_TOKENReplace YOUR_TOKEN, retaining Bearer and the space. The token authenticates your connection. Add the connector and enable it in your conversation.
If your account has no request-header option, use a supported token client such as Claude Code instead. The LiteStats OAuth client is not a general Claude OAuth registration.
Official Claude connector documentation ↗ChatGPT — manual OAuth connection
LiteStats currently uses a manual custom MCP connection, not a public ChatGPT listing. Your ChatGPT account and workspace must allow custom MCP apps or connectors.
- In ChatGPT's app or connector settings, add a custom MCP connection using the LiteStats server URL above.
- Use OAuth authentication. Sign in to LiteStats when prompted and select the verified websites to approve.
- Enable LiteStats in a new conversation and ask it to list your approved websites.
The connection must match LiteStats's configured ChatGPT OAuth client and callback. If ChatGPT asks for unsupported registration details or returns a callback error, contact LiteStats support rather than guessing credentials. You do not need to create an API token for this OAuth flow.
Official ChatGPT MCP connection documentation ↗Other clients can connect if they support Streamable HTTP and a Bearer Authorization header. Cross-origin browser-only clients are not supported. Do not assume every assistant's OAuth flow is registered with LiteStats.
Verify your connection
Start a new conversation, enable LiteStats if required, and ask:
Use LiteStats to list my approved websites.Only sites selected for that connection should appear. Then request a summary:
Use LiteStats to summarise the last 7 complete days for example.com. Include the date range and timezone.Replace example.com with an approved domain. Use the same UTC dates in your LiteStats dashboard when comparing results. Both successful calls use your monthly query allowance.
Available analytics tools
| Tool | What it retrieves | Plan |
|---|---|---|
| list_sites | Verified websites approved for this connection. | Starter & Pro |
| get_summary | Traffic totals and the preceding period of equal length. | Starter & Pro |
| get_timeseries | Traffic by hour, day, week or month in UTC. | Starter & Pro |
| get_breakdown | Top pages, referrers, countries, browsers, operating systems or devices. UTM dimensions require Pro. | Starter & Pro |
| get_events | Top custom events, event counts and distinct sessions. | Starter & Pro |
| get_funnel | An ordered funnel of 2–10 page paths within sessions. | Pro |
Tools return aggregate results, not raw visitor records, arbitrary SQL access or write operations. “Visitors” refers to distinct session IDs, not identified people. Sessions are not additive across time buckets or breakdowns. Average session duration excludes single-page sessions.
Monthly allowance and query limits
- 500 successful tool calls per month on Starter; 1,000 on Pro. AI Agent Access usage is shared across all sites and connections.
- Each successful call counts, including
list_sitesand cached results. One question may call several tools. - Sign-in, connection setup, tool discovery, token refresh and failed tool calls do not consume the monthly allowance.
- Resets on the first of each month at 00:00 UTC, including on annual plans. Reconnecting does not reset usage.
- No automatic MCP overage billing. At the limit, analytics tools pause; website tracking continues normally.
View used and remaining queries in AI Integrations. Additional service limits apply: 60 authenticated requests per minute, 1,000 per UTC day, two simultaneous analytics tools per account, and up to 10 active connections.
A query can cover up to 93 days; hourly queries cover up to 7 days. Top breakdowns and events return at most 100 rows. Large funnel ranges may need narrowing. Results include UTC dates and may be cached for up to 30 seconds.
Expiry, privacy and disconnection
Connections expire after 30 days. Replace an expired API token in your assistant's settings, or reconnect an expired OAuth grant.
To revoke access immediately, open Account → AI Integrations and select Disconnect beside the connection. Removing it only from your assistant does not necessarily revoke its LiteStats credentials.
Each connection can read only approved sites you still own and have verified. Your chosen assistant receives the analytics it retrieves; check its provider's terms and privacy policy before sharing. Disconnect and replace any token exposed in chat or source control.
Troubleshooting
Authentication required
Check that the token has not expired or been disconnected, your paid plan is active, and the header contains Bearer, one space, then your token. Restart the assistant after updating its settings.
Website is not authorised
Check the approved site list for that connection. A token cannot read unselected, deleted or unverified sites. Create a replacement connection if you need a different selection.
Monthly allowance reached or too many requests
Check the reset date in AI Integrations. Monthly exhaustion requires waiting for the reset; short-term request limits require waiting before retrying. Repeated retries do not increase your allowance.
This tool requires Pro
UTM campaign dimensions and funnels require Pro. Starter includes summaries, trends, core breakdowns and custom events.
Numbers differ from the dashboard
Compare the same website, dates and UTC timezone without dashboard filters. Allow for the 30-second cache. Treat a service error as unavailable data, not zero traffic.
For more ways to use the connection, see the example prompts.