Skip to main content
Glama
Analytics MCP Server

Analytics MCP Server

by piyusht007

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ANALYTICS_MCP_CATALOGNoPoints at your own KPI catalog.
ANALYTICS_MCP_DATA_DIRNoPoints the server at the data directory (equivalent to the --data-dir command-line option).

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Contact-center analytics over a governed KPI catalog. You cannot run SQL; use the tools. Workflow for "why did X change?": list_kpis -> compare_periods -> explain_change -> query_kpi with filters on the top driver (and check the KPI's related_kpis) -> answer, citing numbers. Periods: 'YYYY-MM' (month), 'YYYY-MM-DD/YYYY-MM-DD', or a single day. Ratio KPIs are fractions (0.05 = 5%). Contributions in explain_change are per dimension and sum to the total change within each dimension (not across dimensions).

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_kpisA

List every KPI in the catalog with unit, good direction, dimensions and the date range the data covers. Call this first.

describe_kpiB

Full definition of one KPI: business description, SQL numerator/denominator, grain, allowed dimensions and time grains, synonyms and related KPIs.

query_kpiA

Compute a KPI for an inclusive date range (YYYY-MM-DD), optionally grouped by catalog dimensions and/or a time grain ('day', 'week', 'month') and filtered by dimension values, e.g. filters={"queue": ["billing"]}. Returns rows plus the generated SQL for transparency.

compare_periodsA

Compare a KPI between a baseline period_a and a comparison period_b. Periods are 'YYYY-MM', 'YYYY-MM-DD/YYYY-MM-DD' or a single day. Says whether the change is an improvement given the KPI's good direction.

explain_changeA

Explain why a KPI changed between period_a and period_b. Runs a contribution (shift-share) analysis for each dimension, splitting every segment's contribution into a rate effect (the segment got better/worse) and a mix effect (its share of volume shifted). Returns ranked top_drivers, per-dimension breakdowns and a narrative.

Prompts

Interactive templates invoked by user choice

NameDescription
explain_metric_changePrompt template: investigate why a KPI moved between two periods.

Resources

Contextual data attached and managed by the client

NameDescription
kpi-catalogThe governed KPI catalog (YAML): definitions, SQL, dimensions.

TDQS

A3.9/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct role in the KPI workflow: discovery (list_kpis), definition (describe_kpi), computation (query_kpi), period comparison (compare_periods), and causal explanation (explain_change). The descriptions explicitly differentiate compare_periods from explain_change, and query_kpi is clearly the raw data tool.

Naming Consistency5/5

All tool names follow a consistent verb_noun snake_case pattern: list_kpis, describe_kpi, query_kpi, compare_periods, explain_change. The convention is predictable and readable throughout.

Tool Count5/5

Five tools is well-scoped for an analytics KPI server, covering discovery, definition, querying, comparison, and explanation without redundancy. Each tool earns its place in the workflow.

Completeness4/5

The surface covers the core KPI lifecycle: catalog listing, definitions, computation, period comparison, and change explanation. Minor gaps exist, such as no dedicated tool to list all dimensions across KPIs or export results, but agents can work around these via list_kpis and describe_kpi.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues