- Home
- MCP servers
- Azure Log Analytics
Azure Log Analytics
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 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": {
"rasta26-azure_log_mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--env-file",
".env",
"azure-logs-mcp"
],
"env": {
"AZURE_CLIENT_ID": "YOUR_CLIENT_ID",
"AZURE_TENANT_ID": "YOUR_TENANT_ID",
"AZURE_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
}
}
}
}This Node.js MCP server enables you to query Azure Log Analytics data through the MCP protocol, with Docker support and Service Principal authentication. It lets you run Kusto queries against your Log Analytics workspace from an MCP client and manage queries with built-in tools. It's ideal when you want a self-contained MCP endpoint that securely authenticates to Azure and exposes workspace data for your dashboards and automations.
How to use
You can run this MCP server either locally or via Docker. Use the MCP client to connect to the server, then leverage the included tools to execute KQL queries, fetch workspace tables, and manage saved queries.
How to install
Prerequisites you need before installing: Node.js (for local development), and Docker with Docker Compose (for the Docker-based setup). Make sure Docker is running on your system.
Option A: Docker (Recommended)
# Copy the environment example and edit credentials
cp .env.example .env
# Edit .env with your Service Principal credentials
# Start the server with Docker Compose
docker-compose up --build
Option B: Local development
Install dependencies and configure environment variables, then start the server locally.
# Install dependencies
npm install
# Set Azure credentials (Service Principal)
export AZURE_CLIENT_ID="your-client-id"
export AZURE_CLIENT_SECRET="your-client-secret"
export AZURE_TENANT_ID="your-tenant-id"
# Start the server
npm start
Additional configuration and usage notes
Authentication uses a Service Principal when the three Azure environment variables are configured. If the SPN credentials are not provided, the server will fall back to DefaultAzureCredential automatically when available.
Available tools
query_logs
Execute a KQL query against the connected Log Analytics workspace and format the results for MCP clients.
save_query
Save a KQL query for later reuse within the MCP server.
list_saved_queries
List all saved KQL queries stored on the server.
run_saved_query
Run a previously saved KQL query and return its results.
list_tables
List all tables available in the Log Analytics workspace.
get_table_schema
Retrieve the schema for a specific workspace table.