Integrated code coverage reporting and analysis for maintaining code quality and test coverage metrics
Source code hosted on GitHub with CI/CD pipeline, issue tracking, and collaborative development features
Generates markdown-formatted tables and reports for data visualization and documentation
Uses Mermaid diagrams to visualize execution flows, architecture, and schema discovery processes
Distributed as a Python package through PyPI for easy installation and dependency management
Built using Python 3.10+ with support for executing KQL queries and managing Azure Data Explorer connections
Integrates various status badges for displaying build status, version information, and project metrics
Displays SVG-based badges and graphics for project status, security ratings, and framework information
Uses TOML configuration format in pyproject.toml for project metadata and build configuration
Features demo video showcasing the MCP KQL Server functionality and usage examples
MCP KQL Server
AI-Powered KQL Query Execution with Intelligent Schema Memory
A Model Context Protocol (MCP) server that provides intelligent KQL (Kusto Query Language) query execution with AI-powered schema caching and context assistance for Azure Data Explorer clusters.
🎬 Demo
Watch a quick demo of the MCP KQL Server in action:
🚀 Features
execute_kql_query
:- Natural Language to KQL: Generate KQL queries from natural language descriptions.
- Direct KQL Execution: Execute raw KQL queries.
- Multiple Output Formats: Supports JSON, CSV, and table formats.
- Live Schema Validation: Ensures query accuracy by using live schema discovery.
schema_memory
:- Schema Discovery: Discover and cache schemas for tables.
- Database Exploration: List all tables within a database.
- AI Context: Get AI-driven context for tables.
- Analysis Reports: Generate reports with visualizations.
- Cache Management: Clear or refresh the schema cache.
- Memory Statistics: Get statistics about the memory usage.
📊 MCP Tools Execution Flow
Schema Memory Discovery Flow
The kql_schema_memory
functionality is now seamlessly integrated into the kql_execute
tool. When you run a query, the server automatically discovers and caches the schema for any tables it hasn't seen before. This on-demand process ensures you always have the context you need without any manual steps.
📋 Prerequisites
- Python 3.10 or higher
- Azure CLI installed and authenticated (
az login
) - Access to Azure Data Explorer cluster(s)
🚀 One-Command Installation
Quick Install (Recommended)
From Source
Alternative Installation Methods
That's it! The server automatically:
- ✅ Sets up memory directories in
%APPDATA%\KQL_MCP
(Windows) or~/.local/share/KQL_MCP
(Linux/Mac) - ✅ Configures optimal defaults for production use
- ✅ Suppresses verbose Azure SDK logs
- ✅ No environment variables required
📱 MCP Client Configuration
Claude Desktop
Add to your Claude Desktop MCP settings file (mcp_settings.json
):
Location:
- Windows:
%APPDATA%\Claude\mcp_settings.json
- macOS:
~/Library/Application Support/Claude/mcp_settings.json
- Linux:
~/.config/Claude/mcp_settings.json
VSCode (with MCP Extension)
Add to your VSCode MCP configuration:
Settings.json location:
- Windows:
%APPDATA%\Code\User\mcp.json
- macOS:
~/Library/Application Support/Code/User/mcp.json
- Linux:
~/.config/Code/User/mcp.json
Roo-code Or Cline (VS-code Extentions)
Ask or Add to your Roo-code Or Cline MCP settings:
MCP Settings location:
- All platforms: Through Roo-code extension settings or
mcp_settings.json
Generic MCP Client
For any MCP-compatible application:
🔧 Quick Start
1. Authenticate with Azure (One-time setup)
2. Start the MCP Server (Zero configuration)
The server starts immediately with:
- 📁 Auto-created memory path:
%APPDATA%\KQL_MCP\cluster_memory
- 🔧 Optimized defaults: No configuration files needed
- 🔐 Secure setup: Uses your existing Azure CLI credentials
3. Use via MCP Client
The server provides two main tools:
kql_execute
- Execute KQL Queries with AI Context
kql_schema_memory
- Discover and Cache Cluster Schemas
💡 Usage Examples
Basic Query Execution
Ask your MCP client (like Claude):
"Execute this KQL query against the help cluster:
cluster('help.kusto.windows.net').database('Samples').StormEvents | take 10
and summarize the result and give me high level insights "
Complex Analytics Query
Ask your MCP client:
"Query the Samples database in the help cluster to show me the top 10 states by storm event count, include visualization"
Schema Discovery
Ask your MCP client:
"Discover and cache the schema for the help.kusto.windows.net cluster, then tell me what databases and tables are available"
Data Exploration with Context
Ask your MCP client:
"Using the StormEvents table in the Samples database on help cluster, show me all tornado events from 2007 with damage estimates over $1M"
Time-based Analysis
Ask your MCP client:
"Analyze storm events by month for the year 2007 in the StormEvents table, group by event type and show as a visualization"
🎯 Key Benefits
For Data Analysts
- ⚡ Faster Query Development: AI-powered autocomplete and suggestions
- 🎨 Rich Visualizations: Instant markdown tables for data exploration
- 🧠 Context Awareness: Understand your data structure without documentation
For DevOps Teams
- 🔄 Automated Schema Discovery: Keep schema information up-to-date
- 💾 Smart Caching: Reduce API calls and improve performance
- 🔐 Secure Authentication: Leverage existing Azure CLI credentials
For AI Applications
- 🤖 Intelligent Query Assistance: AI-generated table descriptions and suggestions
- 📊 Structured Data Access: Clean, typed responses for downstream processing
- 🎯 Context-Aware Responses: Rich metadata for better AI decision making
🏗️ Architecture
📁 Project Structure
🔒 Security
- Azure CLI Authentication: Leverages your existing Azure device login
- No Credential Storage: Server doesn't store authentication tokens
- Local Memory: Schema cache stored locally, not transmitted
🐛 Troubleshooting
Common Issues
- Authentication Errors
- Memory Issues
- Connection Timeouts
- Check cluster URI format
- Verify network connectivity
- Confirm Azure permissions
🤝 Contributing
We welcome contributions! Please do.
📞 Support
- Issues: GitHub Issues
- PyPI Package: PyPI Project Page
- Author: Arjun Trivedi
- Certified : MCPHub
🌟 Star History
Happy Querying! 🎉
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables intelligent KQL query execution against Azure Data Explorer clusters with AI-powered schema caching and natural language to KQL conversion. Provides automated schema discovery and context-aware query assistance for enhanced data exploration.