Digital insights platform
## Heap MCP Server: Auto-Capture Analytics The **Heap MCP Server** integrates Heap's auto-capture analytics platform into Google Antigravity. This enables automatic event tracking, retroactive analysis, and behavioral insights without manual instrumentation. ### Why Heap MCP? Heap captures everything automatically: - **Auto-Capture**: No manual tracking code - **Retroactive Analysis**: Analyze past data - **Session Replay**: Watch user journeys - **Segmentation**: Behavioral cohorts - **No Data Loss**: Never miss an event ### Key Features #### 1. Query Analytics ```python import requests headers = {"Authorization": f"Bearer {api_key}"} response = requests.post( "https://heapanalytics.com/api/public/v0/query", headers=headers, json={ "query": { "name": "button_click", "analysis": "unique_users", "groupby": [{"name": "page_url"}] }, "timeframe": {"from": "2024-01-01", "to": "2024-03-01"} } ) for row in response.json()["results"]: print(f"Page: {row['page_url']} - Users: {row['unique_users']}") ``` #### 2. Define Events ```python # Create virtual event from auto-captured data event = requests.post( "https://heapanalytics.com/api/public/v0/events", headers=headers, json={ "name": "Checkout Started", "definition": { "type": "click", "target_text": "Proceed to Checkout" } } ) ``` #### 3. User Properties ```python # Add user properties via server-side API requests.post( "https://heapanalytics.com/api/v1/add_user_properties", headers=headers, json={ "app_id": "your-app-id", "identity": "user@example.com", "properties": {"plan": "enterprise", "mrr": 999} } ) ``` ### Configuration ```json { "mcpServers": { "heap": { "command": "npx", "args": ["-y", "@anthropic/mcp-heap"], "env": { "HEAP_APP_ID": "your-app-id", "HEAP_API_KEY": "your-api-key" } } } } ``` ### Use Cases **Retroactive Analysis**: Answer questions about past behavior. **Auto Event Discovery**: Find important events automatically. **Funnel Analysis**: Understand conversion paths. The Heap MCP Server brings auto-capture analytics to Antigravity.
{
"mcpServers": {
"heap": {
"mcpServers": {
"heap": {
"env": {
"HEAP_APP_ID": "your-app-id",
"HEAP_API_KEY": "your-api-key"
},
"args": [
"-y",
"heap-mcp-server"
],
"command": "npx"
}
}
}
}
}