# Azure — MCP Server

> Manage Azure resources across 50+ services in natural language.

**Source:** https://mcpplaygroundonline.com/mcp-servers/azure  
**Transport:** stdio  
**Requires auth:** Yes

---

## What it does

Rather than a fixed tool list, the server is organised into service namespaces — `storage`, `cosmos`, `keyvault`, `monitor`, `aks`, `sql` and many others — and you choose how many to expose. That matters more here than on most servers: the full surface is far larger than any model handles well, so the `--namespace` option lets you expose only the services a given agent needs, and `--mode` controls whether tools are presented individually or consolidated per namespace. Authentication uses your Azure CLI login or a managed identity, so the agent inherits your RBAC permissions exactly — there is no separate token to scope, and no way for it to exceed what your account can already do. Two safety features are worth knowing about: `--read-only` refuses every write operation server-side, and elicitation forces an explicit user confirmation before any tool returns a secret, such as a Key Vault password or a connection string. Beyond resource management, the server also carries advisory tools — Azure best practices, Well-Architected Framework guidance, Bicep schemas and Terraform module discovery — that answer design questions without touching a subscription.

## Tools exposed

- storage / fileshares — accounts, containers, blobs, tables and file shares
- cosmos / sql / postgres / mysql / redis — database accounts, databases, containers and queries
- keyvault — keys, secrets and certificates, gated by an explicit confirmation prompt
- monitor / applicationinsights — query Azure Monitor logs and metrics, KQL included
- aks / appservice / functionapp / compute — clusters, web apps, functions and VMs
- group / subscription / role — resource groups, subscriptions and RBAC assignments
- servicebus / eventhubs / eventgrid — messaging namespaces, queues, topics and subscriptions
- bicepschema / azureterraform / deploy — infrastructure-as-code schemas and deployment
- bestpractices / wellarchitectedframework — design guidance with no subscription access

## Example queries you can run

- "Show me all my resource groups and which ones have no resources in them."
- "Query my Log Analytics workspace for errors in the last hour and group them by service."
- "List the blobs in the documents container and tell me the total size."
- "Which of my Cosmos DB containers have the highest provisioned throughput?"

## Details

- **Recommended model:** anthropic/claude-sonnet-4.5 — The tool surface here is large and the parameters are fiddly — subscription, resource group, tenant. Sonnet 4.5 tracks that context across a conversation instead of re-asking.
- **Transport:** stdio
- **Authentication:** Required — Your existing Azure identity via az login or a managed identity. The agent gets exactly your RBAC permissions — no more, no less.
- **Official source:** [Azure MCP Server — Microsoft Learn documentation](https://learn.microsoft.com/en-us/azure/developer/azure-mcp-server/)

## Connecting to Azure

### Environment variables

- `AZURE_SUBSCRIPTION_ID` — Default subscription for operations. Falls back to your Azure CLI profile if unset.

### Client configuration

**npx, read-only and scoped to a few namespaces**

The recommended starting point. --read-only blocks every write server-side, and limiting namespaces keeps the tool list small enough for reliable selection.

```
{
  "mcpServers": {
    "azure": {
      "command": "npx",
      "args": [
        "-y", "@azure/mcp@latest", "server", "start",
        "--read-only",
        "--namespace", "storage",
        "--namespace", "monitor",
        "--namespace", "group"
      ]
    }
  }
}
```

**Full surface**

Every namespace, writes included. Run az login first — the server uses that identity.

```
{
  "mcpServers": {
    "azure": {
      "command": "npx",
      "args": ["-y", "@azure/mcp@latest", "server", "start"]
    }
  }
}
```

## Frequently asked questions

### What is the Azure MCP Server?

It is Microsoft’s official MCP server for Azure, distributed as @azure/mcp. It exposes more than fifty Azure services — storage, databases, Key Vault, Monitor, AKS, messaging and more — as tools an AI agent can call using your existing Azure credentials.

### Which repository is the real one?

Development happens in github.com/microsoft/mcp, under servers/Azure.Mcp.Server. The older Azure/azure-mcp repository was archived in August 2025, so links pointing there — including many third-party server listings — are out of date.

### How does authentication work?

Through your Azure identity: the CLI login from az login, or a managed identity when running in Azure. Access is enforced by Azure RBAC, so the agent can do exactly what your account can do. There is no separate API key to issue or rotate.

### Can an agent read my Key Vault secrets?

Only with an explicit confirmation. Tools that return secrets, connection strings or certificate private keys trigger an elicitation prompt in your client before they run. The --disable-user-confirmation flag removes that check, which Microsoft recommends against outside trusted automation.

### Should I expose every service at once?

No. The full tool surface is much larger than most models handle reliably, and accuracy drops as the list grows. Use --namespace to expose only the services a given agent actually needs, and add --read-only until you are confident in its behaviour.

---

_Test this server across 40+ models on MCP Playground: https://mcpplaygroundonline.com/mcp-servers/azure — free, no install._
