# Keen MCP for AI Agents AI Agent Connect

> Keen MCP lets you connect your Keen.io project to your AI client to automate data collection and run complex analytics queries using natural language. Instead of jumping between dashboards and writing manual filters, you can just ask your agent to pull metrics, record events, or check your project status. It handles the heavy lifting of event streaming and data aggregation so you can focus on finding the insights that actually matter for your product.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_EmKj2WUExWJ6m1N7u6wrgOcjAX3XgobRZ64OQACk/ai-agent-connect
- **Tags:** event-streaming, data-aggregation, analytics-api, real-time-data, business-intelligence

## Description

This Keen MCP connects your Keen.io project to any AI client so you can handle your data analysis without leaving your workspace. You can tell your agent to record new events, run aggregation queries, or pull unique values for specific properties just by describing what you need in plain English. It takes the friction out of the usual cycle of checking dashboards and manually filtering results. Whether you're trying to figure out how many users hit a specific milestone or you need to see the distribution of a new feature's price points, the agent does the querying for you. It's a huge time saver for anyone who spends a lot of time digging into event logs or trying to verify if a new tracking implementation is actually working. You can find this and thousands of other tools in the Vinkius catalog, which makes it easy to plug into your existing workflow. You just provide your Project ID and Master Key, and your agent takes over the data heavy lifting.

## Tools

### average_property
Calculates the average of a specific property. Use this to find mean values for prices or scores.

### list_collections
Lists all event collections. This helps you see what data you currently have available.

### count_events
Counts total events in a collection. It's the fastest way to get volume metrics.

### count_unique
Counts unique values for a property. Use this to see how many distinct users or items are involved.

### list_datasets
Lists cached datasets. Use this to see what pre-computed data is ready to go.

### get_project_details
Gets project configuration and details. Use this to check your current project setup.

### record_event
Records a single event to a collection. Use this to send new data points to your Keen project instantly.

### list_saved_queries
Lists all saved queries. This lets your agent know which custom reports you already have.

### select_unique
Lists all unique values for a property. Use this to see the variety of values in a field.

### sum_property
Sums numeric values of a property. This is perfect for calculating total revenue or points.

## Prompt Examples

**Prompt:** 
```
How many 'purchase' events happened in the last hour?
```

**Response:** 
```
I've run the query for you. There were 42 'purchase' events recorded in the last hour.

**Summary Table:**
| Event Type | Count |
| :--- | :--- |
| purchase | 42 |

Let me know if you'd like to see the average price for those purchases.
```

**Prompt:** 
```
Send a 'login_success' event for user_77.
```

**Response:** 
```
I've recorded the 'login_success' event for user_77. It's now available in your Keen project collections for analysis.
```

**Prompt:** 
```
What are the different regions users are coming from?
```

**Response:** 
```
I've pulled the unique values for the region property. Here are the regions we're seeing:

* US
* EU
* APAC
* LATAM

Would you like me to count how many users are in each of these regions?
```

## Capabilities

### Record custom events
Send new event data to your project collections instantly via your AI client.

### Run aggregation queries
Get sums, averages, and counts on your event data using natural language.

### List collections and datasets
See all your available event collections and cached datasets in one place.

### Extract unique property values
Identify unique values for specific properties to see how your data is distributed.

### Fetch project metadata
Get configuration details and project status for your Keen.io account.

## Use Cases

### Verifying new tracking implementations
A developer wants to know if their new Sign Up button is actually sending data. They ask the agent to record a test event and then use `count_events` to confirm it hit the collection.

### Calculating average order values
A product manager needs to know the average order value for a specific region. They ask the agent to run `average_property` on the purchase collection.

### Discovering unique user categories
A data analyst needs to see all the unique categories users are selecting. They ask the agent to use `select_unique` on the category property.

### Checking project configuration
An engineer needs to check if their Keen project is configured correctly. They ask the agent to pull the project metadata using `get_project_details`.

## Benefits

- Get instant answers to product questions by using `count_events` to check volume without opening a browser.
- Verify your tracking code works immediately by using `record_event` to send test data and check the project status.
- Save time on data exploration by using `list_collections` and `list_datasets` to see your full data landscape.
- Analyze property distributions quickly with `select_unique` and `count_unique` to see how different users behave.
- Run complex math on your data with `sum_property` and `average_property` to get totals for revenue or engagement.

## How It Works

The bottom line is it turns your Keen.io account into a queryable data source for your AI agent.

1. Subscribe to the Keen MCP on Vinkius.
2. Provide your Keen Project ID and Master Key in your client settings.
3. Ask your agent to record events or query your analytics data.

## Frequently Asked Questions

**Can the Keen MCP help me see my analytics without a dashboard?**
Yes, it allows your AI agent to pull metrics like counts, sums, and averages directly. You can ask questions about your data in plain English and get the numbers immediately without logging into a web interface.

**How do I use the Keen MCP to send new data to my project?**
You can tell your AI client to record an event. It will use the Connector to send that data point to your Keen.io project so you can see it in your analytics.

**Can my AI client run math on my Keen.io events?**
Yes, it can calculate averages and sums for specific properties. Just ask your agent to find the average price or total volume for a specific event collection.

**How does the Keen MCP help with tracking verification?**
It lets you quickly check if your tracking code is working. You can ask your agent to send a test event and then immediately verify that it appeared in your project.

**Can I see all my saved Keen.io queries with this Connector?**
Yes, your agent can list all your saved queries. This helps it understand which custom reports you already have so it can provide more relevant information.

**Can I record a single event using this agent?**
Yes, the `record_event` tool allows you to send a JSON object representing your event directly to any named collection.

**How do I calculate the average value of a property?**
Use the `average_property` tool by specifying the collection name and the numeric target property you want to average.

**Is it possible to see my project's collections?**
Absolutely. The `list_collections` tool retrieves a list of all event types (collections) currently stored in your Keen project.