MCP server for Azure Data Explorer Kusto CLI - Query and manage Kusto clusters with AI assistants
npm install kusto-mcp-serverAn MCP (Model Context Protocol) server that provides tools for interacting with Azure Data Explorer (Kusto) clusters. Query, manage connections, and explore schemas using AI assistants like Claude and GitHub Copilot.
- Execute KQL queries and scripts
- Manage multiple cluster connections
- Explore database schemas
- Full Azure authentication support
- Works with Claude Desktop, Claude Code CLI, and VS Code with GitHub Copilot
- Node.js 18+
- .NET 8 Runtime
- Kusto CLI (microsoft.azure.kusto.tools NuGet package)
- Azure CLI (for authentication)
``bash`
dotnet tool install -g Microsoft.Azure.Kusto.Tools
Or via NuGet:
`bash`
nuget install microsoft.azure.kusto.tools -Version 14.0.3
`bash`
npm install -g kusto-mcp-server
`bash`
npx kusto-mcp-server
Add to your Claude Desktop configuration:
- Windows: %APPDATA%\Claude\claude_desktop_config.json~/Library/Application Support/Claude/claude_desktop_config.json
- macOS: ~/.config/claude/claude_desktop_config.json
- Linux:
`json`
{
"mcpServers": {
"kusto": {
"command": "npx",
"args": ["@yeshsurya/kusto-mcp-server"],
"env": {
"KUSTO_CLI_PATH": "~/.nuget/packages/microsoft.azure.kusto.tools/14.0.3/tools/net8.0/Kusto.Cli.dll"
}
}
}
}
`bash`
claude mcp add kusto -- npx kusto-mcp-server
Verify it's connected:
`bash`
claude mcp list
Add to your VS Code settings.json:
`json`
{
"mcp": {
"servers": {
"kusto": {
"command": "npx",
"args": ["@yeshsurya/kusto-mcp-server"],
"env": {
"KUSTO_CLI_PATH": "~/.nuget/packages/microsoft.azure.kusto.tools/14.0.3/tools/net8.0/Kusto.Cli.dll"
}
}
}
}
}
Before using the server, authenticate with Azure:
`bash`
az login
| Tool | Description |
|------|-------------|
| kusto_query | Execute KQL queries (primary tool) |kusto_execute
| | Advanced execution with full CLI options |kusto_script
| | Execute script files |
| Tool | Description |
|------|-------------|
| kusto_connection_add | Add/update a named connection |kusto_connection_list
| | List all configured connections |kusto_connection_test
| | Test connectivity |kusto_connection_remove
| | Remove a connection |kusto_connection_set_default
| | Set the default connection |
| Tool | Description |
|------|-------------|
| kusto_schema | Get database schema information |kusto_help
| | Get help and CLI options |
``
kusto_connection_add({
name: "my-cluster",
cluster: "https://mycluster.kusto.windows.net",
database: "MyDatabase",
authMethod: "azcli",
isDefault: true
})
``
kusto_query({
query: "StormEvents | summarize count() by State | top 10 by count_",
connectionName: "my-cluster"
})
``
kusto_schema({
scope: "tables",
connectionName: "my-cluster"
})
``
kusto_execute({
commands: [
".show tables",
"StormEvents | count"
],
connectionName: "my-cluster"
})
Environment variables:
| Variable | Description | Default |
|----------|-------------|---------|
| KUSTO_CLI_PATH | Path to Kusto.Cli.dll | Auto-detected |KUSTO_DEFAULT_TIMEOUT
| | Default query timeout (ms) | 60000 |KUSTO_MAX_ROWS
| | Default max rows | 10000 |
`bashClone the repository
git clone https://github.com/yeshsurya/kusto-mcp-server.git
cd kusto-mcp-server
Publishing
`bash
Dry run to verify package contents
npm publish --dry-runPublish to npm
npm publish --access public
``MIT