Azure Log Analytics MCP Server
MCP server for querying Azure Log Analytics using natural language
Overview
Azure Log Analytics MCP Server is a Model Context Protocol server designed to query Azure Log Analytics using natural language, allowing users to convert their queries into Kusto Query Language (KQL) and execute them seamlessly.
To use the server, clone the repository, install the dependencies, and run it either as a CLI tool or an MCP server by providing your Anthropic API key and Azure credentials.
- Converts natural language queries to KQL using Claude AI. - Executes KQL queries against Azure Log Analytics. - Formats results for easy consumption by large language models (LLMs). - Supports both CLI mode and MCP server mode for integrations.
- Querying Azure Log Analytics for specific log data using natural language.
- Integrating with LLMs for enhanced data analysis and reporting.
- Simplifying log queries for users unfamiliar with KQL.
Add to your AI client
Use these steps to connect Azure Log Analytics MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"azure-log-analytics-mcp-mananshahtr": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-azure-log-analytics-mcp-mananshahtr"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"azure-log-analytics-mcp-mananshahtr": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-azure-log-analytics-mcp-mananshahtr"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"azure-log-analytics-mcp-mananshahtr": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-azure-log-analytics-mcp-mananshahtr"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"azure-log-analytics-mcp-mananshahtr": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-azure-log-analytics-mcp-mananshahtr"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"azure-log-analytics-mcp-mananshahtr": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-azure-log-analytics-mcp-mananshahtr"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"azure-log-analytics-mcp-mananshahtr": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-azure-log-analytics-mcp-mananshahtr"
]
}
}
}FAQ
What are the prerequisites for using the server?
You need Node.js 18.x or higher, an Azure subscription with a Log Analytics workspace, an Anthropic API key for Claude AI, and Azure CLI configured with appropriate credentials.
Is there a specific way to run the server?
Yes, you can run it as a CLI tool or as an MCP server by using the provided commands in the documentation.
Can I customize the queries?
Yes, you can customize your natural language queries to retrieve specific log data as needed.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3840,"uuid":"3e6d2c1a-0b14-400f-a1ea-4d6f5b2901e9","name":"azure-log-analytics-mcp","title":"Azure Log Analytics MCP Server","description":"MCP server for querying Azure Log Analytics using natural language","avatar_url":"https://avatars.githubusercontent.com/u/131394759?v=4","created_at":"2025-03-22T00:34:18.283Z","updated_at":"2025-03-22T00:37:10.468Z","status":"created","author_name":"MananShahTR","author_avatar_url":"https://avatars.githubusercontent.com/u/131394759?v=4","tags":"azure-log-analytics,mcp-server,natural-language-query","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/MananShahTR/azure-log-analytics-mcp","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-21 16:56:09\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]