Claude Code Azure MCP Server Guide

Written by Michael Lip · Solo founder of Zovo · $400K+ on Upwork · 100% JSS Join 50+ builders · More at zovo.one

The Azure MCP server connects Claude Code to your Azure cloud resources through the Model Context Protocol. This guide walks through setup, authentication, and practical usage so Claude Code can manage App Services, Azure Functions, Storage, and other Azure resources directly from your terminal.

The Problem

Azure developers managing cloud infrastructure alongside code changes face constant context switching. The Azure Portal is browser-based, the Azure CLI outputs raw text, and Claude Code has no native Azure awareness. You lose time describing your infrastructure state, copying resource details, and translating between tools.

Quick Solution

  1. Ensure Azure CLI is installed and authenticated:
az login
az account show
  1. Add the Azure MCP server to .claude/settings.json:
{
  "mcpServers": {
    "azure": {
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-server-azure"],
      "env": {
        "AZURE_SUBSCRIPTION_ID": "your-subscription-id",
        "AZURE_RESOURCE_GROUP": "your-resource-group"
      }
    }
  }
}
  1. Restart Claude Code and verify:
claude /mcp
# Should list "azure" with available tools
  1. Test the connection with a resource query:
List all App Services in my resource group

How It Works

The Azure MCP server wraps the Azure SDK for JavaScript, exposing Azure Resource Manager operations as structured tools. When Claude Code starts, it spawns the MCP server process, which authenticates using your local Azure CLI session or environment credentials.

The server exposes tools organized by service: compute (VMs, App Services, Functions), storage (Blob, Table, Queue), networking (VNets, NSGs, Load Balancers), and monitoring (Metrics, Logs, Alerts). Each tool accepts typed parameters and returns structured JSON.

Authentication follows the Azure DefaultAzureCredential chain: environment variables, managed identity, Azure CLI, and then interactive browser. For local development, the Azure CLI credential is the most common path. The MCP server inherits whatever permissions your Azure identity has, so role-based access control (RBAC) governs what Claude Code can do.

Common Issues

DefaultAzureCredential failure: If the MCP server cannot authenticate, ensure az login is current. Check with az account get-access-token to verify your session is valid.

Wrong subscription context: Azure accounts often have multiple subscriptions. Set the correct one with az account set --subscription "name-or-id" and match it in your MCP env config.

Resource group not found: Double-check the resource group name and ensure it exists in the configured subscription. Names are case-insensitive but must match exactly.

Example CLAUDE.md Section

# Azure Cloud Context

## MCP Server
- Azure MCP configured in .claude/settings.json
- Subscription: Production (sub-123)
- Resource Group: rg-webapp-prod
- Region: East US 2

## Infrastructure
- App Service Plan: asp-webapp-prod (P1v3)
- Web App: webapp-api-prod
- Azure Functions: func-workers-prod
- Storage: stwebappprod (Blob + Queue)
- Azure SQL: sql-webapp-prod/db-main
- Application Insights: ai-webapp-prod

## Rules
- NEVER scale down the App Service Plan without approval
- Use deployment slots (staging) before swapping to production
- Storage account is geo-redundant; do not change replication settings
- Always check Application Insights after deployments

Best Practices



I'm a solo developer in Vietnam. 50K Chrome extension users. $500K+ on Upwork. 5 Claude Max subscriptions running agent fleets in parallel. These are my actual CLAUDE.md templates, orchestration configs, and prompts. Not a course. Not theory. The files I copy into every project before I write a line of code. **[See what's inside →](https://zovo.one/lifetime?utm_source=ccg&utm_medium=cta-default&utm_campaign=claude-code-azure-mcp)** $99 once. Free forever. 47/500 founding spots left.

Related Reading

Built by theluckystrike. More at zovo.one