Get the FREE Ultimate OpenClaw Setup Guide →

mcp-kql

Kusto and Log Analytics MCP server help you execute a KQL (Kusto Query Language) query within an AI prompt, analyze, and visualize the data.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio 4r9un-mcp-kql-server python -m mcp_kql_server

How to use

The MCP KQL Server provides an AI-assisted bridge between natural language queries and Azure Data Explorer (KQL). It accepts plain-English questions and converts them into optimized KQL queries using schema discovery, AI-powered caching, and live schema validation. With features like execute_kql_query and schema_memory, you can generate, validate, and run KQL against your clusters, retrieve results in JSON, CSV, or tabular formats, and obtain context-aware results and visualizations. The server also supports on-demand schema discovery to keep its memory in sync with your data sources, improving accuracy over time.

How to install

Prerequisites:

  • Python 3.10 or higher
  • Access to an Azure Data Explorer cluster (for live query execution)
  • Python package manager (pip)

One-command installation (recommended):

pip install mcp-kql-server

From source (optional):

git clone https://github.com/4R9UN/mcp-kql-server.git && cd mcp-kql-server
pip install -e .

Usage (example):

# Run the MCP server (as a background or foreground process depending on your setup)
python -m mcp_kql_server

Notes:

  • The server automatically sets up memory directories and sane defaults for production use.
  • No additional environment variables are strictly required, but you can configure Azure connections and PyPI behaviors via standard Python environment variables if needed.

Additional notes

Tips and tips:

  • Ensure your Python environment has network access to PyPI and your Azure Data Explorer cluster.
  • If you encounter authentication or connectivity issues, verify Azure CLI login and cluster accessibility.
  • The server uses on-demand schema discovery to cache table schemas; this improves query accuracy over time.
  • Check RELEASE_NOTES.md for details on v2.1.0 improvements like schema-only NL2KQL and auto-update detection.
  • For debugging, run with verbose logs or adjust logging level in your environment to capture execution traces.

Related MCP Servers

Sponsor this space

Reach thousands of developers