home / mcp / azure mcp server

Azure MCP Server

A Model Context Protocol (MCP) implementation that enables Claude Desktop to interact with Azure services. This integration allows Claude to query and manage Azure resources directly through natural language conversations.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "kalivaraprasad-gonapa-azure-mcp": {
      "command": "tsx",
      "args": [
        "C:/Users/[YourUsername]/path/to/azure-mcp/src/launcher.ts"
      ]
    }
  }
}

You can connect Claude Desktop to Azure resources through a Model Context Protocol (MCP) server, enabling natural-language conversations to query and manage Azure subscriptions, tenants, and resources with automatic authentication and robust error handling.

How to use

You interact with the MCP server by running Claude Desktop and engaging in a natural-language chat. Ask questions like which Azure tenants and subscriptions are available, list resource groups in a subscription, or show virtual machines in a specific resource group. The MCP server authenticates automatically using a flexible DefaultAzureCredential chain, so you don’t have to enter credentials manually for every session. If an initial attempt fails, it will retry transient errors and return clean, Claude-friendly responses.

To switch between multiple Azure tenants or subscriptions, use the provided tenant selection and subscription listing features within Claude Desktop so you can specify which scope you want to work with before issuing resource- or subscription-related queries.

How to install

Prerequisites: install these on your system before proceeding.

- Node.js (v18 or higher)

- Claude Desktop application

- Azure account with appropriate permissions

- Azure CLI (optional, for CLI-based authentication)

Step-by-step setup and configuration are provided below. Follow each block exactly as written to ensure the MCP server integrates correctly with Claude Desktop.

git clone https://github.com/Streen9/azure-mcp.git
cd azure-mcp

npm install

# Configure Claude Desktop with the MCP server entries
# Add a configuration snippet below to claude_desktop_config.json (see the example in the next block)
{
  "mcpServers": {
    "sequential-thinking": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sequential-thinking"
      ]
    },
    "azure": {
      "command": "tsx",
      "args": [
        "C:/Users/[YourUsername]/path/to/azure-mcp/src/launcher.ts"
      ]
    }
  }
}

Configuration and usage notes

The Azure MCP server uses DefaultAzureCredential to support multiple authentication methods. It will automatically try Environment Variables, Managed Identity, Azure CLI, Visual Studio Code credentials, and Interactive Browser authentication in sequence until one succeeds. You do not need to specify credentials in advance unless you are using a specific flow that requires environment variables or a service principal.

When starting Claude Desktop after configuring the MCP entries, you can begin asking Azure-related questions. If the session cannot determine a tenant or subscription, use the provided tools to select a tenant or list subscriptions.

Additional sections

Security and credentials: this implementation avoids hardcoded credentials and relies on a secure credential chain. If you encounter authentication problems, verify you are logged in via Azure CLI with az login, or check your environment variable setup if you are using a service principal.

Troubleshooting tips: if you see errors such as NO_TENANT or CODE_EXECUTION_FAILED, re-check tenant selection, ensure proper initialization, and confirm your Azure permissions and network connectivity.

Project structure and components: the core pieces include the MCP server that handles the protocol, a tool handler, and retry logic to handle transient failures. This setup provides clean, structured responses suitable for Claude Desktop.

Available tools

AzureMCPServer

Main server class implementing the MCP protocol and handling Azure resource authentication, subscription and tenant management.

HandleCallTool

Processes incoming MCP tool requests and routes them to appropriate Azure service calls.

ExecuteWithRetry

Implements retry logic for transient failures during Azure API calls.