[!IMPORTANT]
🚀 Development efforts have migrated to the official repository: microsoft/mcp starting August 25, 2025.
🌟 Azure Model Context Protocol (MCP) Handler for Azure
This component implements the MCP standard to bridge AI entities with the entirety of Azure services. It is fully compatible for standalone operation or integration with the GitHub Copilot for Azure extension within the VS Code ecosystem. Note that this functionality is currently in Public Preview; expect API changes before General Availability.
[!WARNING]
Transport Mode Sunset: Server-Sent Events (SSE) transport is deprecated and removed as of build 0.4.0 (2025-07-15).
SSE was retired on March 26, 2025, due to inherent security concerns and architectural deficiencies (read the rationale here). All consumers must transition to the modern HTTP streaming interface and update to version 0.4.0 or later to maintain active connectivity with contemporary MCP clients.
- Install your preferred VS Code distribution:
- 💫 Stable Build
- 🔮 Insiders Build
- Install necessary extensions:
- GitHub Copilot
- GitHub Copilot Chat
- Install the core management extension:
- Azure MCP Server Extension
- Launch GitHub Copilot within VS Code and activate Agent mode.
- Refresh the available tools listing.
- The Azure MCP Handler should now appear in the inventory.
- Execute a command requesting Azure data, for instance:
Retrieve all my Azure Storage accounts.
- The agent should successfully leverage this handler to fulfill the request.
- Consult the comprehensive official documentation and review the FAQ/Troubleshooting document.
- We are developing this openly and value community input to guide future enhancements.
The Azure MCP Handler empowers your AI agents with direct access to Azure context, enabling sophisticated actions such as:
- Query for existing indexes within the Azure AI Search service named 'mysvc'.
- Execute a data search against a specified index using custom query terms.
- Generate a list of all configured App Configuration instances.
- Fetch key-value pairs stored within an App Config service.
- Enumerate all active Azure Container Registries under the subscription.
- Filter and display container registries residing in the 'myproject' resource group.
- List all image repositories managed by the registries.
- Retrieve a directory of AKS clusters provisioned in the current subscription.
- Display all registered Azure Kubernetes Service instances.
- Report on all databases associated with Cosmos DB accounts.
- List data containers present within a specific Cosmos DB database.
- Retrieve a catalog of Azure Data Explorer clusters.
- Obtain the schema definition for a designated table.
- Fetch a small sample set of rows from a specified table within a database.
- List all AMLFS clusters within a designated resource group.
- Calculate the requisite number of IP addresses needed for provisioning a 128 TiB AMLFS 500 cluster.
- Execute arbitrary KQL queries against Log Analytics workspaces.
- List all resource groups defined in the tenant scope.
- Retrieve configuration details for Azure CDN endpoints.
- Generate boilerplate Azure deployment instructions for Node.js applications.
- Fetch comprehensive property details for an Azure SQL Database named 'mydb'.
- List all SQL Servers hosting databases within the subscription.
- List existing firewall access rules applied to a specified SQL Server instance.
- Enumerate all elastic database pools associated with a SQL Server.
- Detail the Active Directory administrators configured for a SQL Server.
- List all active Azure Storage accounts.
- Fetch detailed configuration for the storage account named 'mystorageaccount'.
- Initiate the creation of a new storage account in East US, enabling Data Lake storage.
- Retrieve a manifest of tables associated with a storage account.
- Get metadata for a specific blob container.
- Initiate an upload operation for a local file into a specified blob container.
- Enumerate the file paths within a Data Lake file system.
- List contents (files/directories) of an Azure File Share.
- Send a message payload to a designated storage queue.
Detailed listing of Azure services exposed via this MCP Handler
### 🔎 Azure AI Search (Indexing/Vector Operations)
* Service enumeration.
* Index structure inspection and configuration review.
* Direct index querying capabilities.
### ⚙️ Azure App Configuration
* Store enumeration.
* Key-Value pair CRUD operations.
* Management of labeled configurations.
* Configuration setting locking mechanisms.
### 🛡️ Azure Best Practices Engine
* Retrieval of hardened, production-ready Azure SDK coding patterns for AI generation.
### 🖥️ Azure CLI Bridge
* Direct execution proxy for arbitrary Azure CLI commands.
* Full coverage of all Azure CLI features.
### 📦 Azure Container Registry (ACR)
* Subscription-level listing of registries and associated repositories.
* Filtering by resource group.
* Standardized JSON result formatting.
* Cross-environment operational support.
### 📊 Azure Cosmos DB (Multi-Model Persistence)
* Account listing.
* Database enumeration and query functionality.
* Container and item lifecycle management.
* SQL query execution against container data.
### 🧮 Azure Data Explorer (KQL Execution)
* Cluster discovery.
* Database listing.
* Table inventory.
* Table schema retrieval.
* Data sampling.
* Kusto Query Language (KQL) execution endpoint.
### 🐬 Azure Database for MySQL - Flexible Server
* Database enumeration and querying.
* Schema retrieval for tables.
* Server parameter and configuration inspection/modification.
### 🐘 Azure Database for PostgreSQL - Flexible Server
* Database enumeration and querying.
* Schema retrieval for tables.
* Server parameter and configuration inspection/modification.
### 🛠️ Azure Developer CLI (azd) Extension
* Direct command execution support for `azd`.
* Template cataloging, initialization, infrastructure provisioning, and deployment pipeline management.
* Cross-platform compatibility.
### 🚀 Azure Deployment Planner (azd)
* Generation of visual architecture diagrams from source code assets.
* Creation of deployment manifests for provisioning actions.
* Log retrieval for specific `azd` environments.
* Generation rules for Bicep or Terraform artifacts.
* Guidelines for establishing GitHub CI/CD workflows.
### 🧮 Azure Foundry
* Model catalog retrieval.
* Model deployment orchestration.
* Deployment status tracking.
* Knowledge index listings.
### ☁️ Azure Function App
* Listing of deployed Function Apps.
* Retrieval of detailed runtime settings for a specific app.
### 🔑 Azure Key Vault
* Certificate management (listing, creation, import).
* Key management (listing, creation).
* Secret management (listing, creation).
### ☸️ Azure Kubernetes Service (AKS)
* Listing of all provisioned AKS clusters.
### 📦 Azure Load Testing
* Load test resource discovery and creation.
* Test run configuration and initiation/re-initiation.
* Test run status retrieval and updates.
### 🚀 Azure Managed Grafana
* Enumeration of Grafana instances.
### ⚡ Azure Managed Lustre
* Filesystem inventory.
* SKU/Size-based IP address requirement calculation for AMLFS setups.
### 🏪 Azure Marketplace
* Retrieval of metadata for Marketplace offerings.
### 📈 Azure Monitor
#### Log Analytics
* Workspace listing.
* KQL query execution interface.
* Available table enumeration.
#### Health Models
* Entity health status reporting.
#### Metrics Stream
* Time-series metric queries across resources.
* Discovery of available metric definitions per resource.
### 🏥 Azure Service Health
* Current operational status for specific resources.
* Aggregated availability status across subscriptions or groups.
### ⚙️ Azure Native ISV Integrations
* Listing of resources monitored by external ISV providers (e.g., Datadog).
### 🛡️ Azure Quick Review CLI Bridge
* Compliance scanning utility for resource configurations against best practices.
### 📊 Azure Quota Management
* Listing of available Azure geographic regions.
* Reporting on current quota consumption versus limits.
### 🔴 Azure Redis Cache
* Redis Cluster enumeration.
* Database listing within clusters.
* Standard Redis Cache instance listing.
* Access policy retrieval for caches.
### 🏗️ Azure Resource Groups
* Resource group inventory.
### 🎭 Azure Role-Based Access Control (RBAC)
* Listing of current role assignments.
### 🚌 Azure Service Bus
* Inspection of properties and runtime states for queues, topics, and subscriptions.
### 🗄️ Azure SQL Database Details
* Retrieval of specific database configuration details.
* Full listing of databases within a server context.
* SQL server firewall rule enumeration.
### 🗄️ Azure SQL Elastic Pool Configuration
* Listing of elastic pools managed by a SQL Server.
### 🗄️ Azure SQL Server Infrastructure
* Listing of Microsoft Entra ID authentication administrators for SQL Servers.
### 💾 Azure Storage Services
* Storage account lifecycle management (creation/listing).
* Detailed storage account property retrieval.
* Blob container and blob management (listing, metadata operations).
* Blob upload utility.
* Storage table listing and query interface.
* Data Lake file system path enumeration.
* File Share item listing.
* Storage queue messaging.
### 📋 Azure Subscription Directory
* Listing all accessible Azure subscriptions.
### 🏗️ Azure Terraform Best Practices
* Retrieval of production-grade Terraform patterns for infrastructure deployment.
### 🖥️ Azure Virtual Desktop (AVD)
* Host pool inventory.
* Session host enumeration within pools.
* User session status per host.
### 📊 Azure Workbooks
* Workbook inventory within resource scopes.
* Capability to generate new workbooks via configuration.
* Updating existing workbook definitions.
* Metadata fetching for workbooks.
* Decommissioning workbooks.
### 🏗️ Bicep Definition Utility
* Retrieval of Bicep JSON schema for specified Azure resource types.
### 🏗️ Cloud Architecture Assistant
* Guided process for generating recommended Azure cloud designs.
Agents and models gain awareness of best practices documentation for the `azd` toolset: See [AZD Best Practices](https://github.com/Azure/azure-mcp/tree/main/areas/extension/src/AzureMcp.Extension/Resources/azd-best-practices.txt).
For exhaustive documentation on individual commands and usage examples, refer to [Azure MCP Command Reference](https://github.com/Azure/azure-mcp/blob/main/docs/azmcp-commands.md).
## 🔄️ Updating the Handler
Procedures for ensuring the Azure MCP Server is running the latest release
#### NPX Execution
If configured to use the dynamic spec `@azure/mcp@latest`, `npx` checks for updates on every server initialization. Using the bare `@azure/mcp` package relies on the local cache until explicitly cleared.
#### NPM Global Installation
When installed globally via `npm install -g @azure/mcp`, updates require an explicit command: `npm update -g @azure/mcp`.
#### Docker Container
Docker images do not auto-update. To synchronize, pull the freshest image from the repository and re-execute the [container setup steps](#docker-install-steps-optional).
#### VS Code Integration
If the server was initiated via `npx` with the `@azure/mcp@latest` argument during VS Code startup, updates are checked automatically upon server launch. Docker containers utilized within VS Code face the same static version constraint as described above.
## ⚙️ Advanced Deployment Configurations (Optional)
Instructions for Docker, custom clients, and manual setup methods
### 🐋 Docker Image Deployment (Optional)
Microsoft maintains the official Azure MCP Server image on the [Microsoft Artifact Registry](https://mcr.microsoft.com/artifact/mar/azure-sdk/azure-mcp).
Follow these steps for Docker deployment:
1. Establish an `.env` file containing necessary environment variables, typically mirroring a [DefaultAzureCredential](https://learn.microsoft.com/dotnet/api/azure.identity.environmentcredential) configuration (e.g., Service Principal details):
bash
AZURE_TENANT_ID={YOUR_AZURE_TENANT_ID}
AZURE_CLIENT_ID={YOUR_AZURE_CLIENT_ID}
AZURE_CLIENT_SECRET={YOUR_AZURE_CLIENT_SECRET}
2. Modify or create the `.vscode/mcp.json` configuration file. Substitute `/full/path/to/.env` with the absolute path to your secrets file.
{
"servers": {
"Azure MCP Server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--env-file",
"/full/path/to/.env"
"mcr.microsoft.com/azure-sdk/azure-mcp:latest",
]
}
}
}
Authentication data can also be passed using `--env` or `--volume` flags for stricter isolation.
### 🤖 Custom MCP Client Integration (Optional)
Integrate this server into your proprietary MCP client by launching it via standard input/output streams using:
bash
npx -y @azure/mcp@latest server start
### 🔧 Manual Configuration (Optional)
For direct invocation without VS Code integration automation:
1. Configure `.vscode/mcp.json` to use `npx`:
{
"servers": {
"Azure MCP Server": {
"command": "npx",
"args": [
"-y",
"@azure/mcp@latest",
"server",
"start"
]
}
}
}
2. Alternatively, use a `--namespace` flag to load a specific service handler (e.g., for Best Practices):
{
"servers": {
"Azure Best Practices": {
"command": "npx",
"args": [
"-y",
"@azure/mcp@latest",
"server",
"start",
"--namespace",
"bestpractices" // Referencing any available MCP server namespace.
]
}
}
}
Comprehensive guides for end-to-end MCP agent workflows are forthcoming.
## Data Collection Transparency
Telemetry regarding your usage of this software is collected and transmitted to Microsoft to facilitate service provision and product enhancement. Telemetry opt-out instructions are available within the repository documentation. Furthermore, certain features might enable data collection from end-users of applications built using this software; in such cases, compliance with all relevant legislation, including explicit user notifications and provision of Microsoft's [privacy statement](https://www.microsoft.com/privacy/privacystatement), is mandatory. Continued use of this software implies consent to these data practices.
### Telemetry Control
By default, telemetry collection is active.
To disable this feature, set the environment variable `AZURE_MCP_COLLECT_TELEMETRY` to the string `false`.
## 📝 Troubleshooting Guide
Consult the [Troubleshooting documentation](https://github.com/Azure/azure-mcp/blob/main/TROUBLESHOOTING.md#128-tool-limit-issue) for resolutions to frequent operational problems and logging procedures.
### 🔑 Credential Management
Authentication flow details, required RBAC roles, credential troubleshooting, and production setups
The Azure MCP Handler leverages the .NET Azure Identity library for seamless Microsoft Entra ID integration. Review [Authentication Fundamentals](https://github.com/Azure/azure-mcp/blob/main/docs/Authentication.md#authentication-fundamentals) for in-depth context.
If authorization failures occur, consult the dedicated [troubleshooting section](https://github.com/Azure/azure-mcp/blob/main/TROUBLESHOOTING.md#authentication).
For sophisticated enterprise requirements, including network segmentation, security mandates, and restricted access environments, refer to [Enterprise Authentication Guide](https://github.com/Azure/azure-mcp/blob/main/docs/Authentication.md#authentication-scenarios-in-enterprise-environments).
## 🛡️ Security Advisory
All credential handling is secured via the official [Azure Identity SDK](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/identity/Azure.Identity/README.md)—**tokens are never stored or managed internally.**
The MCP paradigm is emergent technology. We strongly advise performing a thorough security audit on any system interfacing with MCP servers to ensure adherence to all relevant regulatory standards, covering both the Azure MCP Handler and the consuming AI agent/model provider.
## 👥 Community Participation
Contributions to the Azure MCP Handler are actively encouraged, encompassing bug fixes, feature additions, and documentation refinement.
Please adhere to our [Contribution Guidelines](https://github.com/Azure/azure-mcp/blob/main/CONTRIBUTING.md) for instructions on:
* 🛠️ Setting up the development environment.
* ✨ Implementing novel functionality.
* 📝 Style guides and necessary testing protocols.
* 🔄 Submitting Pull Requests.
## 🤝 Code of Conduct Adherence
This project operates under the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). Direct inquiries or concerns should be sent to [open@microsoft.com](mailto:open@microsoft.com) or reviewed via the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/).
WIKIPEDIA: Cloud computing is "a paradigm for enabling network access to a scalable and elastic pool of shareable physical or virtual resources with self-service provisioning and administration on-demand," according to ISO. It is commonly referred to as "the cloud".
== Characteristics ==
In 2011, the National Institute of Standards and Technology (NIST) identified five "essential characteristics" for cloud systems. Below are the exact definitions according to NIST:
On-demand self-service: "A consumer can unilaterally provision computing capabilities, such as server time and network storage, as needed automatically without requiring human interaction with each service provider."
Broad network access: "Capabilities are available over the network and accessed through standard mechanisms that promote use by heterogeneous thin or thick client platforms (e.g., mobile phones, tablets, laptops, and workstations)."
Resource pooling: " The provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to consumer demand."
Rapid elasticity: "Capabilities can be elastically provisioned and released, in some cases automatically, to scale rapidly outward and inward commensurate with demand. To the consumer, the capabilities available for provisioning often appear unlimited and can be appropriated in any quantity at any time."
Measured service: "Cloud systems automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, providing transparency for both the provider and consumer of the utilized service.
By 2023, the International Organization for Standardization (ISO) had expanded and refined the list.
== History ==
The history of cloud computing extends to the 1960s, with the initial concepts of time-sharing becoming popularized via remote job entry (RJE). The "data center" model, where users submitted jobs to operators to run on mainframes, was predominantly used during this era. This was a time of exploration and experimentation with ways to make large-scale computing power available to more users through time-sharing, optimizing the infrastructure, platform, and applications, and increasing efficiency for end users.
The "cloud" metaphor for virtualized services dates to 1994, when it was used by General Magic for the universe of "places" that mobile agents in the Telescript environment could "go". The metaphor is credited to David Hoffman, a General Magic communications specialist, based on its long-standing use in networking and telecom. The expression cloud computing became more widely known in 1996 when Compaq Computer Corporation drew up a business plan for future computing and the Internet. The company's ambition was to superch