OmniscioGuidesAzure MCP server
Giving Claude Code a window into Azure with Microsoft's MCP server
Microsoft's Azure MCP server puts the Azure estate inside Claude Code: subscriptions, resource groups, storage, Key Vault, Cosmos DB, AKS, Monitor and the rest. MCP is the Model Context Protocol, the standard that lets Claude Code call an outside service's tools.
The setup is two commands — az login, then the add line — because there is no authentication file to write. That also makes permissions the thing to get right: the tools act with the Azure role of whoever is signed in, not with a credential you chose for the purpose.
Sources read November 25, 2026. By the Omniscio team. Updated .
Which Azure server
This is Microsoft's own server, published from the microsoft/mcp repository as the NuGet tool Azure.Mcp and the npm package @azure/mcp. There are community Azure servers too, but the one whose commands Microsoft documents is this one, and it is the only one this page covers.
It is wide rather than narrow: Microsoft lists tools for 45+ Azure service areas, from App Configuration and Key Vault to Event Hubs, Cosmos DB and Azure Monitor. That width is useful and also the thing to manage, which is what the namespace filter later on this page is for.
The command
Microsoft documents the server as npx -y @azure/mcp@latest server start. Wrapped for Claude Code, with the name first and the double dash before the server's own arguments:
claude mcp add azure -- npx -y @azure/mcp@latest server startThe double dash is not decoration. Claude Code reads everything after it as the server's command line, and anything before it as its own options — which is why server start lives on the right-hand side.
If you would rather install than fetch on every start, npm install @azure/mcp@latest in the project installs it locally, and a global install is what Microsoft names for running azmcp commands directly from any terminal. With a global install the add command ends in azmcp server start instead of the npx form.
Narrowing 45+ services to a few
A server's tools take up part of Claude's context, though less than they used to: tool search ships on by default, so a session starts with only the tool names and the server's instructions, and the full definitions load when Claude needs them. This server ships one tool per Azure service area, which means about 45 tool names at the start; --namespace cuts that to the areas you name:
claude mcp add azure -- npx -y @azure/mcp@latest server start --namespace storageMicrosoft documents four ways to control what loads — --namespace, --tool, --mode consolidated which it recommends for a balance, and --mode single which exposes one routing tool. --namespace and --tool cannot be used together, and --namespace can be repeated on one server: --namespace storage --namespace keyvault.
The .mcp.json equivalent
{
"mcpServers": {
"azure": {
"command": "npx",
"args": ["-y", "@azure/mcp@latest", "server", "start"]
}
}
}This is a local server — a program on your machine — so the entry carries command and args rather than a url. Nothing goes in the file to authenticate: the server resolves credentials from the machine it runs on, through the chain described under the auth step.
Which scope to use
The command above carries no scope flag, so it lands at local scope: the entry lives in your own configuration and loads only in the project where you added it. --scope project writes .mcp.json at the project root so the team shares it, and --scope user makes it available in every project. The full table is in Add an MCP server to Claude Code.
For this server, user scope is usually the one to pick: add --scope user and it is available in every project, because the permission being borrowed is your own Azure sign-in and a teammate who clones a repository still acts as themselves. Project scope makes sense when the repository is the Azure work and the whole team expects the tools the moment they open it.
The auth step
There is no token in the command. Microsoft's authentication guide says a locally run server authenticates with the developer credentials on your machine, and names az login as the usual way to have them. What it calls the credential chain is a list of sources tried in order — an environment service principal, an editor sign-in, the Azure CLI, a browser prompt — and the first one that succeeds is the identity Claude then acts as.
That makes Azure role-based access control (RBAC) the whole permission model: whatever identity the chain settles on needs a role assignment on the subscription, resource group or resource it is asked to touch. Microsoft's warning in the server README is direct — MCP clients can invoke operations based on those RBAC permissions, and an autonomous or misconfigured client may perform destructive actions, so it recommends least-privilege roles and safeguards before deployment.
Two details explain most "it works in my terminal but not in Claude Code" reports. A stale environment credential can win before the login you just did, and AZURE_TOKEN_CREDENTIALS=AzureCliCredential pins the chain to the CLI. Inside VS Code it is the other way round: Microsoft's troubleshooting guide says the server detects the editor and puts the account signed into it first, which is how a service principal login gets ignored — and setting AZURE_TOKEN_CREDENTIALS is the documented fix, provided VS Code is fully restarted so the new variable reaches its processes.
Confirm it connected
claude mcp list
claude mcp get azureThe list prints a health status beside each server, such as ✔ Connected, ! Needs authentication or ✘ Failed to connect. When a server fails, the list appends the failure detail to that line, and claude mcp get azure shows it on an Issue: line — which is where an Azure credential complaint appears. A project-scope server you have not approved yet reads ⏸ Pending approval until you approve it.
Two more checks come from Microsoft. npx -y @azure/mcp@latest tools list prints the tools the package offers without starting a session, and inside a session /mcp shows what this server actually exposed. Then ask something small and checkable, such as listing your resource groups.
The failure people hit
The first one is a slow start that looks like a failure. npx resolves and downloads the package when the server launches, and Microsoft's own note says to pin a version — replace @latest with a release number — or install the package globally when startup is slow. A session that times out waiting for a server is often this, not a broken configuration.
The second is a permission error that looks like a connection error. The server is connected and the call still fails, because the tool ran as you and your role does not cover that resource. Microsoft's troubleshooting guide explains why the server's terminal stays blank while this happens — it writes its protocol on standard output — so the answer is in the Azure role, not in the MCP setup.
The third is the wrong identity: the chain picked an account you did not expect, which happens most inside an editor. Pinning AZURE_TOKEN_CREDENTIALS is the documented fix.
The general messages are collected in the MCP errors guide, and the flags and scopes in Add an MCP server to Claude Code.
Sources
Every line on this page rests on one of these. The date beside each one is the day we read it.
- microsoft/mcp: Azure MCP Server README, for the
npxand global installs, theserver startform,tools list, the 45+ service areas, the slow-start note, and the RBAC permission model with its warning. Read November 25, 2026. - microsoft/mcp: Authentication in Azure MCP Server, for the credential chain, the
az loginroute for local development,AZURE_TOKEN_CREDENTIALSand the RBAC requirement. Read November 25, 2026. - microsoft/mcp: Azure MCP Server troubleshooting, for the four ways to select tools, the default namespace mode, the rule that
--namespaceand--toolcannot be combined, the repeatable--namespace, the empty console window and the VS Code credential reorder. Read November 25, 2026. - Anthropic: Connect Claude Code to tools via MCP, for the double dash, the scope table, the health statuses,
claude mcp getand the context cost of a connected server. Read November 25, 2026.
Common questions
What is the command to add the Azure MCP server to Claude Code?
claude mcp add azure -- npx -y @azure/mcp@latest server start. Microsoft documents the npx form, and everything after the double dash is the server's own command line.
Do I need an Azure API key?
No. A locally run Azure MCP server authenticates with the developer credentials on your machine, and Microsoft names az login as the usual way to have them. What Claude can then do is decided by your Azure RBAC roles.
Why does the Azure server take so long to start?
Because npx resolves and downloads the package at startup. Microsoft's own note says to pin a version or install the package globally when startup is slow, and lists running azmcp directly from any terminal as the reason to install globally.
How do I stop Claude seeing every Azure service?
Pass --namespace with the service you want after server start, for example storage, and repeat it for a second area. Microsoft documents that --namespace and --tool cannot be used together.
Is the Azure MCP server safe to point at production?
Microsoft's own warning is that MCP clients can invoke operations based on your Azure RBAC permissions and that misconfigured clients may perform destructive actions, so it recommends least-privilege roles and safeguards before deployment.
Every session, one window
Omniscio runs several agent sessions side by side in one window, each with its own context and its own diff view. Any model, any harness — Claude Code, Codex, OpenCode, Devin, Pi, and Hermes all supported.