Azure Data Explorer

by pab1it0

28 stars
399 downloads
Not rated
GitHub

About

Integrates with Azure Data Explorer to enable executing KQL queries, discovering database resources, exploring table schemas, and sampling data for data analysis and insights generation.

Details

Author
pab1it0
Repository
pab1it0/adx-mcp-server
GitHub stars
28
Downloads
399
License
MIT License
Categories
Database, Other, Productivity, Developer Tools, Design, AI, Search, Frontend, Cloud Service
Tags
#analytics

- Execute arbitrary KQL queries and receive structured JSON results.
- Discover tables, view schemas, sample data, and get table statistics.
- Supports DefaultAzureCredential and Azure Workload Identity authentication.
- Configurable transports: stdio, HTTP, and Server-Sent Events (SSE).
- Docker images and Dev Container support for easy deployment.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Azure Data Explorer
    Command (node, npx, python, etc.) uv
    Arguments
    • Argument 1 --directory
    • Argument 2 <full path to adx-mcp-server directory>
    • Argument 3 run
    • Argument 4 src/adx_mcp_server/main.py
    Environment
    • ADX_DATABASE your_database
    • ADX_CLUSTER_URL https://yourcluster.region.kusto.windows.net

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Authentication

- DefaultAzureCredential - Supports Azure CLI, Managed Identity, and more
- Workload Identity - Native support for AKS workload identity
- Flexible credentials - Works with multiple Azure authentication methods

Deployment Options

- Multiple transports - stdio (default), HTTP, and Server-Sent Events (SSE)
- Docker support - Production-ready container images with security best practices
- Dev Container - Seamless development experience with GitHub Codespaces

The list of tools is configurable, so you can choose which tools you want to make available to the MCP client. This is useful if you don't use certain functionality or if you don't want to take up too much of the context window.

Required Azure Data Explorer Configuration

ADX_CLUSTER_URL=https://yourcluster.region.kusto.windows.net
ADX_DATABASE=your_database

Optional Custom Mcp Server Configuration

ADX_MCP_SERVER_TRANSPORT=stdio # Choose between http/sse/stdio, default = stdio

Docker Usage

This project includes Docker support for easy deployment and isolation.

Running With Docker

You can run the server using Docker in several ways:

Running With Docker In Claude Desktop

To use the containerized server with Claude Desktop, update the configuration to use Docker with the environment variables:

{
  "mcpServers": {
    "adx": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e", "ADX_CLUSTER_URL",
        "-e", "ADX_DATABASE",
        "-e", "AZURE_TENANT_ID",
        "-e", "AZURE_CLIENT_ID",
        "-e", "ADX_TOKEN_FILE_PATH",
        "adx-mcp-server"
      ],
      "env": {
        "ADX_CLUSTER_URL": "https://yourcluster.region.kusto.windows.net",
        "ADX_DATABASE": "your_database",
        "AZURE_TENANT_ID": "your_tenant_id",
        "AZURE_CLIENT_ID": "your_client_id",
        "ADX_TOKEN_FILE_PATH": "/var/run/secrets/azure/tokens/azure-identity-token"
      }
    }
  }
}

This configuration passes the environment variables from Claude Desktop to the Docker container by using the -e flag with just the variable name, and providing the actual values in the env object.

Install Development Dependencies

uv pip install -e ".[dev]"

Required Environment Variables

| Variable | Description | Example |
|----------|-------------|---------|
| ADX_CLUSTER_URL | Azure Data Explorer cluster URL | https://yourcluster.region.kusto.windows.net |
| ADX_DATABASE | Database name to connect to | your_database |

Mcp Server Configuration

| Variable | Description | Default |
|----------|-------------|---------|
| ADX_MCP_SERVER_TRANSPORT | Transport mode: stdio, http, or sse | stdio |
| ADX_MCP_BIND_HOST | Host to bind to (HTTP/SSE only) | 127.0.0.1 |
| ADX_MCP_BIND_PORT | Port to bind to (HTTP/SSE only) | 8080 |

execute_query

