kairosdb-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@kairosdb-mcp-server What is the latest value of server.cpu_usage for host=web-01?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
kairosdb-mcp-server
MCP server for querying KairosDB (REST API v1) from Claude Desktop.
Available tools
Tool | Description |
| Raw or aggregated data over a relative range (e.g. last 24h) |
| Data over an absolute range (ISO 8601 dates) |
| Latest known value of a metric |
| Several aggregations (min/max/avg) in a single request |
| Lists all available metrics |
| Available values for a given tag |
| Checks the server status |
Related MCP server: osm-mcp
Installation
cd kairosdb-mcp-server
npm install
npm run buildVerify the build is OK:
node dist/index.js
# Should print: [kairosdb-mcp] Starting. KairosDB URL: http://localhost:8080
# Then: [kairosdb-mcp] Ready.
# Then wait for MCP messages (stdio)Claude Desktop configuration
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"directus": {
// ... your existing Directus config
},
"kairosdb": {
"command": "node",
"args": ["/absolute/path/to/kairosdb-mcp-server/dist/index.js"],
"env": {
"KAIROSDB_URL": "http://your-kairosdb-server:8080",
"KAIROSDB_USER": "",
"KAIROSDB_PASSWORD": ""
}
}
}
}Replace
/absolute/path/to/with the actual path on your machine. LeaveKAIROSDB_USERandKAIROSDB_PASSWORDempty if authentication isn't used.
Environment variables
Variable | Default | Description |
|
| KairosDB server URL |
| (empty) | HTTP Basic username (optional) |
| (empty) | HTTP Basic password (optional) |
Example questions in Claude Desktop
Exploration
"List all KairosDB metrics"
"What values exist for the tag 'host'?"
"Is KairosDB available?"
Real-time data
"What is the latest value of the metric
server.cpu_usagefor tag host=web-01?"
Time series
"Give me the data for
network.latencyover the last 48 hours""Show me the memory usage between 2024-01-01 and 2024-01-31"
Aggregations
"Compute the min/max/avg of
http.request_durationhourly over the last 7 days for server web-01"
Combined with Directus
"Show me all hosts in the 'Payment Service' group, then give me their latest CPU value in KairosDB"
Architecture
src/
├── index.ts # Entry point, stdio transport
├── constants.ts # URL, limits
├── types.ts # KairosDB API interfaces
├── schemas/
│ └── index.ts # Zod schemas for all tools
├── services/
│ ├── kairosdb-client.ts # KairosDB HTTP client
│ └── formatters.ts # Markdown/JSON formatting
└── tools/
├── query-tools.ts # query_range, query_absolute, last_value
└── aggregate-tools.ts # aggregate, list_metrics, list_tag_values, healthAvailable Tools
7 toolskairosdb_aggregateMultiple aggregations over a relative rangeARead-onlyIdempotent
Computes several aggregations (min, max, avg, etc.) in a single request over a relative time range.
Use cases:
"Give me the min/max/avg CPU usage on server web-01 over the last 7 days, hourly"
"Daily request latency statistics over the last 30 days"
Args:
metric_name: Exact metric name
tags: Tag filters
range_value / range_unit: Time range (default: 24 hours)
aggregators: List of functions (default: [avg, min, max])
sampling_value / sampling_unit: Computation window (default: 1 hour)
response_format: "markdown" or "json"
Returns: One series per aggregator with statistics.
Inputs: metric_name (required), tags, range_unit, aggregators, +4 more.
kairosdb_healthKairosDB server statusARead-only
Checks that the KairosDB server is reachable and operational.
Use cases:
"Is KairosDB available?"
Diagnosing a connection error
Returns: "ok" or "error" status with details.
Inputs: no named parameters.
kairosdb_last_valueLatest value of a metricARead-only
Retrieves the most recent value of a metric (equivalent to a real-time reading).
Use cases:
"What is the current CPU usage on server web-01?"
"Latest reading from the request latency metric"
Args:
metric_name: Exact metric name
tags: Tag filters to target a specific host
response_format: "markdown" or "json"
Returns: Latest known value with its timestamp.
Inputs: metric_name (required), tags, response_format.
kairosdb_list_metricsList available metricsARead-onlyIdempotent
Returns all metrics (host/service series names) stored in KairosDB.
Use cases:
"Which metrics are available for the servers?"
"List all metrics starting with 'server.'"
Args:
prefix: Optional prefix filter (e.g. "server." to filter client-side)
response_format: "markdown" or "json"
Returns: List of metric names.
Inputs: prefix, response_format.
kairosdb_list_tag_valuesAvailable values for a tagARead-onlyIdempotent
Returns all known values for a given tag name.
Use cases:
"What hosts are available?" → tag_name = "host"
"What environments exist?" → tag_name = "environment"
Args:
tag_name: Tag name (e.g. "host", "environment", "region")
response_format: "markdown" or "json"
Returns: List of values for this tag.
Inputs: tag_name (required), response_format.
kairosdb_query_absoluteQuery over an absolute time rangeARead-onlyIdempotent
Queries KairosDB over a time range defined by precise ISO 8601 dates.
Use cases:
"Server metrics between 2024-01-01 and 2024-01-31"
"Analysis of a precise incident over a timestamped window"
Args:
metric_name: Exact metric name
tags: Tag filters
start: Start (ISO 8601, e.g. 2024-01-15T00:00:00Z)
end: End (ISO 8601, default: now)
aggregator / sampling_value / sampling_unit: Optional aggregation
limit: Max points (default 1000)
response_format: "markdown" or "json"
Returns: Timestamped points with statistics.
Inputs: start (required), metric_name (required), end, tags, +5 more.
kairosdb_query_rangeQuery over a relative time rangeARead-onlyIdempotent
Queries KairosDB for a metric's data over a relative time range (e.g. the last 24 hours).
Typical use cases:
"Give me the CPU usage data for server web-01 over the last 7 days"
"Show me the memory usage from last week"
Args:
metric_name: Exact KairosDB metric name
tags: Tag filters (e.g. {"host": ["web-01"]})
range_value: Duration to look back (default: 24)
range_unit: Unit (hours/days/weeks/..., default: hours)
aggregator: Optional aggregation function (avg/min/max/sum/count)
sampling_value / sampling_unit: Window size if aggregation is enabled
limit: Max number of points (default: 1000, max: 10,000)
response_format: "markdown" (default) or "json"
Returns: Timestamped data points with statistics (min/max/avg).
Inputs: metric_name (required), tags, limit, aggregator, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
query_range/query_absolute/last_value are clearly separated by time framing, and list_metrics/list_tag_values/health serve distinct discovery and operations roles. Some overlap exists between query_range and aggregate, since both support relative ranges with aggregation, though one returns data points with optional stats and the other computes multiple aggregations.
All tools share the kairosdb_ prefix and most follow a kairosdb_<operation>_<object> pattern, e.g. query_range, query_absolute, list_metrics, list_tag_values. Minor deviations like kairosdb_aggregate and kairosdb_last_value are still predictable within the overall convention.
Seven tools is a well-scoped size for a read-only time-series database MCP server. Each tool earns its place by covering a distinct querying, discovery, or health-check need without unnecessary redundancy.
The set covers relative and absolute time-range queries, latest-value reads, aggregation, metric discovery, tag-value discovery, and health checks. Minor gaps like listing tag keys or write/delete operations are acceptable for a read-oriented query server.
Related MCP Connectors
Query, explore, and manage your databases through natural conversation.
Query OneLens cloud-cost data in natural language: breakdowns, trends, cost centers. Read-only.
Interact with the Stitch API using natural language commands.
Ask your databases questions in plain English, run read-only SQL and set up data alerts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides read-only access to Loki, Prometheus, and Tempo APIs, enabling natural language queries for logs, metrics, and traces. Supports multiple instances and authentication via bearer tokens.1MIT
- FlicenseBqualityDmaintenanceProvides read-only query tools over OpenStreetMap data in PostGIS, enabling natural language queries for features, categories, and spatial analysis.7-
- AlicenseNot gradedqualityDmaintenanceEnables querying Prometheus metrics, performing cluster diagnostics, and analyzing resource usage through natural language, with automatic Kubernetes connectivity.MIT
- FlicenseNot gradedqualityCmaintenanceEnables querying historical Home Assistant data from InfluxDB, including energy consumption, entity history, device uptime, and custom InfluxQL queries.-