Azure Resource Graph MCP Server
MCP server for querying Azure Resource Graph across subscriptions
Key Features
Use Cases
README
Demo
Flow
Azure Resource Graph MCP Server
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.
Features
- 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
Prerequisites
- Node.js installed
- Azure subscription
- Azure CLI installed and logged in, or other Azure credentials configured
Running the MCP Server
You can run the MCP server using either Cursor IDE or Visual Studio Code.
Option 1: Cursor IDE Integration
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:
npm install
npm run build
- 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.
- Restart Cursor IDE to apply the changes
Option 2: VS Code Integration
To integrate the MCP server with Visual Studio Code:
- Clone this repository to your local machine
- Build the project:
npm install
npm run build
- Open VS Code Settings (JSON) by pressing
Ctrl+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.
Usage
The server provides the following tool:
query-resources
Retrieves resources and their details from Azure Resource Graph.
Parameters:
subscriptionId(optional): Azure subscription ID (defaults to configured ID)query(optional): Custom Resource Graph query (defaults to "Resources | project id, name, type, location")
Environment Setup
-
First, make sure you're logged in to Azure CLI by running:
bashaz loginThis step is crucial for local development as the DefaultAzureCredential will automatically use your Azure CLI credentials.
-
Set up your environment variables:
- Copy
.env.exampleto.env - Update
AZURE_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
- Copy
-
Make sure you have proper Azure credentials configured. The server uses DefaultAzureCredential which supports:
- Azure CLI
- Managed Identity
- Visual Studio Code credentials
- Environment variables
-
If using environment variables, set up:
- AZURE_SUBSCRIPTION_ID
- AZURE_TENANT_ID
- AZURE_CLIENT_ID
- AZURE_CLIENT_SECRET
Error Handling
The server includes robust error handling for:
- Azure client initialization failures
- Query execution errors
- Invalid queries or parameters
Development
To work on this project:
- Make changes in the
srcdirectory - Build using
npm run build - Test your changes by running the server
License
This project is licensed under the MIT License. See the LICENSE file for details.
Star History
Repository Owner
User
Repository Details
Programming Languages
Tags
Join Our Newsletter
Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.
Related MCPs
Discover similar Model Context Protocol servers
Azure MCP Server
Connect AI agents with Azure services through Model Context Protocol.
Azure MCP Server provides a seamless interface between AI agents and Azure services by implementing the Model Context Protocol (MCP) specification. It enables integration with tools like GitHub Copilot for Azure and supports a wide range of Azure resource management tasks directly via conversational AI interfaces. Designed for extensibility and compatibility, it offers enhanced contextual capabilities for agents working with Azure environments.
- ⭐ 1,178
- MCP
- Azure/azure-mcp
Azure DevOps MCP Server
Standardized AI access to Azure DevOps via Model Context Protocol.
Implements the Model Context Protocol (MCP) to enable AI assistants to securely and efficiently interact with Azure DevOps resources. Provides a standardized bridge for managing projects, work items, repositories, pull requests, and pipelines through natural language interfaces. Supports modular authentication and a feature-based architecture for scalability and integration. Facilitates seamless integration with AI tools such as Claude Desktop and Cursor AI.
- ⭐ 306
- MCP
- Tiberriver256/mcp-server-azure-devops
Azure Data Explorer MCP Server
Enables AI assistants to query and analyze Azure Data Explorer using the Model Context Protocol.
Azure Data Explorer MCP Server provides standardized MCP interfaces for AI assistants to execute KQL queries and interact with Azure Data Explorer (ADX/Kusto) databases. It supports secure authentication methods, database discovery, and delivers structured results in JSON format. Multiple deployment options, including Docker and various transports, enable flexible integration into development or production environments.
- ⭐ 49
- MCP
- pab1it0/adx-mcp-server
Firefly MCP Server
Seamless resource discovery and codification for Cloud and SaaS with Model Context Protocol integration.
Firefly MCP Server is a TypeScript-based server implementing the Model Context Protocol to enable integration with the Firefly platform for discovering and managing resources across Cloud and SaaS accounts. It supports secure authentication, resource codification into infrastructure as code, and easy integration with tools such as Claude and Cursor. The server can be configured via environment variables or command line and communicates using standardized MCP interfaces. Its features facilitate automation and codification workflows for cloud resource management.
- ⭐ 15
- MCP
- gofireflyio/firefly-mcp
RAD Security MCP Server
AI-powered security insights for Kubernetes and cloud environments via the Model Context Protocol.
RAD Security MCP Server is an implementation of the Model Context Protocol designed to deliver AI-powered security insights and operations for Kubernetes and cloud platforms. It serves as an MCP server for RAD Security, providing a range of toolkits for container, cluster, identity, audit, and threat management. The server is easily configurable via environment variables, allowing for flexible toolkit activation and authentication options. Multiple deployment options are supported, including Node.js, Docker, and integration with development environments like Cursor IDE and Claude Desktop.
- ⭐ 5
- MCP
- rad-security/mcp-server
EntraID MCP Server (Microsoft Graph FastMCP)
A modular FastMCP server for managing Microsoft Graph resources with advanced context and security.
EntraID MCP Server provides a modular, resource-oriented implementation of a FastMCP server tailored for Microsoft Graph API interactions. It supports advanced operations across users, groups, applications, service principals, MFA, and sign-in logs, offering extensibility and strong security practices. Resource modules use a centralized authentication client, while comprehensive permission management, consistent context handling, error reporting, and logging are built in. The tool is designed for ease of development and extensibility, supporting standardized model context protocols.
- ⭐ 29
- MCP
- hieuttmmo/entraid-mcp-server
Didn't find tool you were looking for?