MCP Server

The Gurulu MCP (Model Context Protocol) server lets AI agents like Claude query your analytics, manage events, and interact with your Gurulu workspace programmatically.

Installation

npm install -g @gurulu/mcp-server

Claude Desktop setup

Add this to your Claude Desktop config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

claude_desktop_config.json
{
  "mcpServers": {
    "gurulu": {
      "command": "gurulu-mcp",
      "env": {
        "GURULU_SECRET_KEY": "gsk_live_..."
      }
    }
  }
}

Claude Code setup

Add the server to your project or user MCP settings:

.mcp.json
{
  "mcpServers": {
    "gurulu": {
      "command": "gurulu-mcp",
      "env": {
        "GURULU_SECRET_KEY": "gsk_live_..."
      }
    }
  }
}

Get your secret key from Settings > Developer > API Keys. Use a key with the gsk_live_ prefix for full read/write access.

Available tools

The MCP server exposes 12 tools across read, write, and chat surfaces:

ToolDescription
list_sitesList all sites in your workspace
get_siteGet details for a specific site
get_site_credentialsGet site ID and token for SDK setup
list_eventsList detected and custom events
define_eventDefine a custom tracking event
get_overviewGet analytics overview (visitors, pageviews, bounce rate)
get_funnelsGet discovered funnels and conversion rates
get_milestonesGet business milestone stats
get_flow_graphGet product flow graph (state transitions)
get_drift_alertsGet element drift alerts (UI changes breaking tracking)
get_healthGet site health score and top issues
get_install_snippetGet installation snippet for a framework

Example prompts

Once connected, try asking your AI agent:

  • "Show me my site's analytics overview for the last 7 days"
  • "What funnels has Gurulu discovered on my site?"
  • "Define a custom event for the checkout button"
  • "Are there any drift alerts I should address?"
  • "What is my site health score?"