Azure Resource Graph

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.
  • typescript

17

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": {
    "hardik-id-azure-resource-graph-mcp-server": {
      "command": "node",
      "args": [
        "C:\\YOUR_WORKSPACE\\azure-resource-graph-mcp-server\\build\\index.js"
      ],
      "env": {
        "AZURE_CLIENT_ID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "AZURE_TENANT_ID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "SUBSCRIPTION_ID": "YOUR_SUBSCRIPTION_ID",
        "AZURE_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
        "AZURE_SUBSCRIPTION_ID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      }
    }
  }
}

You run an MCP server that lets you query Azure Resource Graph data from anywhere your MCP client can connect, enabling you to fetch resource details across subscriptions using Resource Graph queries. This server uses Azure authentication to securely access your resources and returns structured results that you can feed into your tooling or dashboards.

How to use

Connect to the Azure Resource Graph MCP Server from your MCP client and start querying Azure resources. The server exposes a tool named query-resources that returns resources and their details from Resource Graph. You can supply an optional subscription ID and a Resource Graph query. If you don’t supply a query, it uses the default: Resources | project id, name, type, location.

How to install

Prerequisites: Node.js installed, an Azure subscription, and Azure credentials available (Azure CLI login recommended). Make sure you are logged in to Azure before starting the server.

Step 1: Install dependencies and build the project.

npm install
npm run build

Step 2: Run the MCP server locally using the stdio configuration. You will run the server with Node and point to the built entry file. You can provide your subscription ID via an environment variable.

node build/index.js

Step 3: (Optional) configure your MCP client for Prompt-based integration. Use one of the following example configurations depending on your client. Ensure you set SUBSCRIPTION_ID to your actual Azure Subscription ID.

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

Additional sections

Environment setup requires Azure authentication. Run az login to ensure the DefaultAzureCredential can use your Azure CLI credentials for access.

Environment variables shown in the configuration include SUBSCRIPTION_ID. You can also configure credentials via Azure Tenant ID, Client ID, and Client Secret if you prefer using service principal credentials.

Configuration and security notes

The MCP server relies on Azure authentication. Use the environment variable SUBSCRIPTION_ID to scope Resource Graph queries to a specific subscription if needed. If you provide other credentials, ensure they are stored securely and not committed to any code repository.

If you encounter initialization or query errors, verify your Azure credentials, check that the Azure subscription ID is valid, and ensure your Resource Graph query syntax is correct.

Development

To contribute or customize this MCP server, edit the source under the src directory, then build and test locally using the steps above. Start by installing dependencies, building, and running the server to validate changes.

License

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

Available tools

query-resources

Retrieves resources and their details from Azure Resource Graph using an optional subscription ID and a Resource Graph query. The default query returns id, name, type, and location.

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