Azure Log Analytics

Allows natural language queries to be translated into KQL and executed against Azure Log Analytics, with results formatted for LLM consumption.
  • typescript

3

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mananshahtr-azure-log-analytics-mcp": {
      "command": "node",
      "args": [
        "build/mcp-server.js"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

You can query Azure Log Analytics using natural language and have the responses run as KQL queries against your Log Analytics workspace. This MCP server translates your natural language questions into KQL, executes them against Azure, and returns results formatted for easy consumption by large language models.

How to use

You connect to this MCP server from an MCP client and use the available tool to query logs. The primary tool is query_logs, which lets you describe what you want to retrieve in plain English and optionally constrain the time range and result count. When you ask for authentication-related data or time-based analyses, the server translates your request into a KQL query, runs it against your Azure Log Analytics workspace, and returns the results in a structured format that is easy for an LLM to consume.

How to install

Prerequisites you need before installing: 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 credentials.

# Clone the MCP server source
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

Set up the required environment variables and Azure credentials to run the MCP server. The server needs your Anthropic API key and Azure credentials available to access Log Analytics.

Environment variables you need to provide when running the server:

  • ANTHROPIC_API_KEY: Your Anthropic API key for Claude AI.

Azure credentials are obtained through Azure CLI credentials. Ensure you are logged in with az login before starting the server.

Azure configuration details you will configure in code (for example in azure-service.ts):

  • subscriptionId: Your Azure subscription ID
  • resourceGroup: The resource group containing your Application Insights resource
  • appInsightsId: The name of your Application Insights resource

Tool usage

The MCP server exposes the query_logs tool. Use it to describe the data you want to retrieve from Azure Log Analytics. You may specify a query (natural language), an optional timeRange (for example, "last 24 hours"), and a limit for the maximum number of results.

Examples

Use the tool to fetch logs in a natural language form, then constrain the results as needed.

License

MIT

Available tools

query_logs

Query Azure Log Analytics using natural language. Provide a natural language query, optional time range, and a limit for the number of results. The server translates the query to KQL, executes it against the configured Log Analytics workspace, and returns formatted results.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational