# Heap MCP for AI Agents AI Agent Connect

> Heap MCP lets you manage product analytics directly from your AI agent. Track server-side events, identify users, and manage segments without leaving your chat interface. It handles bulk profile updates and GDPR data deletions on the fly for faster data management.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_Pn4btlTsBht307lZ93t32Og42XTCaaYQZ5x3ubYE/ai-agent-connect
- **Tags:** product-analytics, event-tracking, user-behavior, digital-insights, session-analysis, data-segmentation

## Description

This Heap MCP connects your Heap.io analytics account to your AI agent so you can manage product data through natural conversation. You can skip the tedious work of clicking through complex dashboards to find specific user profiles or check segment sizes. If you need to push new properties to a group of users, you can just tell your agent to do it. It handles the heavy lifting of high-throughput event tracking and helps you keep your analytics schema in sync without manual updates. It's a core part of the Vinkius catalog for teams that want to move faster. You get a dedicated analyst in your chat window that can identify anonymous sessions, query user behaviors, and even handle GDPR deletion requests on the fly. Instead of copy-pasting IDs or hunting for the right button to update a user's status, you just describe what you want to happen. Your agent handles the interaction with the analytics platform, giving you a direct way to manipulate your data without the usual friction of a web UI. This means you spend less time on data entry and more time actually looking at what your users are doing. It turns your analytics from a static dashboard into an interactive data source you can talk to.

## Tools

### get_api_usage
Check your current API usage and project status. It helps you monitor limits and ensure your integration is healthy.

### track_event
Track a server-side event for a user in Heap. Use this to send custom interaction data with JSON properties.

### get_event_definitions
List all custom event definitions in Heap. It keeps your agent aligned with your actual analytics schema.

### add_account_properties
Add or update properties for an account or group of users. This is great for tagging entire organizations with specific metadata.

### add_user_properties
Add or update custom properties for a specific user profile. Use this to enrich your data with unique user attributes.

### bulk_add_user_properties
Update properties for multiple users in a single request. This saves you from manual updates when dealing with large cohorts.

### bulk_track_events
Track multiple events concurrently for high-throughput needs. This is the best way to send large batches of interaction data.

### delete_user_data
Permanently delete a user and all their associated data. This ensures you stay compliant with GDPR requirements.

### get_my_profile
Get information about the authenticated API key. Use this to verify which account your agent is currently connected to.

### identify_user
Associate an anonymous session with a specific user identity. This helps you stitch together a complete user journey.

### get_segments
List all segments defined in your Heap project. Use this to quickly see what cohorts you have available to query.

### query_user_profiles
Query and filter user profiles based on specific criteria. This lets you find specific users who match your target behavior.

## Prompt Examples

**Prompt:** 
```
Track the 'Signed Up' event for user 'u_123' with the property 'plan': 'pro'.
```

**Response:** 
```
### Event Tracked Successfully

I've sent the **Signed Up** event to Heap for user **u_123**. 

**Details:**
- **User ID:** `u_123`
- **Properties:** `plan: pro`
- **Status:** Success

Would you like me to check the current properties for this user profile?
```

**Prompt:** 
```
What are my current segments?
```

**Response:** 
```
I've retrieved the active segments from your Heap project:

| Segment Name | Description |
| :--- | :--- |
| **Power Users** | Users with >10 logins/week |
| **Churn Risks** | Inactive for 14+ days |
| **Trial Users** | On 7-day free plan |
| **New Signups** | Registered in last 24h |

Which one would you like to query for more details?
```

**Prompt:** 
```
Identify user 'anon_99' as 'test@example.com'.
```

**Response:** 
```
### User Identity Linked

I've successfully linked the anonymous session **anon_99** to the identity **test@example.com** in Heap.

*   **Action:** Session Consolidation
*   **Result:** All future events from this user will now be grouped under this identity.

Do you want to add any custom profile properties for this user now?
```

## Capabilities

### Track server-side events
Send custom interactions to Heap to capture granular user behavior.

### Identify anonymous users
Link anonymous sessions to specific identities to consolidate user history.

### Manage user segments
List and view your project cohorts to see how different groups are behaving.

### Update user properties
Add or change custom data points for specific user profiles.

### Perform bulk updates
Handle multiple user property changes in a single request.

### Delete user data
Permanently remove user data to maintain GDPR compliance.

### Query user profiles
Filter and retrieve user profiles based on specific behaviors or attributes.

## Use Cases

### Bulk updating user tags
A growth engineer needs to tag 500 users with a 'Beta_Tester' property. They ask the agent to use bulk_add_user_properties to do it in seconds.

### Verifying event schemas
A product manager needs to know if the 'Checkout Started' event is firing correctly. They use get_event_definitions to check the current schema.

### Handling GDPR requests
A privacy officer gets a request to delete a user's data. They use delete_user_data to handle the request without logging into the dashboard.

### Finding specific user cohorts
An analyst needs to find users who joined last week but didn't purchase. They use query_user_profiles to filter for those specific attributes.

## Benefits

- Stop manual data entry by using bulk_add_user_properties to update dozens of user profiles in one command.
- Stay compliant with GDPR by using delete_user_data to scrub personal info instantly from your chat interface.
- Keep your schema accurate by using get_event_definitions to verify what is being tracked during planning.
- Identify users faster by using identify_user to link anonymous sessions to known accounts in real time.
- Monitor growth trends without the dashboard fatigue by using get_segments to check cohort sizes instantly.
- Handle high-volume data more efficiently by using bulk_track_events to send large batches of interactions.

## How It Works

The bottom line is you get a direct line to your product data without the dashboard fatigue.

1. Subscribe to this Connector and get your Heap App ID and API Key.
2. Connect your credentials to your AI client like Claude or Cursor.
3. Ask your agent to pull segments, track events, or manage user identities.

## Frequently Asked Questions

**Can I use the Heap MCP to delete user data for GDPR?**
Yes, you can use the delete_user_data tool to permanently remove a user and all their associated data directly through your AI agent.

**How does this help with growth engineering?**
It allows growth engineers to automate high-throughput event tracking and bulk property updates, removing the need for manual data entry in the dashboard.

**Can I check my event definitions?**
Yes, you can use the get_event_definitions tool to list all custom events, ensuring your agent stays aligned with your analytics schema.

**Does it support high-throughput tracking?**
Yes, the bulk_track_events tool is specifically designed to handle multiple events concurrently for high-volume data needs.

**Can I manage user properties via chat?**
Absolutely. You can add or update custom properties for individual users or entire groups of users using natural language commands.

**Is this good for identifying anonymous users?**
Yes, the identify_user tool lets you link anonymous sessions to specific identities, which helps consolidate your user journey data.

**How do I find my Heap App ID and API Key?**
Log in to Heap, go to **Account > Projects**, and select your project. Your **App ID** will be visible there. For the **API Key**, navigate to the API section in your project settings to generate a server-side key.

**Can I track events server-side through this integration?**
Yes! Use the `track_event` tool. You provide the user identity, event name, and optional properties. This is perfect for capturing actions that happen outside the client browser.

**How do I update user properties in bulk?**
Use the `bulk_add_user_properties` tool. You must provide a JSON array containing objects with `identity` and `properties` for each user you wish to update.

**Is the data deletion tool permanent?**
Yes. The `delete_user_data` tool triggers a permanent deletion of the user identity and all historical data from Heap, helping you comply with GDPR and CCPA requests.