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.
In this quickstart, you learn how to connect the Azure Model Context Protocol (MCP) Server to the GitHub Copilot CLI. This integration allows GitHub Copilot to interact with your Azure resources directly from your terminal.
Prerequisites
- GitHub Copilot CLI installed.
- Azure CLI installed and authenticated (
az login). - Node.js installed (for running the server via
npx).
Sign in to Azure MCP Server for local development
Azure MCP Server authenticates to Microsoft Entra ID using the Azure Identity library for .NET. The server supports two authentication modes:
- Broker mode: Uses your operating system's native authentication (like Windows Web Account Manager) with
InteractiveBrowserCredential. - Credential chain mode: Tries multiple authentication methods in sequence: environment variables, Visual Studio Code, Visual Studio, Azure CLI, Azure PowerShell, Azure Developer CLI, and interactive browser authentication.
Sign in using any of these methods:
- Open the Command Palette (
Ctrl+Shift+PorCmd+Shift+Pon Mac). - Run Azure: Sign In and follow the prompts.
After signing in, Azure MCP Server can authenticate and run operations on Azure services based on your permissions.
Add Azure MCP Server
The GitHub Copilot CLI supports MCP servers through the /mcp command family.
Open your terminal.
Start the GitHub Copilot CLI in interactive mode:
copilotIn the interactive session, run the following command to open the MCP server configuration form:
/mcp addFill in the configuration fields with the following values:
Field Value Server Name azure-mcpServer Type 1(Local)Command npx -y @azure/mcp@latest server startEnvironment Variables (leave blank - utilizes Azure CLI authentication) Tools *Note
If you prefer using .NET, set the Command to
dotnet dnx -p Azure.Mcp server start.Press Ctrl+S (or Cmd+S on macOS) to save the server configuration.
When you've finished, press
escto close the server configuration.
Verify the connection
Confirm that you configured the Azure MCP Server correctly and that the GitHub Copilot CLI recognizes it:
In your Copilot CLI session, run:
/mcp showReview the output. You should see
azure-mcplisted in the configuration:● MCP Server Configuration: • azure-mcp (local): Command: npx Total servers: 1 Config file: ~/.copilot/mcp-config.json
Use Azure MCP Server
Once connected, you can use natural language to interact with your Azure resources.
In the GitHub Copilot CLI session, type a prompt that requires Azure context. For example:
> List my Azure resource groups.GitHub Copilot identifies the intent and uses the
azure-mcptools to fetch the information. It prints a response listing your Azure resource groups, similar to:I found the following resource groups in your subscription: - **my-resource-group-1** (East US) - **dev-environment** (West Europe) - **production-app** (Central US)
Manage MCP servers
Manage your configured MCP servers using the following commands:
- List servers:
/mcp show - Remove a server:
/mcp remove azure-mcp - Get help:
/mcp help
Next steps
- Learn more about GitHub Copilot CLI.
- Explore Azure MCP Server capabilities.