Skip to content
← All guides

Azure DevOps MCP server security: what it can access

What the Azure DevOps MCP server can read, write and run, how it signs in, and how to limit it in Claude Code and Codex with read-only and toolset settings.

5 min read

The Azure DevOps MCP server is maintained by Microsoft. It comes in two forms: a hosted remote server at https://mcp.dev.azure.com/{organization} that signs in with Microsoft Entra ID, and a local server you run with Node.js 20 or later. It can read repos, work items, pipelines and wikis, and it can also create pull requests, edit work items and queue pipeline runs. The remote server accepts an X-MCP-Readonly: true header that removes the write tools. Use it unless the task needs to change something.

Remote or local

Microsoft’s docs recommend the remote server where your client supports it. It is hosted and updated by Azure DevOps. The local server in the microsoft/azure-devops-mcp repo runs over stdio and signs in with a Microsoft account that has access to your organization. The remote-server docs list a PAT or Entra ID as its sign-in options. Microsoft says the remote server will eventually replace it.

Claude Code needs a custom Microsoft Entra app registration to reach the remote server. Microsoft’s docs say Claude Desktop and Codex don’t currently support the Entra flow the remote server needs, so those clients use the local server.

What the tools can do

Tool names are grouped by area. Most tools take an action parameter, so one tool name can cover both a read and a write.

GroupReadsWrites
Reposrepo_pull_request, repo_file, repo_branch, search_coderepo_pull_request_write (create, update, vote), repo_pull_request_thread_write, repo_create_branch
Work itemswit_work_item, wit_query, search_workitemwit_work_item_write, wit_work_item_comment_write, wit_work_item_link_write, attachment upload
Pipelinespipelines_build, pipelines_build_log, pipelines_artifactpipelines_write (run_pipeline, create_pipeline, update_build_stage)
Wikiwiki, search_wikiwiki_upsert_page
Test planstestplantestplan_test_plan_write, testplan_test_run_write

The remote server also lists Enterprise Live Migration tools, in preview and on by default. They include enterprise_live_migration_write with an abandon action that permanently deletes a migration. Microsoft notes the tool list may not reflect the latest updates.

Limit it at the server

The remote server reads three headers in your MCP config. Combine them.

{
  "servers": {
    "ado-remote-mcp": {
      "url": "https://mcp.dev.azure.com/{organization}",
      "type": "http",
      "headers": {
        "X-MCP-Toolsets": "repos,wiki,wit",
        "X-MCP-Readonly": "true"
      }
    }
  }
}

X-MCP-Toolsets accepts all (the default), repos, advsec, wit, pipelines, wiki, work, testplan and elm. X-MCP-Tools enables named tools instead, and Microsoft says not to combine it with X-MCP-Toolsets. For the local server, the -d argument loads only the domains you name, and core should always be included.

Headers only filter tools. OAuth scopes decide what the app is allowed to do. The legacy Ado.Mcp.Tools scope grants every MCP tool and overrides the granular scopes, so remove it and grant only scopes such as repos.read or wit.read. Scopes never exceed the signed-in user’s own Azure DevOps permissions.

Risks that remain

  • Work item text, pull request comments, wiki pages and build logs are written by other people. An agent that reads them can follow instructions hidden inside.
  • Tool results go to your model provider.
  • A write tool with a broad scope can change shared state quickly: a pipeline run, a vote on a pull request, a new branch.

Limit it in Claude Code and Codex

Claude Code names MCP tools mcp__<server>__<tool>. Deny rules win over ask rules, and ask rules win over allow rules. Put them in .claude/settings.json for a project or ~/.claude/settings.json for all projects.

{
  "permissions": {
    "deny": ["mcp__ado__pipelines_write", "mcp__ado__wiki_upsert_page"],
    "ask": ["mcp__ado__repo_pull_request_write"]
  }
}

Replace ado with the name you gave the server. Claude Code’s --scope project stores the server in .mcp.json, which your team shares. The default local scope stays in ~/.claude.json.

Per Microsoft, Codex can’t sign in to the remote server, so in Codex you run the local server from ~/.codex/config.toml. The -d option loads only the domains you name, and Codex’s documented tool lists narrow it further.

[mcp_servers.ado]
command = "npx"
args = ["-y", "@azure-devops/mcp", "your-org", "-d", "core", "work", "work-items"]
enabled_tools = ["wit_work_item", "wit_query", "search_workitem"]

enabled_tools is an allow list and disabled_tools is a deny list applied after it. Codex also documents a default_tools_approval_mode of auto, prompt, writes or approve.

Checklist

  1. Start with X-MCP-Readonly: true and only the toolsets the task needs.
  2. Register the Entra app with granular scopes and drop Ado.Mcp.Tools.
  3. Deny pipelines_write unless the agent should queue runs.
  4. Treat work item and pull request text as untrusted.
  5. After a session, confirm the pull requests, work items and runs it touched in Azure DevOps.

Checked against the vendor documentation on November 25, 2026. Azure DevOps MCP repo · Remote server docs · Claude Code MCP · Claude Code permissions · Codex MCP

Where Excellent fits

Excellent’s 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. It does not inspect MCP servers themselves. For a local report without installing an app, run the free scan. 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. Agent coverage · pricing. Pro is US-only for now. For more on MCP risk in general, see AI agent security.

Related guides

View all