# Keen.io — how to use (mcp.ai)

Connect your Keen.io account and use 6 tools for analytics straight from your AI agent. Connect with your own API key. Keen.io is an embedded analytics API that enables developers to collect, analyze, and visualize event data seamlessly.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_keen_io?ms=1787291400000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `keen_io_inspect_all_event_collections`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/keen_io`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/keen_io/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/keen_io/inspect/all/event/collections` — Retrieve schema information for all event collections in a Keen.io project. Use this tool to: - List all event collection names in a project - Discover the schema (property names and types) for each c
  - body: { include_schema?: boolean }
- `POST https://api.mcp.ai/api/keen_io/inspect/collection/property` — Tool to return details for a specific property in an event collection. Use when you need to inspect a property's inferred type and resource URL.
  - body: { property_name: string, event_collection: string }
- `POST https://api.mcp.ai/api/keen_io/inspect/single/event/collection` — Retrieve schema information for a single Keen.io event collection. Returns the inferred property types for all fields in the specified collection, useful for understanding data structure before runnin
  - body: { event_collection: string }
- `POST https://api.mcp.ai/api/keen_io/list/cached/datasets` — List all cached dataset definitions for a Keen.io project. Returns paginated results of pre-computed dataset definitions including their query configuration, status, and timing information. Use limit 
  - body: { limit?: integer, after_name?: string }
- `POST https://api.mcp.ai/api/keen_io/select/unique` — Tool to return unique values for a target property. Use when distinct property values are required for matching events with optional filters and timeframe constraints.
  - body: { filters?: object[], group_by?: string|string[]|object, interval?: string, timezone?: integer|string, timeframe: string|object, target_property: string, event_collection: string, include_metadata?: boolean }
- `POST https://api.mcp.ai/api/keen_io/unrevoke/access/key` — Reactivate a previously revoked Keen.io access key. Use this tool when you need to restore access for a key that was previously revoked but not deleted. A revoked key has its 'active' flag set to fals
  - body: { key: string }

## Example prompts
- "What can I do in Keen.io?"
- "Show me a summary of my Keen.io account"

## More
- Page: https://mcp.ai/keen_io
- Agent spec (llms.txt): https://mcp.ai/keen_io/llms.txt
- Postman collection: https://mcp.ai/keen_io/postman.json
