mcp-kql-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., "@mcp-kql-serverShow me the top 10 CPU usage events from the last hour"
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.
π MCP KQL Server
A Model Context Protocol (MCP) server for executing Kusto Query Language (KQL) queries against Azure Data Explorer clusters. Seamlessly integrates with Claude Desktop and Visual Studio Code (VS Code). Supports Azure CLI authentication and provides a convenient kql_execute tool for execute KQL queries directly within your AI prompts, complete with optional visualizations.

β¨ Features
π Execute KQL Queries: Run KQL queries directly within your AI prompts using the
kql_executeMCP tool.β‘ Plug-and-Play Simplicity: No manual tenant ID configuration or complex credential management. Simply authenticate via Azure CLI (
az login) and start querying immediately.π€ Seamless Claude Integration: Execute KQL queries within Claude Desktop without switching interfaces or dashboards.
π Secure and Efficient: Leverages Azure CLIβs robust authentication, ensuring secure credential handling and optimized query performance.
π Visualization Ready: Optional Markdown table outputs make data analysis intuitive and engaging.
π Azure CLI Authentication: Built-in Azure CLI authentication with retry and caching logic.
π‘ Protocol Compatibility: Fully compatible with MCP protocol version
2024-11-05.π οΈ Reliable Implementation: Uses
fastmcpfor a robust and reliable MCP server implementation.
π Comparison with Other Tools
Feature | MCP KQL Server | Azure Data Explorer MCP | Standalone Scripts |
Claude Integration | β | β | β |
Plug-and-Play Authentication | β (Azure CLI) | β (Manual setup) | β (Custom code) |
No Tenant ID Required | β | β | β |
Data Visualization | β | β | β |
Open-Source | β | β | Varies |
Related MCP server: Kusto MCP Server
π Requirements
Python 3.10 or higher
Azure Data Explorer cluster access
Azure CLI installed and authenticated (
az login)Node.js (optional, for Claude Desktop filesystem server)
VS Code with Claude extension or MCP client (for VS Code integration)
π Project Structure
mcp-kql-server/
βββ mcp_kql_server/
β βββ __init__.py
β βββ mcp_server.py
β βββ kql_auth.py
β βββ execute_kql.py
βββ pyproject.toml
βββ README.mdποΈ Setup Instructions
1οΈβ£ Clone the Repository
git clone https://github.com/4R9UN/mcp-kql-server.git
cd mcp-kql-server2οΈβ£ Install Python 3.10+
Windows:
winget install Python.Python.3.10macOS:
brew install python@3.10Linux:
sudo apt-get install python3.10
Verify installation:
python --version3οΈβ£ Install Azure CLI
Follow official instructions: Install Azure CLI
Log in to Azure:
az config set core.login_experience_v2=off az login
4οΈβ£ Create and Activate Virtual Environment
python -m venv .venvActivate environment:
Windows:
.venv\Scripts\activatemacOS/Linux:
source .venv/bin/activate
5οΈβ£ Install Dependencies
pip install .π₯οΈ Setup for Claude Desktop
Copy
claude_desktop_config.jsonto Claude's configuration directory:Windows:
C:\Users\YourUser\AppData\Roaming\Claude\macOS:
/Users/YourUser/Library/Application Support/Claude/Linux: Currently not supported by Claude Desktop.
Update the configuration file with your Python path and project directory:
{
"mcpServers": {
"mcp-kql-server": {
"command": "C:\\Users\\YourUser\\mcp-kql-server\\.venv\\Scripts\\python.exe",
"args": [
"-m",
"mcp_kql_server.mcp_server"
]
}
}
}Optional: Install Node.js for filesystem server support (Node.js).
Restart Claude Desktop.
π±οΈ Setup for VS Code
Install VS Code.
Install the
Copilot MCPclient extension.Modify the MCP
settings.jsonwith the following configuration:
{
"mcpServers": {
"mcp-kql-server": {
"command": "C:\\Users\\YourUser\\mcp-kql-server\\.venv\\Scripts\\python.exe",
"args": [
"-m",
"mcp_kql_server.mcp_server"
],
"env": {
"PYTHONPATH": "C:\\Users\\YourUser\\Downloads\\mcp-kql-server",
"PYTHONUNBUFFERED": "1",
"AZURE_CORE_ONLY_SHOW_ERRORS": "true"
}
}
}
}Run the
MCP: List Serverscommand in VS Codeβs Command Palette to verify setup.Enable autodiscovery if using Claude Desktopβs configuration.
β Test the Server
Claude Desktop:
Open Claude Desktop and provide the following prompt:
Use a tool to execute the attached KQL query, visualize the results, and provide high-level insights from the query output. KQL query: "cluster('mycluster').database('mydb').MyTable | take 10"
π€ Contributing
Fork the repository.
Create a feature branch:
git checkout -b feature/YourFeatureCommit your changes:
git commit -m "Add YourFeature"Push to your branch:
git push origin feature/YourFeatureOpen a Pull Request.
π¬ Contact
For issues or questions, please open a ticket on GitHub or contact the maintainer at arjuntrivedi42@yahoo.com.
π Happy Querying!
This server cannot be deployed
Maintenance
Related MCP Connectors
Official Microsoft MCP Server to query Microsoft Entra data using natural language
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that provides access to Azure Data Explorer (ADX) clusters, allowing users to list tables, execute queries, and retrieve schema information.71MIT
- AlicenseAqualityDmaintenanceAn MCP (Model Context Protocol) server that provides tools for interacting with Azure Data Explorer (Kusto) clusters.108 npmMIT
- FlicenseNot gradedqualityDmaintenanceMCP server that integrates with Microsoft Dynamics 365 Business Central, enabling querying of customers, items, and sales orders through natural language commands in Claude Desktop.10-
- FlicenseNot gradedqualityCmaintenanceMCP server that exposes SQL Server databases to Claude, allowing natural language queries with tools to list tables, describe schemas, and run read-only SELECT statements.-