MCP ExplorerExplorer

Mcp Azure Loganalytics

@DominicButon a year ago
1 MIT
FreeCommunity
AI Systems
MCP Server for Azure log analysis using Python, supporting activity log retrieval and KQL queries.

Overview

What is Mcp Azure Loganalytics

mcp-azure-loganalytics is an MCP server implemented in Python that utilizes Azure services to facilitate log analysis. It retrieves Azure activity logs and allows users to run queries using Kusto Query Language (KQL) for deeper insights.

Use cases

Use cases for mcp-azure-loganalytics include troubleshooting application errors by analyzing log patterns, summarizing user activity for reporting purposes, and monitoring system performance through log data analysis.

How to use

To use mcp-azure-loganalytics, ensure you have Python 3.8 or higher and an Azure subscription with the necessary permissions. Set the required environment variables for Azure credentials, including AZURE_SUBSCRIPTION_ID and AZURE_LOG_ANALYTICS_WORKSPACE_ID. After setup, you can retrieve logs and run analysis queries through the server.

Key features

Key features of mcp-azure-loganalytics include Azure Activity Logs Retrieval, Log Analytics Query execution using KQL, and LLM Prompts for common log analysis tasks such as analyzing log errors and summarizing activity logs.

Where to use

mcp-azure-loganalytics can be used in various fields including IT operations, security monitoring, and compliance auditing, where log data analysis is crucial for operational insights and decision-making.

Content

Azure Log Analytics MCP Server

This project implements an MCP server in Python that leverages Azure services to provide tools and prompts for log analysis. The server performs the following functions:

  • Azure Activity Logs Retrieval: Uses the Azure Monitor Management client to obtain Azure activity logs within a specified time range.
  • Log Analytics Query: Uses the Azure Monitor Query client to run Kusto Query Language (KQL) queries against a Log Analytics workspace.
  • LLM Prompts: Exposes two prompts to help with common log analysis tasks:
    • Analyze Log Errors: Generates a prompt for an LLM to analyze error patterns in raw log data.
    • Summarize Activity Logs: Creates a prompt for summarizing the activity logs.

Prerequisites

  • Python 3.8+
  • An Azure subscription with appropriate permissions
  • Azure credentials (using any method supported by DefaultAzureCredential)
  • Environment variables set for:
    • AZURE_SUBSCRIPTION_ID
    • AZURE_LOG_ANALYTICS_WORKSPACE_ID

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers