Azure Resource Graph MCP Server
by hardik-id
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.
Last updated: N/A
What is Azure Resource Graph MCP Server?
The Azure Resource Graph MCP Server is a Model Context Protocol server designed to facilitate querying Azure resources using Azure Resource Graph. It acts as an intermediary, allowing users to retrieve detailed information about their Azure resources across multiple subscriptions through Resource Graph queries.
How to use Azure Resource Graph MCP Server?
To use the server, first clone the repository and build the project using npm install
and npm run build
. Then, integrate it with either Cursor IDE or VS Code by adding the appropriate configuration to your settings file, ensuring you update the path to the built index.js
file. You'll also need to configure your Azure credentials, either through Azure CLI login or by setting environment variables for your subscription ID, tenant ID, client ID, and client secret. Once configured, you can use the query-resources
tool to retrieve resource details, optionally specifying a subscription ID and a custom Resource Graph query.
Key features of Azure Resource Graph MCP Server
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
Use cases of Azure Resource Graph MCP Server
Inventory and discovery of Azure resources
Auditing and compliance reporting
Cost optimization and resource utilization analysis
Troubleshooting and diagnostics of Azure deployments
FAQ from Azure Resource Graph MCP Server
What is Azure Resource Graph?
What is Azure Resource Graph?
Azure Resource Graph is a service in Azure that is designed to extend Azure Resource Management by providing efficient and performant resource exploration with the ability to query at scale across a given set of subscriptions so that you can effectively govern your environment.
What is MCP?
What is MCP?
MCP stands for Model Context Protocol. It's a protocol that allows different tools and services to communicate and share information about models and their context.
How does the server handle authentication?
How does the server handle authentication?
The server uses Azure DefaultAzureCredential, which supports Azure CLI, Managed Identity, Visual Studio Code credentials, and environment variables for authentication.
Can I use a custom Resource Graph query?
Can I use a custom Resource Graph query?
Yes, you can specify a custom Resource Graph query when using the query-resources
tool.
What happens if the Azure client initialization fails?
What happens if the Azure client initialization fails?
The server includes robust error handling to catch and report Azure client initialization failures, query execution errors, and invalid queries or parameters.