AzResource MCP Server

Enables querying and listing Azure resources and costs directly from an MCP client.

Local serverstdioPython 3

What is the AzResource MCP server?

Enables querying and listing Azure resources and costs directly from an MCP client. The azresource mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 6 defined tools rather than through you.

What it actually does

  1. Create an Azure service principal for authentication: bash az ad sp create-for-rbac --name {service principal name} 2. Assign appropriate reader permissions to the service principal 3. Note your Azure subscription ID, tenant ID, client ID, and client secret 4. Set up the required environment variables
  • 📊 Resource Discovery - List all resources across your Azure subscriptions
  • 🔍 Filtering - Filter resources by resource group name
  • 💰 Cost Analysis - Retrieve cost information for your Azure subscriptions
  • 🔐 Secure - Uses your Azure service principal credentials
  • 🏷️ Detailed View - See locations, types, and tags for all your resources

Its toolset

Everything the assistant can do here goes through one of these:

  • list_azure_resources — List Azure resource groups and resources using service principal authentication
  • Inputs — - subscription_id (string, optional): Specific subscription ID to query. If not provided, uses the default subscription from environment variables
  • Returns — Formatted markdown list of resource groups and their resources with details such as location, type, and tags
  • get_azure_costs_rest — Get cost analysis data for an Azure subscription using the REST API
  • Prerequisites — The Prerequisites tool exposed by this server
  • Setup — The Setup tool exposed by this server

Adding it to your client

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

Configuration

You will need 4 environment variables: AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

  • Python 3.10+ - Azure subscription with appropriate permissions - Service principal with reader access to resources

When to reach for it

This sits in the cloud and infrastructure group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. AzResource's toolset — list_azure_resources, Inputs, Returns and 3 more — is a fair guide to whether it matches your workflow. It is maintained by tim10002; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the azresource mcp server does with a few real requests.

Available tools

ToolWhat it does
list_azure_resourcesList Azure resource groups and resources using service principal authentication
Inputs- subscription_id (string, optional): Specific subscription ID to query. If not provided, uses the default subscription from environment variables.
ReturnsFormatted markdown list of resource groups and their resources with details such as location, type, and tags.
get_azure_costs_restGet cost analysis data for an Azure subscription using the REST API
PrerequisitesThe Prerequisites tool exposed by this server.
SetupThe Setup tool exposed by this server.

Configuration

  • Python 3.10+ - Azure subscription with appropriate permissions - Service principal with reader access to resources
VariableDescriptionRequired
AZURE_TENANT_IDConfiguration value read at startup.Optional
AZURE_CLIENT_IDConfiguration value read at startup.Optional
AZURE_CLIENT_SECRETCredential the server authenticates with.Yes
AZURE_SUBSCRIPTION_IDConfiguration value read at startup.Optional

Example prompts to try

  • Use AzResource to list azure resources.
  • Use AzResource to Inputs.
  • Use AzResource to Returns.

Frequently asked questions

AzResource is an MCP server that allows you to query and list your Azure resources and costs directly from an MCP client, streamlining your cloud infrastructure management.