All Azure MCP tools in a single server. The Azure MCP Server implements the MCP specification to create a seamless connection between AI agents and Azure services. Azure MCP Server can be used alone or with the GitHub Copilot for Azure extension in VS Code.
Antigravity stores global configuration at ~/.gemini/config/mcp_config.json. For workspace-only configuration, use .agents/mcp_config.json. For more information, see the Google Antigravity MCP documentation.
Claude Code
The Azure plugin packages the Azure MCP Server along with Azure-related agents and skills, bringing Azure integration to Claude Code in one installation.
Azure MCP Server can also be configured across other IDEs, CLIs, and MCP clients:
Manual setup instructions
Use one of the following options to configure your mcp.json:
Option 1: Configure using .NET tool (dnx)
To use Azure MCP server from .NET, you must have the latest .NET 10 SDK LTS installed. .NET 10 and later adds a command, dnx, which is used to download, install, and run the MCP server from nuget.org.
To verify the .NET version, run the following command in the terminal: dotnet --info
To use Azure MCP server from node one must have Node.js (LTS) installed and available on your system PATH โ this provides both npm and npx. We recommend the latest Node.js LTS version. To verify your installation run: node --version, npm --version, and npx --version.
To use Azure MCP server from Python, you must have uv installed. uv is a fast Python package installer and resolver. To verify your installation run: uv --version and uvx --version.
In a Copilot CLI session, run /mcp add to open the MCP server configuration form.
Fill in the fields:
Field
Value
Server Name
azure-mcp
Server Type
1 (Local)
Command
npx -y @azure/mcp@latest server start
Environment Variables
(leave blank - uses Azure CLI auth)
Tools
*
Alternative Command (using .NET):dotnet dnx Azure.Mcp server start
Press Ctrl+S (or Cmd+S on macOS) to save the server configuration.
Verification
Verify the MCP server is configured by running:
code
/mcp show
You should see output similar to:
code
โ MCP Server Configuration:
โข azure-mcp (local): Command: npx
Total servers: 1
Config file: ~/.copilot/mcp-config.json
Managing MCP Servers
List servers:/mcp show
Remove a server:/mcp remove azure-mcp
Get help:/mcp help
GitHub Copilot SDK Configuration
The GitHub Copilot SDK enables programmatic integration of Azure MCP tools into your applications across multiple languages.
GitHub Copilot SDK snippets
Using GitHub Copilot SDK with Azure MCP
This guide explains how to configure the GitHub Copilot SDK to use Azure MCP (Model Context Protocol) tools for interacting with Azure resources.
Overview
Azure MCP provides a set of tools that enable AI assistants to interact with Azure resources directly. When integrated with the Copilot SDK, you can build applications that leverage natural language to manage Azure subscriptions, resource groups, storage accounts, and more.
package main
import (
"context""fmt""log"
copilot "github.com/github/copilot-sdk/go"
)
funcmain() {
ctx := context.Background()
// Initialize the Copilot client
client, err := copilot.NewClient(copilot.ClientOptions{
CLIArgs: []string{
"--allow-all-tools",
"--allow-all-paths",
},
})
if err != nil {
log.Fatal(err)
}
if err := client.Start(ctx); err != nil {
log.Fatal(err)
}
defer client.Stop(ctx)
// Configure Azure MCP server in session config
azureMcpConfig := map[string]copilot.MCPServerConfig{
"azure-mcp": {
Type: "local",
Command: "npx",
Args: []string{"-y", "@azure/mcp@latest", "server", "start"},
Tools: []string{"*"}, // Enable all Azure MCP tools
},
}
// Create session with MCP servers
session, err := client.CreateSession(ctx, copilot.SessionConfig{
Model: "gpt-4.1", // Default model; BYOK can override
Streaming: true,
MCPServers: azureMcpConfig,
})
if err != nil {
log.Fatal(err)
}
// Handle events
session.OnEvent(func(event copilot.SessionEvent) {
switch event.Type {
case copilot.AssistantMessageDelta:
if event.Data.DeltaContent != "" {
fmt.Print(event.Data.DeltaContent)
}
case copilot.ToolExecutionStart:
fmt.Printf("\n[TOOL: %s]\n", event.Data.ToolName)
}
})
// Send prompt
err = session.SendAndWait(ctx, copilot.Message{
Prompt: "List all resource groups in my Azure subscription",
})
if err != nil {
log.Fatal(err)
}
}
.NET
Installation
bash
dotnet add package GitHub.Copilot.SDK
Configuration (C#)
csharp
using GitHub.Copilot.SDK;
using GitHub.Copilot.SDK.Models;
classProgram
{
staticasync Task Main(string[] args)
{
// Initialize the Copilot clientvar client = new CopilotClient(new CopilotClientOptions
{
CliArgs = new[] { "--allow-all-tools", "--allow-all-paths" }
});
await client.StartAsync();
// Configure Azure MCP server in session configvar azureMcpConfig = new Dictionary<string, MCPServerConfig>
{
["azure-mcp"] = new MCPServerConfig
{
Type = "local",
Command = "npx",
Args = new[] { "-y", "@azure/mcp@latest", "server", "start" },
Tools = new[] { "*" } // Enable all Azure MCP tools
}
};
// Create session with MCP serversvar session = await client.CreateSessionAsync(new SessionConfig
{
Model = "gpt-4.1", // Default model; BYOK can override
Streaming = true,
McpServers = azureMcpConfig
});
// Handle events
session.OnEvent += (sender, e) =>
{
switch (e.Type)
{
case SessionEventType.AssistantMessageDelta:
if (!string.IsNullOrEmpty(e.Data?.DeltaContent))
{
Console.Write(e.Data.DeltaContent);
}
break;
case SessionEventType.ToolExecutionStart:
Console.WriteLine($"\n[TOOL: {e.Data?.ToolName}]");
break;
}
};
// Send promptawait session.SendAndWaitAsync(new Message
{
Prompt = "List all resource groups in my Azure subscription"
});
await client.StopAsync();
}
}
Note: If startup is slow, use a pinned version (@azure/mcp@2.0.0-beta.13 instead of @latest) or install globally (npm install -g @azure/mcp@latest).
Package Manager
Package manager installation offers several advantages over IDE-specific setup, including centralized dependency management, CI/CD integration, support for headless/server environments, version control, and project portability.
Run the Azure MCP server as a Docker container for easy deployment and isolation. The container image is available at mcr.microsoft.com/azure-sdk/azure-mcp.
MCP Bundles (.mcpb) are portable versions of MCP servers that can be installed directly into clients like Claude Desktop. We produce an .mcpb file for each supported platform (Windows, macOS, Linux) and architecture (x64, ARM64). The .mcpb file contains the server binary and all dependencies, so it can be installed without Node.js or .NET.
MCPB installation instructions
Download
Download the .mcpb file for your platform/architecture from Assets section of the latest release in our GitHub Releases page:
Windows
macOS
Linux
x64
Azure.Mcp.Server-win-x64.mcpb
Azure.Mcp.Server-osx-x64.mcpb
Azure.Mcp.Server-linux-x64.mcpb
ARM64
Azure.Mcp.Server-win-arm64.mcpb
Azure.Mcp.Server-osx-arm64.mcpb
Azure.Mcp.Server-linux-arm64.mcpb
Install
Claude Desktop
Option 1 (Recommended): Drag the downloaded .mcpb file into the Claude Desktop app window to install it. This is the easiest method โ .
Option 2:
Open the hamburger menu on the top left of the Claude Desktop app.
Go to File > Settings > Extensions > Advanced Settings > Install Extension
Select the downloaded .mcpb file and click Preview.
Click Install in the preview window to add the Azure MCP Server to Claude Desktop.
Option 3: Set Claude Desktop to be the default application for .mcpb files on your computer. Then, double-click on the downloaded .mcpb file and Claude Desktop will automatically install the bundle.
Remote Setup
Host the Azure MCP Server as a remote endpoint when your client requires HTTP-based MCP servers (for example, Microsoft Foundry and Microsoft Copilot Studio) or when you want to share a single deployment across users and environments. The server can be self-hosted on Azure Container Apps.
See the remote hosting azd templates for deployment options.
Usage
Getting Started
Open GitHub Copilot in VS Code or IntelliJ and switch to Agent mode.
Click refresh on the tools list
You should see the Azure MCP Server in the list of tools
Try a prompt that tells the agent to use the Azure MCP Server, such as List my Azure Storage containers
The agent should be able to use the Azure MCP Server tools to complete your query
See our official documentation on learn.microsoft.com to learn how to use the Azure MCP Server to interact with Azure resources through natural language commands from AI agents and other types of clients.
For additional command documentation and examples, see Azure MCP Commands.
Use Prompt Templates to set tenant and subscription context once at the beginning of your Copilot session, avoiding repetitive information in subsequent prompts.
Feedback and Support
Check the Troubleshooting guide to diagnose and resolve common issues with the Azure MCP Server.
Review the Known Issues for current limitations and workarounds.
For advanced troubleshooting, you can enable support logging using the --dangerously-write-support-logs-to-dir option.
We're building this in the open. Your feedback is much appreciated, and will help us shape the future of the Azure MCP server.
๐ Open an issue in the public GitHub repository โ weโd love to hear from you!
Security
Your credentials are always handled securely through the official Azure Identity SDK - we never store or manage tokens directly.
MCP as a phenomenon is very novel and cutting-edge. As with all new technology standards, consider doing a security review to ensure any systems that integrate with MCP servers follow all regulations and standards your system is expected to adhere to. This includes not only the Azure MCP Server, but any MCP client/agent that you choose to implement down to the model provider.
You should follow Microsoft security guidance for MCP servers, including enabling Entra ID authentication, secure token management, and network isolation. Refer to Microsoft Security Documentation for details.
Permissions and Risk
MCP clients can invoke operations based on the userโs Azure RBAC permissions. Autonomous or misconfigured clients may perform destructive actions. You should review and apply least-privilege RBAC roles and implement safeguards before deployment. Certain safeguards, such as flags to prevent destructive operations, are not standardized in the MCP specification and may not be supported by all clients.
Data Collection
The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Telemetry Configuration
Telemetry collection is on by default. The server supports two telemetry streams:
User-provided telemetry: If you configure your own Application Insights connection string via the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable, telemetry will be sent to your Application Insights resource.
Microsoft telemetry: By default, telemetry is also sent to Microsoft to help improve the product. This can be disabled separately from user-provided telemetry. See Disabling All Telemetry section below for more details.
Disabling All Telemetry
To disable all telemetry collection (both user-provided and Microsoft), set the environment variable AZURE_MCP_COLLECT_TELEMETRY to false:
bash
export AZURE_MCP_COLLECT_TELEMETRY=false
Disabling Microsoft Telemetry Only
To disable only Microsoft telemetry collection while keeping your own Application Insights telemetry active, set the environment variable AZURE_MCP_COLLECT_TELEMETRY_MICROSOFT to false:
This MCP server may interact with clients and services outside Microsoft compliance boundaries. You are responsible for ensuring that any integration complies with applicable organizational, regulatory, and contractual requirements.
Third Party Components
This MCP server may use or depend on third party components. You are responsible for reviewing and complying with the licenses and security posture of any third-party components.
Export Control
Use of this software must comply with all applicable export laws and regulations, including U.S. Export Administration Regulations and local jurisdiction requirements.
No Warranty / Limitation of Liability
This software is provided โas isโ without warranties or conditions of any kind, either express or implied. Microsoft shall not be liable for any damages arising from use, misuse, or misconfiguration of this software.
Contributing
We welcome contributions to the Azure MCP Server! Whether you're fixing bugs, adding new features, or improving documentation, your contributions are welcome.