Azure MCP Server Cursor IDE Setup (2026): Entra ID Auth, No API Key to Manage
Connect Cursor IDE to Microsoft's official Azure MCP Server: npx config, Azure CLI (az login) authentication via Entra ID, real role-assignment requirements, and no static API key to store.
Azure MCP Server Cursor IDE Setup (2026)
How do you set up the Azure MCP Server in Cursor? Add a four-line npx entry to mcp.json pointing at @azure/mcp@latest, then authenticate to Azure through a local tool you're probably already using — az login via the Azure CLI. Microsoft's official server automatically discovers those credentials; there's no static API key to generate, paste, or rotate. Once connected, Cursor can list resources, query storage accounts, and inspect App Service configs against your actual subscription, scoped to whatever role assignments your signed-in account already has.
This is a meaningfully different auth model than most MCP servers on this site. There's no token step to walk through — the whole guide is really "sign into Azure the normal way, then point Cursor at the server."
What the Azure MCP Server Enables
Once connected, Cursor can:
Because authentication rides on your existing Azure identity, the server can't do anything your signed-in account couldn't already do through the Portal or CLI — it's a read/write surface bounded by Entra ID role assignments, not a separate permission system.
Prerequisites
Step 1: Add the Server to mcp.json
In Cursor, go to File → Preferences → Cursor Settings → Tools & Integrations → MCP Tools → New MCP Server, or edit ~/.cursor/mcp.json directly:
{
"mcpServers": {
"Azure MCP Server": {
"command": "npx",
"args": ["-y", "@azure/mcp@latest", "server", "start"]
}
}
}
No environment variables, no token fields. This is the entire config block.
Step 2: Authenticate to Azure
The Azure MCP Server doesn't handle its own login — it discovers credentials from local development tools. The most common path is the Azure CLI:
az login
Verify which account and subscription you're actually signed into before assuming anything about scope:
az account show
Then confirm your account has the role assignments you'll actually need. Common ones:
If Cursor asks you to authenticate mid-session and you're already logged in via az login, that prompt shouldn't appear — the server picks up cached CLI credentials automatically. If it does appear anyway, that's usually a sign the CLI session expired, not a broken MCP config.
Step 3: Restart Cursor and Verify
Restart Cursor, open the chat panel (Ctrl+L / Cmd+L), and try:
List my Azure storage accounts
Cursor will typically prompt you to run a specific tool call (e.g., storage account list) before returning results — approve it. A response naming real resource groups and regions confirms the connection; an empty or error response usually means either the CLI session isn't authenticated or your account lacks Reader access on the subscription you're querying.
Practical Workflows
Pre-deploy sanity check
List the App Service instances in my subscription and show me the current runtime configuration for each — I want to confirm nothing changed since the last deploy
Storage audit
List all my storage accounts and flag any that don't have a Storage Account Contributor role assigned to my current identity, so I know where I'd need elevated access
Resource group cleanup
List every resource group in my subscription along with its region, and tell me which ones look like leftover test environments based on naming
Cross-checking infra-as-code against reality
I have a Terraform plan that expects a storage account named "prodassets001" in the eastus region — does that actually exist in my subscription, and does its configuration match what's in main.tf?
That last pattern pairs well with the Terraform MCP server if you manage Azure infrastructure as code — one connection reads your Terraform state and intent, the other reads what's actually deployed.
Troubleshooting
Cursor keeps prompting for Azure sign-in even though I already ran az login
Run az account show directly in terminal. If it errors or shows the wrong tenant, your CLI session expired or is scoped to a different Azure AD tenant than the one Cursor is trying to reach — re-run az login and select the correct account.
Tool calls return "Forbidden" or empty results
This is almost always a role assignment gap, not an MCP bug. The server can only do what your signed-in identity is allowed to do. Check role assignments in the Azure Portal under Access control (IAM) for the specific resource or resource group you're querying.
Resources I know exist don't show up
Confirm you're querying the right subscription — az account show displays the active one, and if your account has access to multiple subscriptions, Cursor's queries run against whichever is currently selected in the CLI, not all of them at once. Switch with az account set --subscription "<name-or-id>".
npx command hangs on first run
The first invocation downloads @azure/mcp@latest, which can take a few seconds depending on your connection. Subsequent runs use the cached package and start immediately.
When This Doesn't Make Sense
If your team's Azure access is locked down through Privileged Identity Management (PIM) with just-in-time role activation, the discovery-based auth model here gets awkward — Cursor's session may outlive your activated role window, and you'll hit permission errors mid-conversation that have nothing to do with the MCP config. In tightly-gated PIM environments, treat this as a tool for scoped investigation sessions, not an always-on background connection.
Frequently Asked Questions
Q: Do I need to create an Azure service principal or API key for this?
A: No. The official Azure MCP Server authenticates by discovering credentials from local tools like the Azure CLI, Azure Developer CLI, Visual Studio, or VS Code. There's no static key to generate or store in mcp.json.
Q: What permissions does Cursor get once connected?
A: Exactly whatever your signed-in Azure identity has, via its role assignments — Reader, Contributor, Storage Account Contributor, and so on. The MCP connection doesn't grant anything beyond your existing access; it's a query/action surface bounded by Entra ID role assignments.
Q: Can this create or modify Azure resources, or only read them?
A: Both, depending on your role assignments. A Reader-only identity can only list and inspect. An account with Contributor or a resource-specific write role can also modify — the server itself doesn't distinguish read from write tools beyond what your permissions allow to succeed.
Q: Does this work if my team uses Azure AD Conditional Access or MFA?
A: Yes, as long as you can complete az login locally under those policies — the MCP server rides on whatever session the Azure CLI already established, so any MFA or Conditional Access challenge happens during that login step, not inside Cursor.
Q: I have access to multiple Azure subscriptions — how does Cursor know which one to query?
A: It uses whichever subscription is currently active in your Azure CLI session. Run az account show to check, and az account set --subscription "<name-or-id>" to switch before starting a Cursor session that needs a different one.
Q: My team runs workloads on Google Cloud too — is there an equivalent MCP setup?
A: Google doesn't ship one unified GCP MCP server the way Azure does; instead its MCP Toolbox for Databases connects to Cloud SQL, AlloyDB, Spanner, or BigQuery via a tools.yaml config you write yourself. See the Google Cloud MCP server setup guide for the toolbox-based setup — worth knowing about if you're running a genuine multi-cloud stack alongside Azure.
Related Guides
---
Related guides
- BigQuery MCP Server Cursor IDE Setup 2026: Query Your Data Warehouse with AI
- Bitbucket MCP Server Cursor IDE Setup (2025-2026): App Password Config for PRs & Pipelines
- Brave Search MCP Server Setup for Cursor IDE (2026): Live Web Results in Chat
- Canva MCP Server Cursor IDE Setup 2026: Remote Server via mcp-remote, OAuth Login