Execute a KQL query against Azure Data Explorer. Parameters: query (string) - KQL query to execute.

list_tables

List all tables in the configured database. Parameters: None.

get_table_schema

Get the schema for a specific table. Parameters: table_name (string) - Name of the table.

sample_table_data

Get sample data from a table. Parameters: table_name (string), sample_size (int, default: 10).

get_table_details

Get table statistics and metadata. Parameters: table_name (string) - Name of the table.

| Tool | Category | Description | Parameters |
|------|----------|-------------|------------|
| execute_query | Query | Execute a KQL query against Azure Data Explorer | query (string) - KQL query to execute |
| list_tables | Discovery | List all tables in the configured database | None |
| get_table_schema | Discovery | Get the schema for a specific table | table_name (string) - Name of the table |
| sample_table_data | Discovery | Get sample data from a table | table_name (string), sample_size (int, default: 10) |
| get_table_details | Discovery | Get table statistics and metadata | table_name (string) - Name of the table |

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "azure data explorer": {
            "env": {
                "ADX_DATABASE": "your_database",
                "ADX_CLUSTER_URL": "https://yourcluster.region.kusto.windows.net"
            },
            "args": [
                "--directory",
                "<full path to adx-mcp-server directory>",
                "run",
                "src/adx_mcp_server/main.py"
            ],
            "command": "uv"
        }
    }
}

Linux

{
    "env": {
        "ADX_DATABASE": "your_database",
        "ADX_CLUSTER_URL": "https://yourcluster.region.kusto.windows.net"
    },
    "args": [
        "--directory",
        "<full path to adx-mcp-server directory>",
        "run",
        "src/adx_mcp_server/main.py"
    ],
    "command": "uv"
}

Macos

{
    "env": {
        "ADX_DATABASE": "your_database",
        "ADX_CLUSTER_URL": "https://yourcluster.region.kusto.windows.net"
    },
    "args": [
        "--directory",
        "<full path to adx-mcp-server directory>",
        "run",
        "src/adx_mcp_server/main.py"
    ],
    "command": "uv"
}

Windows

{
    "env": {
        "ADX_DATABASE": "your_database",
        "ADX_CLUSTER_URL": "https://yourcluster.region.kusto.windows.net"
    },
    "args": [
        "--directory",
        "<full path to adx-mcp-server directory>",
        "run",
        "src/adx_mcp_server/main.py"
    ],
    "command": "uv"
}

Azure Data Explorer MCP Server

<a href="https://glama.ai/mcp/servers/1yysyd147h">

</a>

CI
codecov
License: MIT
Python 3.12

A [Model Context Protocol][mcp] (MCP) server that enables AI assistants to execute KQL queries and explore Azure Data Explorer (ADX/Kusto) databases through standardized interfaces.

This server provides seamless access to Azure Data Explorer and Eventhouse (in Microsoft Fabric) clusters, allowing AI assistants to query and analyze your data using the powerful Kusto Query Language.

[mcp]: https://modelcontextprotocol.io

Features

Query Execution

- Execute KQL queries - Run arbitrary KQL queries against your ADX database - Structured results - Get results formatted as JSON for easy consumption

Database Discovery

- List tables - Discover all tables in your database - View schemas - Inspect table schemas and column types - Sample data - Preview table contents with configurable sample sizes - Table statistics - Get detailed metadata including row counts and storage size

Authentication

- DefaultAzureCredential - Supports Azure CLI, Managed Identity, and more - Workload Identity - Native support for AKS workload identity - Flexible credentials - Works with multiple Azure authentication methods

Deployment Options

- Multiple transports - stdio (default), HTTP, and Server-Sent Events (SSE) - Docker support - Production-ready container images with security best practices - Dev Container - Seamless development experience with GitHub Codespaces

The list of tools is configurable, so you can choose which tools you want to make available to the MCP client. This is useful if you don't use certain functionality or if you don't want to take up too much of the context window.

Usage

1. Login to your Azure account which has the permission to the ADX cluster using Azure CLI.

2. Configure the environment variables for your ADX cluster, either through a .env file or system environment variables:

```env

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.