adx-mcp-server

adx-mcp-server: MCP server for AI-driven KQL queries on Azure Data Explorer.

adx-mcp-server
adx-mcp-server Capabilities Showcase

adx-mcp-server Solution Overview

The adx-mcp-server is an MCP server designed to connect AI models to Azure Data Explorer (ADX), enabling them to interact with and analyze your data. It empowers AI assistants to execute KQL queries against your ADX clusters and databases through standardized MCP interfaces. Key features include the ability to discover and explore database resources, list tables, view table schemas, and extract sample data.

This server streamlines the integration of AI models with ADX, eliminating the complexities of custom API integrations. It supports token-based authentication and Docker containerization for easy deployment. By providing a configurable list of tools, it allows you to tailor the functionality exposed to the MCP client. The adx-mcp-server unlocks the power of your data within ADX, making it readily accessible to AI models for enhanced analysis and decision-making. It integrates seamlessly by configuring environment variables for your ADX cluster and adding the server configuration to your MCP client.

adx-mcp-server Key Capabilities

KQL Query Execution

The adx-mcp-server allows AI models to execute Kusto Query Language (KQL) queries against Azure Data Explorer (ADX). This functionality enables AI assistants to retrieve and analyze data stored in ADX, providing valuable insights and enabling data-driven decision-making. The server receives KQL queries from the AI model via the MCP interface, executes them against the configured ADX cluster and database, and returns the results to the AI model in a structured format. This process allows the AI model to interact with ADX data in a secure and standardized manner, without requiring direct access to the database.

For example, an AI assistant could use this feature to analyze website traffic data stored in ADX to identify trends, detect anomalies, or generate reports. The AI assistant could formulate a KQL query to retrieve the number of page views per day, execute the query using the adx-mcp-server, and then analyze the results to identify patterns in website traffic. The server uses the ADX Python SDK to connect to the ADX cluster and execute the queries.

Database Resource Discovery

The server provides capabilities for AI models to discover and explore database resources within Azure Data Explorer. This includes listing available databases, tables within those databases, and the schema of each table. This feature allows AI models to understand the structure and content of the data stored in ADX, enabling them to formulate more effective queries and extract relevant information. By providing a standardized interface for resource discovery, the adx-mcp-server simplifies the process of integrating AI models with ADX data.

For instance, an AI model could use this feature to automatically identify tables containing customer data, and then retrieve the schema of those tables to understand the available fields and data types. This information could then be used to generate personalized recommendations or identify potential fraud. The server uses the ADX Python SDK to retrieve metadata about the ADX cluster and database.

Sample Data Extraction

The adx-mcp-server enables AI models to extract sample data from tables within Azure Data Explorer. This feature allows AI models to quickly get a sense of the data stored in a table without having to retrieve the entire dataset. The sample data can be used for various purposes, such as understanding the data distribution, identifying potential data quality issues, or training machine learning models. The size of the sample can be configured to balance the need for representative data with the desire for quick retrieval.

As an example, an AI model could use this feature to extract a sample of customer reviews from a table and then use natural language processing techniques to analyze the sentiment of those reviews. This could provide valuable insights into customer satisfaction and identify areas for improvement. The server uses KQL queries with the take operator to retrieve sample data from the specified table.

Token-Based Authentication

The adx-mcp-server supports token-based authentication, allowing it to securely connect to Azure Data Explorer using Azure CLI, Managed Service Identity (MSI), or other token providers. This eliminates the need to store sensitive credentials directly in the server configuration, improving security and simplifying deployment. The server automatically acquires a token from the configured provider and uses it to authenticate with ADX. This ensures that the server always has a valid token and can access ADX resources without interruption.

This feature is particularly useful in cloud environments where MSI is commonly used to manage access to Azure resources. By supporting token-based authentication, the adx-mcp-server can be easily integrated into existing Azure deployments without requiring any changes to the security infrastructure. The server uses the Azure Identity Python library to acquire tokens from the configured provider.

Docker Containerization

The adx-mcp-server is designed to be deployed as a Docker container, making it easy to deploy and manage in various environments. Docker containerization provides several benefits, including portability, scalability, and isolation. The server can be easily deployed on any platform that supports Docker, such as Azure Kubernetes Service (AKS), Azure Container Instances (ACI), or even a local development machine. The Docker image includes all the necessary dependencies and configurations, ensuring that the server runs consistently across different environments.

For example, a team could use Docker Compose to deploy the adx-mcp-server along with other components of their AI application, such as the AI model itself and a web server. This would allow them to quickly set up a complete development environment and easily deploy the application to production. The Dockerfile for the adx-mcp-server is included in the project repository.