Azure MCP server security: read-only mode and RBAC
The Azure MCP Server runs with your Azure RBAC rights and can delete resources. See its flags, risks and how to limit it in Claude Code and Codex.
The Azure MCP Server is Microsoft’s local server, built from the microsoft/mcp repository, and it runs on your Mac with npx -y @azure/mcp@latest server start. It signs in through your Azure identity, and its calls run with your Azure RBAC permissions. Its tools can delete resources such as virtual machines and disks. Start it with --read-only, limit its namespaces and give the signed-in identity a narrow role.
Who maintains it and how it connects
The old Azure/azure-mcp repository is archived. Its notice says the Azure MCP team now develops the code in microsoft/mcp. The current README says Azure MCP Server 2.0 is generally available. It is a local stdio server. Authenticate to Azure first, for example with az login, and the server uses the Azure Identity SDK. The README says it never stores or manages tokens itself.
Install options include npm (npx -y @azure/mcp@latest server start), .NET (dnx), Python (uvx) and Docker. For Claude Code there is also a plugin, installed with /plugin install azure@claude-plugins-official.
What the tools can do
The README covers many Azure services with example prompts, including prompts that delete a virtual machine, delete a managed disk and delete an application setting. The command reference lists tool names such as azmcp_subscription_list and azmcp_group_list. This guide did not classify each tool as read or write. The --read-only flag is the control that prevents write operations.
Flags that limit it
| Flag | Effect |
|---|---|
--read-only | Prevents write operations |
--mode namespace (default), single or all | Collapses tools per service, into one tool, or exposes every tool |
--namespace storage | Exposes only tools for named service areas. Repeat for more |
--tool azmcp_subscription_list | Exposes only the named tools. It cannot be combined with --namespace |
The README also warns that safeguards such as flags to prevent destructive operations are not standardized in the MCP specification, and clients may not support them. A separate flag, --dangerously-disable-ssrf-protections-by-namespace, turns off SSRF protection for chosen namespaces. Leave it alone.
Risks
- Your RBAC. The README says MCP clients can invoke operations based on your Azure RBAC permissions, and that autonomous or misconfigured clients may perform destructive actions.
- Resource text. Names, tags, logs and file contents the tools return are text the model reads.
- Telemetry. The README says the software may collect usage information and send it to Microsoft, and that you can turn this off as described in the repository.
- Package freshness.
@latesttakes the newest release each start.
Limit it in Claude Code
claude mcp add azure -- npx -y @azure/mcp@latest server start --read-only --namespace storage --namespace keyvault{
"permissions": {
"ask": ["mcp__azure__*"]
}
}The azure part is your server name. With --read-only on, ask still keeps a person in the loop. Add deny rules for named tools once /mcp shows them.
Limit it in Codex
[mcp_servers.azure]
command = "npx"
args = ["-y", "@azure/mcp@latest", "server", "start", "--read-only"]
default_tools_approval_mode = "prompt"Checklist
- Sign in with an identity that has a Reader role on one subscription or resource group.
- Run with
--read-onlyfirst. - Pick namespaces, and pin the package version.
- Never run it as an account that can change Entra ID or billing.
- Check the Azure Activity Log after a session.
- See the MCP security hub and the AWS MCP server guide for the same pattern on AWS. For repositories and pipelines, see Azure DevOps.
Checked against the vendor documentation on November 25, 2026. microsoft/mcp Azure server README · Command reference · Azure/azure-mcp (archived) · Claude Code MCP
What Excellent covers
Excellent does not inspect MCP servers themselves. Its free scan reads supported logs on the Mac and reports findings for review. It reads the session logs of Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code, so it can show what an agent did after it called a tool. It does not read Cursor’s, OpenClaw’s or Claude Cowork’s logs. For a local report without installing an app, run the free scan. Its script uses Python 3.9 or later when your Mac has it and the shell when it doesn’t, reads the logs locally and makes no network requests. See a sample report.
Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. Commands sent into an already running Codex shell fall outside that check. Agent coverage · Pricing. Pro is US-only for now.


