Azure Resource Graph

by hardik-id

12 stars
Not rated
GitHub

About

Enables querying and retrieving detailed information about Azure resources across subscriptions through Azure Resource Graph API for cloud infrastructure analysis and troubleshooting

Details

Author
hardik-id
Repository
hardik-id/azure-resource-graph-mcp-server
GitHub stars
12
License
MIT License
Categories
Cloud Service, Other, Infrastructure, AI, Design, Developer Tools, Search, Knowledge Base
Tags
#integration

- Query Azure resources using Resource Graph queries
- Default query returns resource ID, name, type, and location
- Supports custom Resource Graph queries
- Uses Azure DefaultAzureCredential for authentication

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Azure Resource Graph
    Command (node, npx, python, etc.) node
    Arguments
    • Argument 1 C:\YOUR_WORKSPACE\azure-resource-graph-mcp-server\build\index.js
    Environment
    • SUBSCRIPTION_ID xxxxxx-xx-xx-xx-xxxxxx

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

The server provides the following tool:

You can run the MCP server using either Cursor IDE or Visual Studio Code.

query-resources

Retrieves resources and their details from Azure Resource Graph. Parameters: subscriptionId (optional, Azure subscription ID), query (optional, custom Resource Graph query, defaults to 'Resources | project id, name, type, location')

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "azure resource graph": {
            "env": {
                "SUBSCRIPTION_ID": "xxxxxx-xx-xx-xx-xxxxxx"
            },
            "args": [
                "C:\\YOUR_WORKSPACE\\azure-resource-graph-mcp-server\\build\\index.js"
            ],
            "command": "node"
        }
    }
}

Linux

{
    "env": {
        "SUBSCRIPTION_ID": "xxxxxx-xx-xx-xx-xxxxxx"
    },
    "args": [
        "C:\\YOUR_WORKSPACE\\azure-resource-graph-mcp-server\\build\\index.js"
    ],
    "command": "node"
}

Macos

{
    "env": {
        "SUBSCRIPTION_ID": "xxxxxx-xx-xx-xx-xxxxxx"
    },
    "args": [
        "C:\\YOUR_WORKSPACE\\azure-resource-graph-mcp-server\\build\\index.js"
    ],
    "command": "node"
}

Windows

{
    "env": {
        "SUBSCRIPTION_ID": "xxxxxx-xx-xx-xx-xxxxxx"
    },
    "args": [
        "C:\\YOUR_WORKSPACE\\azure-resource-graph-mcp-server\\build\\index.js"
    ],
    "command": "node"
}

Query and retrieve Azure resource information across subscriptions using Azure Resource Graph.

This is a Model Context Protocol (MCP) server that provides access to Azure Resource Graph queries. It allows you to retrieve information about Azure resources across your subscriptions using Resource Graph queries.

- Query Azure resources using Resource Graph queries
- Default query returns resource ID, name, type, and location
- Supports custom Resource Graph queries
- Uses Azure DefaultAzureCredential for authentication

- Node.js installed
- Azure subscription
- Azure CLI installed and logged in, or other Azure credentials configured

You can run the MCP server using either Cursor IDE or Visual Studio Code.

To integrate the MCP server with Cursor IDE:
- Clone this repository to your local machine (e.g.,C:\YOUR_WORKSPACE\azure-resource-graph-mcp-server)
- Build the project:
- Open Cursor Settings (JSON) and add the following configuration:

{ "mcpServers": { "azure-resource-graph-mcp-server": { "command": "node", "args": [ "C:\\YOUR_WORKSPACE\\azure-resource-graph-mcp-server\\build\\index.js" ], "env": { "SUBSCRIPTION_ID": "xxxxxx-xx-xx-xx-xxxxxx" }, } } }

Note: Make sure to update the path to match your local repository location.

To integrate the MCP server with Visual Studio Code:
- Clone this repository to your local machine
- Build the project:
- Open VS Code Settings (JSON) by pressingCtrl+Shift+P, type "Settings (JSON)" and select "Preferences: Open User Settings (JSON)"
- Add the following configuration:

{ "mcp": { "servers": { "azure-resource-graph": { "type": "stdio", "command": "node", "args": [ "C:\\YOUR_WORKSPACE\\azure-resource-graph-mcp-server\\build\\index.js" ], "env": { "SUBSCRIPTION_ID": "xxxxxx-xx-xx-xx-xxxxxx" }, } } } }

Note: Make sure to update the path to match your local repository location.
- Save the settings.json file
- Restart VS Code to apply the changes

The MCP server will now be available to use within VS Code with cursor integration.

Retrieves resources and their details from Azure Resource Graph.

- subscriptionId(optional): Azure subscription ID (defaults to configured ID)
- query(optional): Custom Resource Graph query (defaults to "Resources | project id, name, type, location")
-

First, make sure you're logged in to Azure CLI by running:

This step is crucial for local development as the DefaultAzureCredential will automatically use your Azure CLI credentials.

- Copy.env.exampleto.env
- UpdateAZURE_SUBSCRIPTION_IDin.envwith your actual subscription ID
- Other variables (AZURE_TENANT_ID,AZURE_CLIENT_ID,AZURE_CLIENT_SECRET) are optional when using Azure CLI authentication

Make sure you have proper Azure credentials configured. The server uses DefaultAzureCredential which supports:

- Azure CLI
- Managed Identity
- Visual Studio Code credentials
- Environment variables

- AZURE_SUBSCRIPTION_ID
- AZURE_TENANT_ID
- AZURE_CLIENT_ID
- AZURE_CLIENT_SECRET

The server includes robust error handling for:

- Azure client initialization failures
- Query execution errors
- Invalid queries or parameters
- Make changes in thesrcdirectory
- Build usingnpm run build
- Test your changes by running the server

This project is licensed under the MIT License. See theLICENSEfile for details.

Manage and interact with Microsoft Azure services.

Deploy and operate workloads, secrets, and networking across AWS, GCP, Azure, and private clouds.

Enables AI assistants to interact with Azure Kubernetes Service (AKS) clusters.

Interact with and manage Azure services using natural language.

A read-only MCP server for Azure Data Catalog, powered by CData's JDBC driver.

MCP server for Azure IoT Hub - device registry, twins, direct methods, jobs, messaging

Query Azure retail pricing information using the Azure Retail Prices API.

Implements CISA Binding Operational Directive 25-01 security controls for Microsoft 365 and Azure AD/Entra ID.

Manage Azure Cloud PCs using the Microsoft Graph API.

Ask your AI assistant a cost question. Get allocation, correlation, and explanation in one response. Costory connects Claude, Codex, or Cursor to normalized cost data across AWS, GCP, Azure, Datadog, OpenAI, and Anthropic.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.