← MCP server and skill grades

azure-devops-mcp

microsoft/azure-devops-mcp

D
Type
MCP server
Scanned
Nov 12, 2026
Version
65868ea3b843
Files read
98

This MCP server connects AI coding agents to Azure DevOps so they can read and manage projects, work items, repositories, pull requests, wikis, test plans, pipelines, and security alerts. Its biggest risks are that downloading a build artifact can send the user's Azure DevOps access token to an unvalidated URL, and a mislabeled read-only attachment tool lets prompt-injected agents silently save files into the local workspace without confirmation.

What it can reach

Network
Connects to Azure DevOps services, build artifact download URLs, and Microsoft Entra ID to read and modify projects, work items, repositories, pull requests, wikis, test plans, pipelines, and security alerts.
Secrets
Acquires or reads Azure DevOps credentials through interactive Microsoft OAuth sign-in, OS native authentication brokers, Azure CLI, DefaultAzureCredential, or the ADO_MCP_AUTH_TOKEN and PERSONAL_ACCESS_TOKEN environment variables.
Files
Reads and writes an organization tenant cache at ~/.ado_orgs.cache, and saves downloaded build artifacts and work item attachments to relative paths inside the current working directory.
Browser
Opens the system default web browser to Microsoft sign-in pages during interactive OAuth authentication.
Shell commands
Invokes local developer credential CLIs such as Azure CLI via @azure/identity when azcli or env authentication is configured.

Findings

2 high1 medium
  1. HighBuild artifact download sends Bearer token to unvalidated URLs

    src/tools/pipelines.ts:505

    When pipelines_artifact is called with action set to download, it fetches artifact.resource.downloadUrl from the build artifact record and attaches the user's Authorization Bearer token without verifying that the URL uses HTTPS or belongs to a trusted Azure DevOps domain. Although pat authentication installs a fetch interceptor in src/auth.ts that blocks non-HTTPS and untrusted hosts, the default interactive OAuth mode as well as azcli, env, and envvar modes have no host or scheme check. If someone who can publish or associate artifact metadata on a build (such as in a pull request pipeline) supplies an external or internal downloadUrl, downloading that artifact leaks the user's live Azure DevOps token to that server and enables server-side request forgery.

    Fix: Validate artifact.resource.downloadUrl in all authentication modes before calling fetch by requiring protocol https: and restricting the hostname to trusted Azure DevOps domains (dev.azure.com, *.dev.azure.com, and *.visualstudio.com), and prevent credentials from being forwarded to untrusted redirect targets.

  2. HighWork item attachment tool is marked read-only despite writing local files

    src/shared/tool-annotations.ts:62

    wit_work_item_attachment is annotated with READ_ONLY_ANNOTATIONS (readOnlyHint: true), even though supplying savePath writes raw downloaded attachment bytes directly to savePath/fileName inside the local workspace (unlike pipelines_artifact, which is marked with MUTATING_ANNOTATIONS because it saves files). Coding agents such as VS Code, Cursor, and Claude Code use readOnlyHint: true to auto-approve read-only tool calls without prompting the user. A prompt injection hidden in a work item, pull request, wiki page, or build log can trick the agent into saving an attacker-uploaded attachment to a sensitive new file in the workspace (such as .npmrc, .env, conftest.py, or Directory.Build.targets) with no user confirmation.

    Fix: Change wit_work_item_attachment in TOOL_ANNOTATIONS to MUTATING_ANNOTATIONS or ADDITIVE_ANNOTATIONS (readOnlyHint: false and idempotentHint: false), or move local file saving into a separate write-annotated tool.

  3. MediumBuild artifact download follows symlinks and overwrites existing files

    src/tools/pipelines.ts:517

    When pipelines_artifact saves an artifact to destinationPath, it only checks the input string for .. segments and absolute path prefixes before calling resolve(destinationPath) and createWriteStream(fileDestinationPath). Unlike wit_work_item_attachment in src/tools/work-items.ts, which resolves symlinks with realpath and opens files with O_CREAT | O_EXCL | O_NOFOLLOW, pipelines_artifact does not check symlinks and opens the destination in overwrite mode. If the workspace contains a symlink (for example, inside a checked-out pull request branch) and the agent is tricked into downloading an artifact through that path, createWriteStream will follow the symlink outside the workspace and overwrite the target file, or overwrite existing .zip files in the workspace.

    Fix: Resolve process.cwd() and the destination directory with fs.promises.realpath to verify the target remains inside the workspace root, and open the destination file using O_CREAT | O_EXCL | O_WRONLY | O_NOFOLLOW before writing.