Labsco
MCP SERVER

Kusto MCP Server

by johnib

Ask an Azure Data Explorer cluster a question in English — it connects with your Azure CLI login, reads the schema, runs the KQL, and trims the answer to fit the context window.

Relational SQL DatabasesVerified
Summary
Plain-English questions against ADX, with the answer sized to fit.

The result handling is what you notice: execute-query stops at 20 rows unless told otherwise, and the whole response is then squeezed into a character budget by dropping rows instead of truncating them, so what arrives is still valid, parseable data with a note that more exists. Decide two settings before auto-approving the query tool — write and management commands are allowed by default, and telemetry is always on unless you point it at your own OTLP collector.

What it is

A KQL client for Azure Data Explorer. Point it at a cluster URL and database and it lists tables and functions, shows their schemas, and runs queries — sizing every response so a wide result set does not swamp the conversation.

What you get
  • A connection to any ADX cluster URL and database, authenticated as the identity already logged in through the Azure CLI
  • Tables and functions in the current database listed, with column schemas, and a function's own code and parameters
  • KQL queries run with results capped at 20 rows by default and a limit parameter when you need more, plus a flag on the response when the results are partial
  • Results as JSON or as markdown tables, with KUSTO_MARKDOWN_MAX_CELL_LENGTH keeping one long text column from blowing the table wide
  • A character budget for the whole response — KUSTO_MAX_RESPONSE_LENGTH, default 12000 — met by returning fewer whole rows rather than cutting data mid-value, never dropping below KUSTO_MIN_RESPONSE_ROWS
  • A read-only mode: with KUSTO_ALLOW_WRITE_OPERATIONS=false only plain KQL and .show commands run, and .ingest, .drop, .create, .alter and the rest are rejected
  • A pre-filled GitHub issue link from report-issue, which needs no GitHub token and no live Kusto connection — so it still works when the connection is what broke
Requirements

The Azure CLI on the machine and a live az login session — queries run as that identity, so cluster access follows your own Azure permissions. It starts over stdio as npx -y kusto-mcp@latest. KUSTO_AUTH_METHOD selects azure-cli or azure-identity; KUSTO_QUERY_TIMEOUT (default 60000 ms) and KUSTO_CONNECTION_TIMEOUT (default 20000 ms) bound the calls; KUSTO_RESPONSE_FORMAT switches between json and markdown. Write and management commands are permitted unless KUSTO_ALLOW_WRITE_OPERATIONS=false. Anonymous usage telemetry is always on and carries no cluster, database, table or function names, no query text and no results; OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS route it to your own OTLP pipeline. MIT.

Setup effort

One command — npx -y kusto-mcp@latest