Connect Session Story to AI assistants and agents via the Model Context Protocol. Query your analytics data using natural language through any MCP-compatible client.
Add the following to your MCP client configuration. Replace YOUR_API_KEY with the API key from your account settings.
{
"mcpServers": {
"session-story": {
"type": "http",
"url": "https://www.sessionstory.io/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Go to Settings → MCP, click Add new MCP server, and enter:
| Name | Session Story |
| Type | HTTP |
| URL | https://www.sessionstory.io/api/mcp |
Then add the Authorization header with your Bearer token.
Authentication: The MCP server uses the same API key as the REST API. You can find it in your account settings.
The MCP server exposes the following read-only tools. Your AI assistant will automatically discover and use them.
List all your sites with visitor, session, and event counts plus a 7-day session sparkline.
Create a new site to track. Params: name, domain
Get details for a specific site including counts. Params: site_id
Analytics overview: sessions over time, bounce rate, avg duration, referrers, top pages, top events, countries, devices. Params: site_id, from?, to?
Revenue analytics: totals, over time, by source, by campaign. Params: site_id, from?, to?
Friction analysis: behavior quality by source/campaign (bouncer, skimmer, hesitator, engaged). Params: site_id, from?, to?
Scroll depth distribution (25/50/75/100%) per page. Params: site_id, url?, limit?
Sessions reaching each scroll depth milestone. Params: site_id, url?
What % of sessions from each source reached a page or event. Params: site_id, metric (page|event), value, from?, to?
List custom event types with counts. Params: site_id, from?, to?
Conversion funnel from event steps. Params: site_id, steps[], from?, to?
Unique data property keys for an event type. Params: site_id, type
Paginated visitors for a site. Params: site_id, page?
All sessions for a visitor. Params: visitor_id
All events in a session. Params: visitor_id, session_id
Once connected, you can ask your AI assistant questions like: