Yucheng-Ren/KustoAgentMCP
If you are the rightful owner of KustoAgentMCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Kusto MCP Server is a .NET 9 Model Context Protocol server that provides HTTP endpoints for Azure Data Explorer operations using JSON-RPC 2.0.
Kusto MCP Server
A .NET 9 Model Context Protocol (MCP) server that exposes Azure Data Explorer (Kusto) operations as HTTP endpoints speaking JSON-RPC 2.0. The server listens on a configurable loopback address and can be attached to any MCP-compatible client that understands HTTP transports.
Features
- HTTP transport with JSON-RPC 2.0 request/response semantics, including initialize/ping/shutdown.
- Kusto-aware tooling for queries and workflow error analysis.
- Structured results surfaced through the MCP
structuredContentchannel plus human-readable text summaries. - Azure-ready authentication via Managed Identity, Service Principal, Device Code, Interactive browser, or Azure CLI.
- Production hardening inherited from the original agent: retry logic, logging, configurable timeouts, and health-check endpoint.
- MCP Prompts for guided multi-step workflows like Power Flow error analysis.
Supported tools
| Tool name | Description | Required arguments |
|---|---|---|
kusto_execute_query | Execute an arbitrary KQL query. Returns result rows and timing metrics. | query |
kusto_workflow_errors_template | Runs the predefined workflow error analysis template. | actionName, environmentId |
kusto_powerflow_daily_error | Analyze Power Flow errors from the last 24 hours. | (none) |
kusto_is_customization | Check if an object is a customization. | objectName |
The JSON schemas for inputs/outputs are advertised through tools/list so MCP clients can render forms and validate payloads automatically.
Supported prompts
| Prompt name | Description |
|---|---|
powerflow_error_analysis | Multi-step workflow to analyze Power Flow errors: runs daily error check, queries detailed errors for each failure, and identifies root causes. |
Quick start
-
Restore & build
dotnet restore dotnet build -
Configure credentials Edit
appsettings.json(or set equivalent environment variables) with your cluster information:{ "KustoSettings": { "ClusterUri": "https://<cluster>.<region>.kusto.windows.net/", "DefaultDatabase": "YourDatabase", "AuthenticationMethod": "ManagedIdentity" }, "ManagedIdentity": { "ClientId": "<optional-user-assigned-client-id>" }, "ServicePrincipal": { "TenantId": "<tenant>", "ClientId": "<app-id>", "ClientSecret": "<secret>" }, "McpServer": { "UrlPrefix": "http://127.0.0.1:8080/", "EnableCors": false } } -
Run the MCP server
dotnet runThe process listens for HTTP requests (default
http://127.0.0.1:8080/) and exposes a health probe at/healthz. -
Call the server
-
OpenAI Desktop / MCP: configure an HTTP transport pointing to the server URL.
-
cURL / custom tooling:
curl -s http://127.0.0.1:8080/ \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"1.0","capabilities":{},"clientInfo":{"name":"demo","version":"1.0"}}}' -
Python (
mcppackage):mcp client http --url http://127.0.0.1:8080/
-
Configuration reference
Configuration is provided through appsettings.json, environment variables, or any IConfiguration provider supported by the .NET host.
KustoSettings.ClusterUri— required cluster URI.KustoSettings.DefaultDatabase— fallback database when tool input omits one.KustoSettings.AuthenticationMethod—Interactive,ManagedIdentity,ServicePrincipal,DeviceCode, orAzureCli.KustoSettings.EnableRetryLogic,MaxRetryAttempts,RetryDelaySeconds— control retry behaviour.ManagedIdentity.ClientId— optional user-assigned identity.ServicePrincipal.TenantId,ClientId,ClientSecret— required for service principal auth.McpServer.UrlPrefix— HTTP listener prefix (must end with/), defaults tohttp://127.0.0.1:8080/.McpServer.EnableCors/AllowedOrigins— enable and customise permissive CORS headers for browser-based clients.McpServer.HealthcheckPath— path of the health probe (default/healthz).
Logging defaults to Information level and can be overridden via the standard Logging:LogLevel:Default configuration key.
Structured responses
Clients can use the structured payload for programmatic flows while displaying the text snippets for humans.