Model Context Protocol (MCP) server exposing Azure Resource Graph queries so you can programmatically inspect resources across subscriptions.
https://github.com/hardik-id/azure-resource-graph-mcp-serverStop bouncing between the Azure portal, CLI, and your code editor when you need to understand your infrastructure. This MCP server brings Azure Resource Graph queries directly into your development workflow, letting you explore resources across subscriptions without leaving your IDE or breaking your flow.
You're debugging a production issue and need to find all App Services in a specific region, or you're reviewing security compliance and want to list all storage accounts without HTTPS enforcement. The usual dance involves opening the Azure portal, navigating through subscriptions, or switching to a terminal for Azure CLI commands. Each context switch kills momentum.
This MCP server eliminates that friction by making Azure Resource Graph queryable through your AI assistant, directly from Cursor or VS Code.
Cross-Subscription Resource Discovery: Query resources across multiple Azure subscriptions with a single command. Perfect for enterprise environments where resources span subscription boundaries.
Conversational Infrastructure Queries: Ask Claude "Show me all virtual machines in the East US region that are running" and get structured results immediately. The AI understands Azure Resource Graph syntax and can help construct complex queries.
IDE Integration: Works seamlessly with Cursor and VS Code through MCP. Your infrastructure queries become part of your development environment, not a separate tool.
Flexible Querying: Run custom Resource Graph queries or use the default resource listing. Support for complex filtering, joins, and aggregations that Resource Graph enables.
Security Audits: "Find all storage accounts that allow public blob access" or "List virtual machines without disk encryption enabled." Run compliance checks without manual portal navigation.
Cost Optimization: Query resources by tags, regions, or resource types to identify optimization opportunities. "Show me all Premium storage accounts that haven't been accessed in 30 days."
Troubleshooting: When an incident hits, quickly identify related resources. "Find all resources in the same resource group as this failing App Service" or "List all network security groups affecting this subnet."
Resource Planning: "Show me all App Service plans and their current capacity" or "List all virtual networks and their address spaces" for infrastructure planning.
The server uses Azure's DefaultAzureCredential, so it works with your existing authentication setup - Azure CLI login, managed identities, or service principals. No additional credential management required.
# Quick setup after cloning
npm install && npm run build
# Configure your subscription
export AZURE_SUBSCRIPTION_ID="your-subscription-id"
# Add to Cursor/VS Code settings
{
"mcpServers": {
"azure-resource-graph": {
"command": "node",
"args": ["./build/index.js"],
"env": {"SUBSCRIPTION_ID": "your-sub-id"}
}
}
}
Once configured, you can ask your AI assistant:
The responses come back as structured data that you can immediately act on or integrate into scripts and documentation.
Azure Resource Graph is incredibly powerful, but it's traditionally been isolated in the Azure portal or CLI. By bringing it into your development environment through MCP, you can maintain flow state while gathering infrastructure context. No more tab switching or command-line interruptions when you need to understand your Azure footprint.
For teams managing complex Azure environments, this becomes essential infrastructure tooling that lives where you already work.
Get Started: Clone the repository, build it, and add the MCP server configuration to your IDE. Your Azure resources are now conversationally queryable from your development environment.