Tool that enables AI to access and manage Azure cloud services like Azure Storage, Cosmos DB and more
The Azure MCP Server implements the MCP specification to create a seamless connection between AI agents and key Azure services like Azure Storage, Cosmos DB, and more.
Please note that this project is in Public Preview and implementation may significantly change prior to our General Availability.
The Azure MCP Server supercharges your agents with Azure context. Here are some cool prompts you can try:
The Azure MCP Server creates a seamless integration between AI agents and Azure services through:
The Azure MCP Server provides tools for interacting with the following Azure services:
Agents and models can discover and learn best practices and usage guidelines for the azd
MCP tool. For more information, see AZD Best Practices.
For detailed command documentation and examples, see Azure MCP Commands.
The Azure MCP Server requires Node.js to install and run the server. If you don't have it installed, follow the instructions here.
The Azure MCP Server provides Azure SDK and Azure CLI developer tools. It can be used alone or with the GitHub Copilot for Azure extension in VS Code. If you're interested in broad developer support across a variety of Azure development scenarios not included in the Azure MCP Server, such as searching documentation on Microsoft Learn, we recommend this extension as well.
node
and npm
are in your pathHere's a short (16 seconds) video to help you get the Azure MCP Server installed in VS Code.
https://github.com/user-attachments/assets/535f393c-0ed2-479d-9b24-5ca933293c92
Click one of these buttons to install the Azure MCP Server for VS Code or VS Code Insiders.
You might get prompted to open the link with VS Code and then select "Install Server".
Once you've installed the Azure MCP Server, make sure you select GitHub Copilot Agent Mode and refresh the tools list. To learn more about Agent Mode, visit the VS Code Documentation.
For a step-by-step installation, follow these instructions:
.vscode/mcp.json
:{
"servers": {
"Azure MCP Server": {
"command": "npx",
"args": [
"-y",
"@azure/mcp@latest",
"server",
"start"
]
}
}
}
For a step-by-step installation, follow these instructions:
docker build -t azure/azuremcp .
.env
file with environment variables that match one of the EnvironmentCredential
sets. For example, a .env
file using a service principal could look like:AZURE_TENANT_ID={YOUR_AZURE_TENANT_ID}
AZURE_CLIENT_ID={YOUR_AZURE_CLIENT_ID}
AZURE_CLIENT_SECRET={YOUR_AZURE_CLIENT_SECRET}
.vscode/mcp.json
or update existing MCP configuration. Replace /full/path/to/.env
with a path to your .env
file.{
"servers": {
"Azure MCP Server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"azure/azuremcp",
"--env-file",
"/full/path/to/.env"
]
}
}
}
Optionally, customers can use --env
or --volume
to pass authentication values.
If you use the default package spec of @azure/mcp@latest
, npx will look for a new version on each server start. If you use just @azure/mcp
, npx will continue to use its cached version until its cache is cleared.
If you globally install the cli via npm install -g @azure/mcp
it will use the installed version until you manually update it with npm update -g @azure/mcp
.
There is no version update built into the docker image. To update, just pull the latest from the repo and repeat the docker installation instructions.
Installation in VS Code should be in one of the previous forms and the update instructions are the same. If you installed the mcp server with the npx
command and -y @azure/mcp@latest
args, npx will check for package updates each time VS Code starts the server. Using a docker container in VS Code has the same no-update limitation described above.
You can easily configure your MCP client to use the Azure MCP Server. Have your client run the following command and access it via standard IO or SSE.
Configure the MCP client to execute: npx -y @azure/mcp@latest server start
. For instructions on using , follow instructions in Quick install with VS Code or Manual Install.
npx -y @azure/mcp@latest server start --transport sse
--port {YOUR-PORT-NUMBER}
.{
"servers": {
"Azure MCP Server": {
"type": "sse",
"url": "http://localhost:5008/sse"
}
}
}
More end-to-end MCP client/agent guides are coming soon!
See Troubleshooting guide for help with common issues and logging.
The Azure MCP Server seamlessly integrates with your host operating system's authentication mechanisms, making it super easy to get started! We use Azure Identity under the hood via DefaultAzureCredential
, which tries these credentials in order:
EnvironmentCredential
) - Perfect for CI/CD pipelinesSharedTokenCacheCredential
) - Uses cached tokens from other toolsVisualStudioCredential
) - Uses your Visual Studio credentialsAzureCliCredential
) - Uses your existing Azure CLI loginAzurePowerShellCredential
) - Uses your Az PowerShell loginAzureDeveloperCliCredential
) - Uses your azd loginInteractiveBrowserCredential
) - Falls back to browser-based login if neededIf you're already logged in through any of these methods, the Azure MCP Server will automatically use those credentials. Ensure that you have the correct authorization permissions in Azure (e.g. read access to your Storage account) via RBAC (Role-Based Access Control). To learn more about Azure's RBAC authorization system, visit this link.
If you're running into any issues with authentication, visit our troubleshooting guide.
By default, the Azure MCP Server excludes production credentials like Managed Identity and Workload Identity. To enable these credentials, set the environment variable:
AZURE_MCP_INCLUDE_PRODUCTION_CREDENTIALS=true
This is useful when running on Azure services where you want to use managed identities.
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.
We welcome contributions to the Azure MCP Server! Whether you're fixing bugs, adding new features, or improving documentation, your contributions are welcome.
Please read our Contributing Guide for guidelines on:
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact open@microsoft.com with any additional questions or comments.