The Azure Data Explorer MCP Server provides a standardized Model Context Protocol interface for Azure Data Explorer/Eventhouse in Microsoft Fabric. This server enables AI assistants to execute KQL queries and explore your data through consistent, well-defined interfaces.
.env
file or system environment variables:# Required: Azure Data Explorer configuration
ADX_CLUSTER_URL=https://yourcluster.region.kusto.windows.net
ADX_DATABASE=your_database
# Optional: Azure Workload Identity credentials
# AZURE_TENANT_ID=your-tenant-id
# AZURE_CLIENT_ID=your-client-id
# ADX_TOKEN_FILE_PATH=/var/run/secrets/azure/tokens/azure-identity-token
Add the server configuration to your client configuration file. For example, for Claude Desktop:
{
"mcpServers": {
"adx": {
"command": "uv",
"args": [
"--directory",
"<full path to adx-mcp-server directory>",
"run",
"src/adx_mcp_server/main.py"
],
"env": {
"ADX_CLUSTER_URL": "https://yourcluster.region.kusto.windows.net",
"ADX_DATABASE": "your_database"
}
}
}
}
If you see
Error: spawn uv ENOENT
in Claude Desktop, you may need to specify the full path touv
or set the environment variableNO_UV=1
in the configuration.
docker build -t adx-mcp-server .
docker run -it --rm \
-e ADX_CLUSTER_URL=https://yourcluster.region.kusto.windows.net \
-e ADX_DATABASE=your_database \
-e AZURE_TENANT_ID=your_tenant_id \
-e AZURE_CLIENT_ID=your_client_id \
adx-mcp-server
Create a .env
file with your Azure Data Explorer credentials and run:
docker-compose up
For containerized server with Claude Desktop, update the configuration:
{
"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"
}
}
}
}
The server supports multiple authentication methods:
The server provides several tools that AI assistants can use:
Tool | Description |
---|---|
execute_query |
Execute a KQL query against Azure Data Explorer |
list_tables |
List all tables in the configured database |
get_table_schema |
Get the schema for a specific table |
sample_table_data |
Get sample data from a table with optional sample size |
For AKS with Azure Workload Identity:
AZURE_TENANT_ID
and AZURE_CLIENT_ID
environment variablesADX_TOKEN_FILE_PATH
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "adx" '{"command":"uv","args":["--directory","<full path to adx-mcp-server directory>","run","src/adx_mcp_server/main.py"],"env":{"ADX_CLUSTER_URL":"https://yourcluster.region.kusto.windows.net","ADX_DATABASE":"your_database"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"adx": {
"command": "uv",
"args": [
"--directory",
"<full path to adx-mcp-server directory>",
"run",
"src/adx_mcp_server/main.py"
],
"env": {
"ADX_CLUSTER_URL": "https://yourcluster.region.kusto.windows.net",
"ADX_DATABASE": "your_database"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"adx": {
"command": "uv",
"args": [
"--directory",
"<full path to adx-mcp-server directory>",
"run",
"src/adx_mcp_server/main.py"
],
"env": {
"ADX_CLUSTER_URL": "https://yourcluster.region.kusto.windows.net",
"ADX_DATABASE": "your_database"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect