Cover image
Try Now
2025-04-04

Model Context Protocol (MCP) Servidor que proporciona acceso a consultas de gráficos de recursos de Azure. Le permite recuperar información sobre los recursos de Azure en sus suscripciones utilizando consultas de gráficos de recursos.

3 years

Works with Finder

1

Github Watches

0

Github Forks

3

Github Stars

Demo

MCP Server Demo

Flow

Request 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:

  1. Clone this repository to your local machine (e.g., C:\YOUR_WORKSPACE\azure-resource-graph-mcp-server)
  2. Build the project:
npm install
npm run build
  1. 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.

  1. Restart Cursor IDE to apply the changes

Option 2: VS Code Integration

To integrate the MCP server with Visual Studio Code:

  1. Clone this repository to your local machine
  2. Build the project:
npm install
npm run build
  1. Open VS Code Settings (JSON) by pressing Ctrl+Shift+P, type "Settings (JSON)" and select "Preferences: Open User Settings (JSON)"
  2. 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.

  1. Save the settings.json file
  2. 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

  1. First, make sure you're logged in to Azure CLI by running:

    az login
    

    This step is crucial for local development as the DefaultAzureCredential will automatically use your Azure CLI credentials.

  2. Set up your environment variables:

    • Copy .env.example to .env
    • Update AZURE_SUBSCRIPTION_ID in .env with your actual subscription ID
    • Other variables (AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET) are optional when using Azure CLI authentication
  3. Make sure you have proper Azure credentials configured. The server uses DefaultAzureCredential which supports:

    • Azure CLI
    • Managed Identity
    • Visual Studio Code credentials
    • Environment variables
  4. 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:

  1. Make changes in the src directory
  2. Build using npm run build
  3. Test your changes by running the server

License

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

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • jae-jae
  • Servidor MCP para obtener contenido de la página web con el navegador sin cabeza de dramaturgo.

  • HiveNexus
  • Un bot de chat de IA para equipos pequeños y medianos, que apoyan modelos como Deepseek, Open AI, Claude y Gemini. 专为中小团队设计的 ai 聊天应用 , 支持 Deepseek 、 Open ai 、 Claude 、 Géminis 等模型。

  • ravitemer
  • Un poderoso complemento Neovim para administrar servidores MCP (protocolo de contexto del modelo)

  • patruff
  • Puente entre los servidores Ollama y MCP, lo que permite a LLM locales utilizar herramientas de protocolo de contexto del modelo

    Reviews

    1 (1)
    Avatar
    user_95JkfPYc
    2025-04-16

    As a devoted user of MCP applications, I find the azure-resource-graph-mcp-server to be an incredibly valuable tool. Authored by hardik-id, this server allows for seamless querying and analysis of Azure resources. The implementation is smooth, and it greatly enhances productivity by providing comprehensive insights into resource management. Highly recommended for anyone managing Azure infrastructure! Check it out: https://github.com/hardik-id/azure-resource-graph-mcp-server.