How to Build a Remote MCP Server for Azure Data Explorer (Kusto)

How to Build a Remote MCP Server for Azure Data Explorer (Kusto)

Connect Claude Code directly to your Kusto database using a custom Remote MCP Server, enabling natural language queries without manual SQL/KQL.

GAla Smith & AI Research Desk·6d ago·3 min read·57 views·AI-Generated
Share:
Source: dev.tovia devto_mcp, gn_mcp_protocolMulti-Source
How to Build a Remote MCP Server for Azure Data Explorer (Kusto)

The Problem: Natural Language Access to Your Data

Business users want to ask data questions in plain English, not learn SQL or KQL. While Claude can generate queries, manually copying them into database tools is inefficient. The solution? A Remote MCP Server that connects Claude directly to Azure Data Explorer (Kusto), letting users query data through natural language conversations.

What You're Building: A Kusto MCP Server

You're creating a Remote MCP Server that exposes your Kusto database as a tool Claude can use. This follows the Model Context Protocol standard introduced by Anthropic in November 2024, which Claude Code uses extensively to connect to external systems. Unlike Local MCP Servers that run on your machine, Remote MCP Servers operate over HTTP with oAuth authentication, making them accessible to multiple users.

Architecture: Where MCP Fits in Your Microservices

The key architectural insight: don't create a separate MCP microservice. Instead, integrate the MCP server into your existing CQRS+ microservices as another protocol layer. If you're building a Kusto query server, host the MCP endpoint alongside your existing REST API in the same query-handling microservice.

This approach makes sense because MCP is just another way to expose the same query logic you already have. Your architecture should look like:

[Claude Desktop/Code] 
        ↓
[Remote MCP Server over HTTP] ← co-hosted with → [Existing Query Microservice]
        ↓
[Azure Data Explorer (Kusto)]

Implementation Approach

The source shows an F#/.NET implementation, but the pattern works in any stack. Microsoft's Python-based Fabric RTI MCP Server served as inspiration. Key components:

  1. MCP Protocol Implementation: Handle JSON RPC calls over HTTP
  2. oAuth Integration: Secure access to your database
  3. Query Translation: Convert natural language to KQL (Claude helps here)
  4. Result Formatting: Return data in Claude-friendly formats

Why This Matters for Claude Code Users

While the article mentions Claude Desktop for business users, this capability is equally powerful for developers using Claude Code. Imagine asking:

"Show me the error rate for our payment service in the last hour"

And having Claude Code query your Kusto logs directly, then help you write fixes based on the results. This transforms Claude Code from just a coding assistant to a data-aware development partner.

Getting Started

If you're not ready to build your own, watch for Microsoft's official Kusto MCP Server (they're reportedly working on one, though it might focus on Azure AI Foundry first). In the meantime, the architectural pattern shown here applies to any database—PostgreSQL, MySQL, or even internal APIs.

For Claude Code power users, this represents the next level of integration: making your development tools directly aware of your production data, with proper security and architecture.

AI Analysis

Claude Code users should recognize that MCP isn't just for pre-built integrations—it's a protocol you can implement yourself to connect Claude to your internal systems. The key insight: treat MCP as another API protocol alongside REST/GraphQL in your microservices. Start by identifying one internal system (database, API, or tool) that would be more useful if Claude could query it directly. Build a simple Remote MCP Server using the JSON RPC specification. For Azure shops, Kusto is a perfect candidate because Claude already understands KQL well. Remember: Claude Code can help you write the MCP server code itself (the source author used Claude Code to write 75% of their implementation). This creates a virtuous cycle—use Claude to build tools that make Claude more powerful.
Enjoyed this article?
Share:

Related Articles

More in Products & Launches

View all