Skip to content

MCP server (AI agents)

@uptimizr/mcp is a read-only Model Context Protocol server over your collector’s query API. It lets an AI agent answer natural-language questions about your 3D analytics (“what was the most-clicked mesh this week?”) by querying your own collector — nothing is sent to any third party.

It’s a thin wrapper: each tool maps one-to-one to a documented query endpoint and performs GET requests only. There are no ingestion, mutation, or raw per-session event tools.

Terminal window
UPTIMIZR_COLLECTOR_URL="https://collect.example.com" \
UPTIMIZR_API_KEY="utk_…" \
npx @uptimizr/mcp
Environment variableRequiredNotes
UPTIMIZR_COLLECTOR_URLyesBase URL of your collector.
UPTIMIZR_API_KEYyesYour project API key (x-api-key), read-only use.

Most MCP clients (Claude Desktop, VS Code, etc.) launch the server over stdio:

{
"mcpServers": {
"uptimizr": {
"command": "npx",
"args": ["-y", "@uptimizr/mcp"],
"env": {
"UPTIMIZR_COLLECTOR_URL": "https://collect.example.com",
"UPTIMIZR_API_KEY": "utk_…",
},
},
},
}

All tools accept an optional time range (since / until, epoch ms) and the filters the underlying endpoint supports (scene, session, source, bins, cellSize, limit, …).

ToolEndpointReturns
list_sessions/api/v1/sessionsRecent sessions.
pointer_heatmap/api/v1/heatmaps/pointer2D pointer heatmap bins.
world_heatmap/api/v1/heatmaps/world3D world-space pointer voxels.
camera_heatmap/api/v1/heatmaps/cameraView-direction (spherical) bins.
click_rays/api/v1/heatmaps/click-raysView-gated click rays.
flow_links/api/v1/heatmaps/flowGaze→mesh flow links.
top_meshes/api/v1/meshes/topMost-interacted meshes.
perf_summary/api/v1/perfFPS summary (avg/min/p50).
list_scenes/api/v1/scenesActive scenes.
timeseries/api/v1/timeseriesEvent-volume buckets over time.
event_counts/api/v1/event-countsPer-event-type counts.
session_meta/api/v1/sessions/:id/metaCoarse session descriptor.
scene_representation/api/v1/scenes/:id/representationRegistered proxy geometry, if any.

The package also exports its building blocks for embedding in your own server:

import { createCollectorClient, createMcpServer, readMcpConfig } from "@uptimizr/mcp";