Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Azure MCP Server uses the Model Context Protocol (MCP) to standardize integrations between AI apps and external tools and data sources, allowing for AI systems to perform operations that are context-aware of your Azure resources.
In this article, you learn how to complete the following tasks:
- Install and authenticate to the Azure MCP Server
- Connect to Azure MCP Server using Windsurf's AI-powered development environment
- Run prompts to test Azure MCP Server operations and interact with Azure resources
Prerequisites
- An Azure account with an active subscription
- Cursor installed
- Node.js LTS installed
Install the Azure MCP Server
To install and configure Azure MCP Server in Windsurf:
Navigate to File > Preferences > Windsurf Settings.
On the Windsurf Settings page, select Manage MCPs.
On the Manage MCP Servers settings page, select View raw config at the top to open the
mcp_config.jsonfile for editing.The
mcp_config.jsonfile lets you manually install MCP Servers by adding a JSON configuration object. Update themcp_config.jsonfile to match the following:{ "mcpServers": { "Azure MCP Server": { "command": "npx", "args": [ "-y", "@azure/mcp@latest", "server", "start" ] } } }
Authenticate to Azure
Azure MCP Server provides a seamless authentication experience using Azure accounts and Microsoft Entra ID. To use Azure MCP Server, you must first authenticate to Azure using local development tools such as the Azure CLI, Azure Developer CLI, Visual Studio, or Visual Studio Code. Azure MCP Server automatically discovers your credentials from these tools and uses them to authenticate to Azure services.
For example, to sign in using the Azure CLI:
az loginVerify your authentication status by running the following command to see which account and subscription you're currently signed in with:
az account showEnsure your user account has the appropriate role assignments for the Azure services you want to interact with. The Azure resources you intend to access with Azure MCP Server must already exist within your Azure subscription. For example, common role assignments include:
- Blob Storage Data Contributor - Read and write blob data in storage accounts.
- Storage Account Contributor - Manage storage account configurations.
- Contributor - General resource management across your subscription.
- Reader - Read-only access to Azure resources.
For more information about role assignments and local development authentication, see Authenticate .NET apps to Azure services during local development.
Use prompts to test the Azure MCP Server
Open Windsurf's AI chat interface by pressing
Ctrl+Lor clicking the chat icon in the sidebar.Enter a prompt that utilizes Azure MCP Server capabilities, such as:
List my Azure storage accountsIf you're prompted to authenticate to Azure, run the suggested auth tool to sign-in through the browser.
Note
Windsurf doesn't prompt you to sign in to Azure if you're already authenticated via other local tooling such as the Azure CLI.
Windsurf prompts you to run a tool to retrieve the storage accounts, such as
storage account list. Select Run tool to continue.The output should resemble the following text:
The following resource groups are available for your subscription: 1. **DefaultResourceGroup-EUS** (Location: `eastus`) 2. **rg-testing** (Location: `centralus`) 3. **rg-azd** (Location: `eastus2`) 4. **msdocs-sample** (Location: `southcentralus`) 5. **ai-testing** (Location: `eastus2`) Let me know if you need further details or actions related to any of these resource groups!Explore more Azure MCP operations using other relevant prompts, such as:
List all of the storage accounts in my subscription Get the available tables in my storage accounts Show me the configuration of my App Service instances