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-serverClaude 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:
| Tool | Description |
|---|---|
| list_sites | List all sites in your workspace |
| get_site | Get details for a specific site |
| get_site_credentials | Get site ID and token for SDK setup |
| list_events | List detected and custom events |
| define_event | Define a custom tracking event |
| get_overview | Get analytics overview (visitors, pageviews, bounce rate) |
| get_funnels | Get discovered funnels and conversion rates |
| get_milestones | Get business milestone stats |
| get_flow_graph | Get product flow graph (state transitions) |
| get_drift_alerts | Get element drift alerts (UI changes breaking tracking) |
| get_health | Get site health score and top issues |
| get_install_snippet | Get 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?"