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 DefaultAzureCre
Add this skill
npx mdskills install hardik-id/azure-resource-graph-mcp-serverWell-documented Azure Resource Graph MCP server with clear setup instructions and authentication guidance
1# Demo234# Flow5678# Azure Resource Graph MCP Server910This 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.11<a href="https://glama.ai/mcp/servers/@hardik-id/azure-resource-graph-mcp-server">12 <img width="380" height="200" src="https://glama.ai/mcp/servers/@hardik-id/azure-resource-graph-mcp-server/badge" />13</a>1415[](https://mseep.ai/app/hardik-id-azure-resource-graph-mcp-server)1617## Features1819- Query Azure resources using Resource Graph queries20- Default query returns resource ID, name, type, and location21- Supports custom Resource Graph queries22- Uses Azure DefaultAzureCredential for authentication2324## Prerequisites2526- Node.js installed27- Azure subscription28- Azure CLI installed and logged in, or other Azure credentials configured2930## Running the MCP Server3132You can run the MCP server using either Cursor IDE or Visual Studio Code.3334### Option 1: Cursor IDE Integration3536To integrate the MCP server with Cursor IDE:37381. Clone this repository to your local machine (e.g., `C:\YOUR_WORKSPACE\azure-resource-graph-mcp-server`)392. Build the project:40```bash41npm install42npm run build43```443. Open Cursor Settings (JSON) and add the following configuration:45```json46{47 "mcpServers": {48 "azure-resource-graph-mcp-server": {49 "command": "node",50 "args": [51 "C:\\YOUR_WORKSPACE\\azure-resource-graph-mcp-server\\build\\index.js"52 ],53 "env": {54 "SUBSCRIPTION_ID": "xxxxxx-xx-xx-xx-xxxxxx"55 },56 }57 }58}59```60> **Note**: Make sure to update the path to match your local repository location.61624. Restart Cursor IDE to apply the changes6364### Option 2: VS Code Integration6566To integrate the MCP server with Visual Studio Code:67681. Clone this repository to your local machine692. Build the project:70```bash71npm install72npm run build73```743. Open VS Code Settings (JSON) by pressing `Ctrl+Shift+P`, type "Settings (JSON)" and select "Preferences: Open User Settings (JSON)"754. Add the following configuration:76```json77{78 "mcp": {79 "servers": {80 "azure-resource-graph": {81 "type": "stdio",82 "command": "node",83 "args": [84 "C:\\YOUR_WORKSPACE\\azure-resource-graph-mcp-server\\build\\index.js"85 ],86 "env": {87 "SUBSCRIPTION_ID": "xxxxxx-xx-xx-xx-xxxxxx"88 },89 }90 }91 }92}93```94> **Note**: Make sure to update the path to match your local repository location.95965. Save the settings.json file976. Restart VS Code to apply the changes9899The MCP server will now be available to use within VS Code with cursor integration.100101## Usage102103The server provides the following tool:104105### query-resources106107Retrieves resources and their details from Azure Resource Graph.108109Parameters:110- `subscriptionId` (optional): Azure subscription ID (defaults to configured ID)111- `query` (optional): Custom Resource Graph query (defaults to "Resources | project id, name, type, location")112113## Environment Setup1141151. First, make sure you're logged in to Azure CLI by running:116 ```bash117 az login118 ```119 This step is crucial for local development as the DefaultAzureCredential will automatically use your Azure CLI credentials.1201212. Set up your environment variables:122 - Copy `.env.example` to `.env`123 - Update `AZURE_SUBSCRIPTION_ID` in `.env` with your actual subscription ID124 - Other variables (`AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`) are optional when using Azure CLI authentication1251263. Make sure you have proper Azure credentials configured. The server uses DefaultAzureCredential which supports:127 - Azure CLI128 - Managed Identity129 - Visual Studio Code credentials130 - Environment variables1311324. If using environment variables, set up:133 - AZURE_SUBSCRIPTION_ID134 - AZURE_TENANT_ID135 - AZURE_CLIENT_ID136 - AZURE_CLIENT_SECRET137138## Error Handling139140The server includes robust error handling for:141- Azure client initialization failures142- Query execution errors143- Invalid queries or parameters144145## Development146147To work on this project:1481491. Make changes in the `src` directory1502. Build using `npm run build`1513. Test your changes by running the server152153## License154This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.155156
Full transparency — inspect the skill content before installing.