Kusto MCP
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
🎯 Overview
A Model Context Protocol (MCP) server implementation for Kusto aka. Eventhouse in Microsoft Fabric and Azure Data Explorer. This server enables AI agents to interact with Kusto databases by providing tools and resources through the MCP interface, allowing for seamless data querying and analysis capabilities.
🔍 How It Works
The Kusto MCP Server creates a seamless integration between AI agents and Kusto services through:
- 🔄 Smart JSON communication that AI agents understand
- 🏗️ Natural language commands that get translated to Kql operations
- 💡 Intelligent parameter suggestions and auto-completion!
- ⚡ Consistent error handling that makes sense
✨ What can you do with the Kusto (Eventhouse or Azure Data Explorer) MCP Server?
Here are some cool prompts you can try:
🔍 Explore your data
- "Get databases in Eventhouse/ADX'"
- "Sample 10 rows from table 'StormEvents' in Eventhouse/ADX"
- "What can you tell me about StormEvents data?"
- "Analyze the StormEvents to come up with trend analysis ocross past 10 years of data"
- "Analyze the commands in 'CommandExecution' table and categorize them as low/medium/high risks"
Available tools
- List databases
- List tables
- Get schema for a table
- Sample rows from a table
- Execute query
- Ingest a csv
Getting Started
Prerequisites
- Install either the stable or Insiders release of VS Code:
- Install the GitHub Copilot and GitHub Copilot Chat extensions
- Install
uv
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
or, check here for other install options
- Open VS Code in an empty folder
Install from PyPI (Pip)
The Kusto MCP Server is available on PyPI, so you can install it using pip. This is the easiest way to install the server.
From VS Code
1. Open the command palette (Ctrl+Shift+P) and run the command `MCP: Add Server`
2. Select install from Pip
3. When prompted, enter the package name `kusto-mcp`
4. Follow the prompts to install the package and add it to your settings.json file
The process should end with the below settings in your settings.json file.
settings.json
{
"mcp": {
"server": {
"kusto-mcp": {
"command": "uvx",
"args": [
"azure-kusto-mcp"
],
"env": {
"KUSTO_SERVICE_URI": "https://<your-kusto-cluster>.kusto.windows.net",
//"KUSTO_DATABASE": "<default db>" // Optional
}
}
}
}
}
🔧 Manual Install (Install from source)
- Make sure you have Python 3.10+ installed properly and added to your PATH.
- Clone the repository
- Install the dependencies (
pip install .oruv tool install .) - Add the settings below into your vscode
settings.jsonfile. - Change the path to match the repo location on your machine.
- Change the cluster uri in the settings to match your cluster.
{
"mcp": {
"servers": {
"kusto-mcp": {
"command": "uv",
"args": [
"--directory",
"C:/path/kusto-mcp/",
"run",
"-m",
"kusto_mcp.server"
],
"env": {
"KUSTO_SERVICE_URI": "https://<your-kusto-cluster>.kusto.windows.net",
}
}
}
}
}
🐛 Debugging the MCP Server locally
Assuming you have python installed and the repo cloned:
Install locally
pip install -e ".[dev]"
Configure
Add the server to your
{
"mcp": {
"servers": {
"local-kusto-mcp": {
"command": "python",
"args": [
"-m",
"kusto_mcp.server"
],
"env": {
"KUSTO_SERVICE_URI": "https://help.kusto.windows.net"
}
}
}
}
}
Attach the debugger
Use the Python: Attach configuration in your launch.json to attach to the running server.
Once VS Code picks up the server and starts it, navigate to it's output:
- Open command palette (Ctrl+Shift+P) and run the command
MCP: List Servers - Navigate to
local-kusto-mcpand selectShow Output - Pick up the process id (PID) of the server from the output
- Run the
Python: Attachconfiguration in yourlaunch.jsonfile, and paste the PID of the server in the prompt - The debugger will attach to the server process, and you can start debugging
🧪 Test the MCP Server
- Open GitHub Copilot in VS Code and switch to Agent mode
- You should see the Kusto MCP Server in the list of tools
- Try a prompt that tells the agent to use the Kusto MCP Server, such as "List my Kusto tables"
- The agent should be able to use the Kusto MCP Server tools to complete your query
🔑 Authentication
The MCP Server seamlessly integrates with your host operating system's authentication mechanisms, making it super easy to get started! We use Azure Identity under the hood via DefaultAzureCredential, which tries these credentials in order:
- Environment Variables (
EnvironmentCredential) - Perfect for CI/CD pipelines - Visual Studio (
VisualStudioCredential) - Uses your Visual Studio credentials - Azure CLI (
AzureCliCredential) - Uses your existing Azure CLI login - Azure PowerShell (
AzurePowerShellCredential) - Uses your Az PowerShell login - Azure Developer CLI (
AzureDeveloperCliCredential) - Uses your azd login - Interactive Browser (
InteractiveBrowserCredential) - Falls back to browser-based login if needed
If you're already logged in through any of these methods, the Kusto MCP Server will automatically use those credentials.
🛡️ Security Note
Your credentials are always handled securely through the official Azure Identity SDK - we never store or manage tokens directly.
MCP as a phenomenon is very novel and cutting-edge. As with all new technology standards, consider doing a security review to ensure any systems that integrate with MCP servers follow all regulations and standards your system is expected to adhere to. This includes not only the Azure MCP Server, but any MCP client/agent that you choose to implement down to the model provider.
👥 Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
🤝 Code of Conduct
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Data Collection
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file azure_kusto_mcp-0.0.13.tar.gz.
File metadata
- Download URL: azure_kusto_mcp-0.0.13.tar.gz
- Upload date:
- Size: 71.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2ab0fb441e4410e579f14de945330e9caec955a90d7f5f0eb54ae7411cbefe4
|
|
| MD5 |
57035a66669eea2fc1ad036e6acdf9bd
|
|
| BLAKE2b-256 |
fbfeb125a31392da6e059ebc98e21eba4505efe7a86f5dd8ef1b2edd94474ee6
|
Provenance
The following attestation bundles were made for azure_kusto_mcp-0.0.13.tar.gz:
Publisher:
publish-PyPI.yml on Azure/azure-kusto-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
azure_kusto_mcp-0.0.13.tar.gz -
Subject digest:
e2ab0fb441e4410e579f14de945330e9caec955a90d7f5f0eb54ae7411cbefe4 - Sigstore transparency entry: 218553783
- Sigstore integration time:
-
Permalink:
Azure/azure-kusto-mcp@71ac13f83391ab73d1d4f5bd9fd071f8ce71a8dd -
Branch / Tag:
refs/tags/0.0.13 - Owner: https://github.com/Azure
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-PyPI.yml@71ac13f83391ab73d1d4f5bd9fd071f8ce71a8dd -
Trigger Event:
release
-
Statement type:
File details
Details for the file azure_kusto_mcp-0.0.13-py3-none-any.whl.
File metadata
- Download URL: azure_kusto_mcp-0.0.13-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9c19f5e0019d18dfa2563259abe6593cca1b1538fbe37dc122984d0d8eb7734
|
|
| MD5 |
20ef63f02a4098946db3bbfadb8394f9
|
|
| BLAKE2b-256 |
680fd17c30744aa4b62aef1ace4fc54d8fe1e6120644f7aa3243422ee42e581e
|
Provenance
The following attestation bundles were made for azure_kusto_mcp-0.0.13-py3-none-any.whl:
Publisher:
publish-PyPI.yml on Azure/azure-kusto-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
azure_kusto_mcp-0.0.13-py3-none-any.whl -
Subject digest:
e9c19f5e0019d18dfa2563259abe6593cca1b1538fbe37dc122984d0d8eb7734 - Sigstore transparency entry: 218553794
- Sigstore integration time:
-
Permalink:
Azure/azure-kusto-mcp@71ac13f83391ab73d1d4f5bd9fd071f8ce71a8dd -
Branch / Tag:
refs/tags/0.0.13 - Owner: https://github.com/Azure
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-PyPI.yml@71ac13f83391ab73d1d4f5bd9fd071f8ce71a8dd -
Trigger Event:
release
-
Statement type: