Session Story Sign in
← Back to Developers

MCP Server

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.

Setup

Add the following to your MCP client configuration. Replace YOUR_API_KEY with the API key from your account settings.

Claude Desktop / Claude Code

{
  "mcpServers": {
    "session-story": {
      "type": "http",
      "url": "https://www.sessionstory.io/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Cursor

Go to Settings → MCP, click Add new MCP server, and enter:

NameSession Story
TypeHTTP
URLhttps://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.

Available tools

The MCP server exposes the following read-only tools. Your AI assistant will automatically discover and use them.

list_sites

List all your sites with visitor, session, and event counts plus a 7-day session sparkline.

create_site

Create a new site to track. Params: name, domain

get_site

Get details for a specific site including counts. Params: site_id

get_dashboard

Analytics overview: sessions over time, bounce rate, avg duration, referrers, top pages, top events, countries, devices. Params: site_id, from?, to?

get_revenue

Revenue analytics: totals, over time, by source, by campaign. Params: site_id, from?, to?

get_friction

Friction analysis: behavior quality by source/campaign (bouncer, skimmer, hesitator, engaged). Params: site_id, from?, to?

get_scroll_depth

Scroll depth distribution (25/50/75/100%) per page. Params: site_id, url?, limit?

get_engagement_funnel

Sessions reaching each scroll depth milestone. Params: site_id, url?

get_reach

What % of sessions from each source reached a page or event. Params: site_id, metric (page|event), value, from?, to?

get_custom_event_types

List custom event types with counts. Params: site_id, from?, to?

get_custom_event_funnel

Conversion funnel from event steps. Params: site_id, steps[], from?, to?

get_event_data_keys

Unique data property keys for an event type. Params: site_id, type

list_visitors

Paginated visitors for a site. Params: site_id, page?

get_visitor_sessions

All sessions for a visitor. Params: visitor_id

get_session_events

All events in a session. Params: visitor_id, session_id

Example prompts

Once connected, you can ask your AI assistant questions like:

  • "Show me my sites and their traffic for the last 7 days"
  • "What's the bounce rate on my site this week vs last week?"
  • "Which traffic sources have the highest engagement?"
  • "Show me friction analysis for my Google Ads campaigns"
  • "What are my top pages and how far do people scroll on them?"
  • "Build a funnel from signup_start to signup_complete to first_purchase"
  • "What revenue did each campaign generate this month?"