Azure Log Analytics MCP Server
MCP server for querying Azure Log Analytics using natural language
MananShahTR
README
Azure Log Analytics MCP Server
An MCP (Model Context Protocol) server for querying Azure Log Analytics using natural language. This server allows large language models to convert natural language queries into KQL (Kusto Query Language) and execute them against Azure Log Analytics.
Features
- Convert natural language queries to KQL using Claude AI
- Execute KQL queries against Azure Log Analytics
- Format results for easy consumption by LLMs
- CLI mode for direct interactions and MCP server mode for LLM integrations
Prerequisites
- Node.js 18.x or higher
- An Azure subscription with Log Analytics workspace
- An Anthropic API key for Claude AI
- Azure CLI configured with appropriate credentials
Installation
# Clone the repository
git clone https://github.com/MananShahTR/azure-log-analytics-mcp.git
cd azure-log-analytics-mcp
# Install dependencies
npm install
# Build the project
npm run build
Configuration
The server requires the following environment variables:
ANTHROPIC_API_KEY
: Your Anthropic API key for Claude AI
Azure credentials are obtained through Azure CLI credentials. Ensure you're logged in with az login
before running the server.
You'll need to configure the following in the azure-service.ts
file:
subscriptionId
: Your Azure subscription IDresourceGroup
: The resource group containing your App Insights resourceappInsightsId
: The name of your Application Insights resource
Usage
CLI Tool
# Run as a CLI tool
ANTHROPIC_API_KEY=your_key_here node build/index.js
MCP Server
# Run as an MCP server
ANTHROPIC_API_KEY=your_key_here node build/mcp-server.js
MCP Settings Configuration
Add the following to your MCP settings configuration file:
{
"mcpServers": {
"azure-log-analytics": {
"command": "node",
"args": ["path/to/azure-log-analytics-mcp/build/mcp-server.js"],
"env": {
"ANTHROPIC_API_KEY": "your_key_here"
}
}
}
}
Tool Usage
Once connected, the MCP server provides the following tool:
query_logs
: Query Azure Log Analytics using natural language- Parameters:
query
: Natural language query about trace logs (required)timeRange
: Optional time range (e.g., "last 24 hours", "past week")limit
: Maximum number of results to return
- Parameters:
Examples
// Example MCP tool use
use_mcp_tool({
server_name: "azure-log-analytics",
tool_name: "query_logs",
arguments: {
query: "Show me all errors in the authentication service from the last hour",
timeRange: "last hour",
limit: 10
}
});
License
MIT
Recommended Servers
Crypto Price & Market Analysis MCP Server
A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.
MCP PubMed Search
Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.
dbt Semantic Layer MCP Server
A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.
mixpanel
Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Nefino MCP Server
Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.
Vectorize
Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.
Mathematica Documentation MCP server
A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.
kb-mcp-server
An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded
Research MCP Server
The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.