aTreeFrog/kusto-mcp-server-github-copilot-agent
If you are the rightful owner of kusto-mcp-server-github-copilot-agent and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Kusto MCP Server for VS Code integrates Kusto databases with GitHub Copilot, enabling intelligent data querying directly from the VS Code environment.
Kusto MCP Server for VS Code + GitHub Copilot
Connect your Kusto database to GitHub Copilot in VS Code for intelligent data querying!
🚀 Quick Setup
1. Install Dependencies
# Activate virtual environment
venv\Scripts\activate
# Install all required packages from requirements.txt
pip install -r requirements.txt
2. Configure Your Cluster
Edit config/config.json
with your Kusto cluster details:
{
"clusters": {
"production": {
"url": "${KUSTO_CLUSTER_URL}",
"database": "${KUSTO_DATABASE}"
}
},
"logging": {
"level": "INFO",
"file": "logs/mcp-kusto-server.log"
},
"settings": {
"default_limit": 1000,
"timeout_seconds": 30
}
}
put in the kusto information in .env file
3. Pre-Authenticate
python pre_auth.py
- Choose Option 2 (Interactive Browser)
- Your browser will open for Microsoft authentication
- Sign in with your account
- This caches your credentials for VS Code
4. Configure VS Code MCP Settings
- Open Command Palette (
Ctrl+Shift+P
) - Type: "MCP: Open MCP Settings"
- Navigate to
.vscode/mcp.json
- Add your server configuration:
{
"servers": {
"kusto": {
"command": "your-location/mcp-kusto-server/venv/Scripts/python.exe",
"args": ["your-location/mcp-kusto-server/mcp_server_cached_auth.py"],
"env": {
"KUSTO_CONFIG_FILE": "your-location/mcp-kusto-server/config/config.json"
}
}
}
}
⚠️ Update the paths to match your actual file locations!
5. Start the MCP Server in VS Code
- Go to
.vscode/mcp.json
(or wherever your MCP settings are) - Find your "kusto" server in the list
- Click "Start" to start the server
- Verify it shows as "Running"
6. Enable Copilot Agent Mode
- Open GitHub Copilot Chat (sidebar or
Ctrl+Shift+I
) - Enable Agent Mode (toggle switch in chat interface)
- Verify Copilot can see your MCP tools
🎯 Usage Examples
Once everything is running, ask Copilot:
"List all tables in my Kusto database"
"Show me the schema of the Users table"
"Query the Events table for errors in the last hour"
"Find the top 10 most active users in the UserActivity table"
"Analyze trends in the LogEntries table over the past week"
🔧 Available Tools
Your Copilot now has access to:
- execute_kql - Run any KQL query
- list_tables - Show available tables
- get_table_schema - Get table structure
🔍 Troubleshooting
Authentication Issues
- Run
python pre_auth.py
again - Try Option 2 (Interactive Browser) authentication
- Make sure you can access your cluster in Azure Data Explorer UI
VS Code Issues
- Check that MCP server shows as "Running" in
.vscode/mcp.json
- Restart VS Code after configuration changes
- Check paths in your configuration are correct
Copilot Not Seeing Tools
- Ensure Copilot is in Agent Mode
- Restart Copilot Chat window
- Check that MCP server is started and running
📦 Requirements File
Make sure your requirements.txt
includes:
azure-kusto-data
azure-identity
mcp
asyncio-compat
pathlib-abc
typing-extensions
📝 Files Created
mcp_server_cached_auth.py
- Main MCP server (uses cached auth)pre_auth.py
- Authentication helper (run this first)config/config.json
- Cluster configurationlogs/mcp-kusto-cached-auth.log
- Server logsrequirements.txt
- Python dependencies
🎉 Success!
When everything works, you can ask Copilot to help you:
- Write complex KQL queries
- Analyze your data patterns
- Explore your database schema
- Generate insights from your Kusto data
All directly from VS Code! 🚀
Need help? Check the log file: logs/mcp-kusto-cached-auth.log