Azure Query MCP logo

Azure Query MCP

by @akapetaniou

Read-only MCP access to Azure Resource Graph, Log Analytics, Microsoft Sentinel, and curated security investigations.

Install Azure Query MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "akapetaniou-azure-query-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@akapetaniou/azure-query-mcp@0.6.1"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 11 tools correctly ().

Overview

@akapetaniou/azure-query-mcp connects AI assistants to Azure Resource Graph and Log Analytics through a local npm package launched with npx over stdio. It uses DefaultAzureCredential, so Azure RBAC determines which subscriptions, workspaces, schemas, and security data the assistant can read. Alongside bounded KQL queries, it provides workspace discovery, Sentinel incident triage, entity timelines, ingestion checks, and curated threat hunts. Reach for it when an agent needs controlled, non-destructive Azure inventory or security analysis.

Use cases

  • Query Azure resources across selected subscriptions
  • Investigate logs and Microsoft Sentinel incidents
  • Inspect workspace tables and schemas
  • Trace activity for accounts, IPs, or hosts
  • Run bounded threat-hunting queries

Key features

  • Read-only Azure Resource Graph KQL
  • Bounded Log Analytics workspace queries
  • Microsoft Sentinel incident triage
  • Entity timelines and ingestion health checks
  • Workspace and table discovery
  • Curated threat-hunting queries

Tools11

What Azure Query MCP lets your agent do. Expand a tool for its parameters.

Verified live~2.2k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

6/6 checks healthy over the last 22d

What it can do

From the 11 tools this server returned when we ran it; 11 declare their own safety hints.

Makes network requests · 10Read-only tools · 11
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age34 days
Maintainers1

Observed 2026-11-08 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 5d ago via OSV.dev · @akapetaniou/azure-query-mcp@0.6.1 (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
npm downloads283Package downloads in the last 30 days.
Last commit17d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed11Callable tools this server registers over MCP.

How Azure Query MCP works

What @akapetaniou/azure-query-mcp does

@akapetaniou/azure-query-mcp gives MCP clients read-only access to two Azure data planes. Azure Resource Graph handles resource inventory, configuration, tags, policy, health, and cross-subscription discovery. Log Analytics handles logs, events, telemetry, metrics, incidents, and time-series analysis, including Microsoft Sentinel data stored in workspaces.

The package also exposes higher-level security tools. Agents can locate workspaces, inspect tables and schemas, list or retrieve Sentinel incidents, build an entity timeline across sign-in, audit, Office, endpoint, firewall, and alert data, check ingestion health, and run built-in or user-supplied threat-hunting queries.

All tools are non-destructive, idempotent, and read-only. Query results are not stored, telemetry is not sent, and access remains subject to the identity's Azure permissions.

How it works

The MCP client starts the npm package locally with npx; there is no Azure deployment or repository build step. Authentication uses Azure DefaultAzureCredential, which can use an interactive Azure CLI session such as az login or another supported identity, including a managed identity. The service communicates with Microsoft Entra ID, Azure Resource Manager, Resource Graph, and the Log Analytics query API for the selected Azure cloud.

query_azure_resources sends KQL to Resource Graph for explicitly supplied subscription IDs. The query must start with an ARG table, such as Resources, ResourceContainers, ResourceChanges, or AuthorizationResources. query_workspace sends bounded KQL to one workspace, identified by GUID or full ARM resource ID, and requires both a result-limiting operator and a timespan. Timespans can be ISO 8601 durations such as P7D or absolute intervals.

Setup and configuration

Use Node.js 22 or later and authenticate to the tenant containing the target subscriptions and workspaces. The identity needs Azure RBAC permissions: Reader at the required subscription or narrower resource scope is suggested for Resource Graph and workspace discovery, while Log Analytics Reader is suggested for workspace schemas, data, and SOC tools. Custom roles can be used when they include the necessary read operations.

Configure the server as a stdio MCP process in Claude Code, VS Code, Claude Desktop, or Cursor. The command uses npx -y @akapetaniou/azure-query-mcp; AZURE_TENANT_ID can select the Entra tenant, although the Claude Code setup allows it to be left empty when the Azure CLI session supplies the tenant. Production deployments should prefer managed or workload identity over client secrets.

Tools and capabilities

  • Run Resource Graph KQL across explicitly selected subscriptions with query_azure_resources.
  • Run bounded Log Analytics KQL with query_workspace.
  • Discover workspaces and inspect table metadata with list_workspaces, search_tables, and describe_table.
  • Investigate Sentinel incidents using list_incidents and get_incident.
  • Trace activity for an account, IP address, or host with entity_timeline.
  • Examine stale tables, volume changes, and query latency with check_ingestion_health.
  • Enumerate and execute threat hunts with list_hunting_queries and run_hunting_query.

Limitations and notes

Resource Graph describes Azure control-plane resources and may lag behind changes; it does not contain workspace log records. Resource Graph requests require explicit subscription scope and limit each page to 1,000 rows and 5 MiB. Log Analytics responses are limited to 1,000 rows and 2,000 characters per cell.

The read-only policy permits filtering string values and comments but rejects management commands, set, and externaldata. Cross-resource functions are blocked unless AZURE_QUERY_MCP_ALLOW_CROSS_RESOURCE=true; Azure RBAC still applies when that setting is enabled. Only selected row-shaping evaluate plugins are permitted, while plugins that access external systems are blocked.

Malformed queries receive Azure's query explanation when Azure returns HTTP 400. Other failures expose the HTTP status, Azure error code, and a remediation hint rather than upstream details that could reveal tenant or object identifiers. Requests can time out, cancellation aborts Azure requests, and access tokens are not logged.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Azure Query MCP

@akapetaniou/azure-query-mcp is an MCP server that connects AI assistants to Azure Resource Graph, Log Analytics, and Microsoft Sentinel. Its main tools run read-only KQL against subscriptions or workspaces, while additional tools discover schemas, triage incidents, trace entities, check ingestion, and execute threat hunts.

Install it through an MCP client's stdio configuration with `npx -y @akapetaniou/azure-query-mcp`. Claude Code also provides a plugin installation path, while VS Code, Claude Desktop, and Cursor can launch the package directly. Authenticate with Azure CLI or another DefaultAzureCredential-supported identity first.

It needs Azure RBAC read access to the subscriptions and workspaces you intend to query. Reader is suggested for Resource Graph and workspace discovery, and Log Analytics Reader is suggested for workspace schemas, data, and SOC tools. Custom roles can be narrower if they include the required read operations.

No. The exposed tools are read-only, non-destructive, and idempotent. Resource Graph and Log Analytics queries are subject to bounded-query policies and output limits, and management commands, `set`, and `externaldata` are rejected.

Yes. Cursor can run it as a stdio MCP server from its MCP configuration, using `npx` and the package name. The process uses the Azure identity available to DefaultAzureCredential, such as an authenticated Azure CLI session, and remains constrained by that identity's Azure RBAC permissions.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAzure Query MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/akapetaniou-azure-query-mcp?style=directory)](https://allmcps.com/mcp/akapetaniou-azure-query-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/akapetaniou-azure-query-mcp"><img src="https://allmcps.com/api/badge/akapetaniou-azure-query-mcp?style=directory" alt="Azure Query MCP on AllMCPs" /></a>