Azure DevOps MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Azure DevOps MCP Server List the open bugs assigned to me in the current project."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Azure DevOps MCP Server
Local Model Context Protocol (MCP) server for Azure DevOps Services. It exposes 68 tools for Azure Boards, Azure Repos, pull request review and lifecycle management, Azure Pipelines, team sprints/backlogs, and delivery reporting.
Read tools are enabled by default. Every mutation requires both a server-side feature flag and an explicit per-call confirmation. Pull request completion and auto-complete never bypass branch policies.
Capabilities
Azure Boards
Read work items, every field, relations, comments, and historical snapshots.
Run read-only WIQL
SELECTqueries and resolve the matching work items.Create and update work items, including state, assignee, tags, area, sprint, and custom fields.
Add, edit, and soft-delete work item comments; add parent/child/related/dependency/duplicate links and attachments up to 10 MiB.
Use an expected revision to prevent stale work item updates.
Trace a ticket to linked pull requests, commits, builds, branches, and related work items.
Read the work item's field and relation update history.
Repositories and branches
List projects, repositories, clone links, branches, and commits.
Create a branch at an exact commit.
Delete a branch only when its current object ID matches the caller's expectation.
Compare branches with ahead/behind counts and changed items.
Find stale branches while excluding protected branch names.
Pull requests and code review
List and retrieve pull requests, including direct Azure DevOps PR URLs.
Read commits, reviewers/votes, iterations, threads, comments, labels, and linked work items.
Generate bounded unified diffs locally and validate exact inline-comment targets.
Create and update PRs; switch draft state; abandon or reactivate a PR.
Add/remove reviewers and labels; create, reply to, edit, soft-delete, and resolve review comments; cast votes.
Enable policy-respecting auto-complete or merge at an exact reviewed source SHA.
Evaluate merge readiness from draft/status, merge state, votes, required reviewers, unresolved threads, policy evaluations, and PR status checks.
Produce batch review summaries and stale PR reports.
Azure Pipelines
List pipelines, runs, and builds; inspect run state/result.
Filter builds by definition, repository, branch, status, and result.
Queue or preview a run with a branch, variables, template parameters, and skipped stages.
Re-run a full pipeline using a previous run's resolved resources.
List build log records and retrieve bounded log text.
Azure DevOps REST does not expose a generic failed-job-only rerun through this implementation; rerun_pipeline queues a full run.
Sprints and backlogs
List team iterations by current, past, or future timeframe.
Get the work items and team-member capacity for a sprint.
Calculate item and story-point velocity with configurable point field and completed states.
Reorder or reparent backlog items.
Move a work item to a sprint through
update_work_itemandSystem.IterationPath.
Related MCP server: Azure DevOps MCP Server
Tool groups
Group | Count | Coverage |
Core and repository reads | 6 | Auth, projects, repositories, clone links, branch listing |
Azure Boards | 10 | Work items, WIQL, comment lifecycle, create/update, relations, attachments |
Pull requests and history | 10 | PR metadata, commits, threads, iterations, reviewers, linked work items |
Review and diff | 6 | Changed files, stats, unified diffs, inline validation, review context |
PR review and lifecycle writes | 15 | PR create/update/merge, auto-complete, comment lifecycle, votes, reviewers, labels |
Branch lifecycle | 4 | Create, delete, compare, stale branches |
Pipelines and builds | 7 | Definitions, runs, queue/rerun, logs, build filters |
Sprints and backlog | 5 | Iterations, work items, capacity, velocity, reorder |
Quality and trace reports | 5 | Merge readiness, batch/stale reports, delivery trace, audit history |
Total | 68 |
The complete input reference is in docs/tools.md.
Requirements
Node.js 20+
npm
An Azure DevOps Services organization
An Azure DevOps PAT or an Azure CLI session created with
az login
Azure DevOps Server/on-premises is not currently supported.
Quick start
git clone https://github.com/hasanozcan/azure-devops-mcp.git
cd azure-devops-mcp
npm install
Copy-Item .env.example .envEdit .env:
AZURE_DEVOPS_ORGANIZATION=your-organization
AZURE_DEVOPS_DEFAULT_PROJECT=your-project
AZURE_DEVOPS_AUTH_MODE=pat
AZURE_DEVOPS_PAT=your-token
AZURE_DEVOPS_ENABLE_WRITE_TOOLS=falseThen validate and build:
npm run doctor
npm run build
npm startThe transport is local stdio; stdout is reserved for MCP protocol messages.
Finding organization and project values
For a URL such as:
https://thecellsolutions.visualstudio.com/hpowere/_git/hpower/pullrequestsuse:
AZURE_DEVOPS_ORGANIZATION=thecellsolutions
AZURE_DEVOPS_DEFAULT_PROJECT=hpowereFor https://dev.azure.com/<organization>/<project>/..., use the first path segment as the organization and the second as the project.
Authentication and permissions
Recommended PAT permissions depend on the tools you enable:
Capability | PAT permission |
Repository, branch, commit, PR, and diff reads | Code: Read |
PR/branch/reviewer/label/comment mutations | Code: Read & write |
Work item, WIQL, comment, history, sprint-item reads | Work Items: Read |
Work item creation/update/comments/relations/attachments/backlog reorder | Work Items: Read & write |
Pipeline, run, build, and log reads | Build: Read |
Queue, preview, or rerun pipelines | Build: Read & execute |
Iteration and capacity discovery | Project and Team: Read |
Use the shortest practical PAT expiration. See docs/auth.md.
Azure CLI mode:
az loginAZURE_DEVOPS_AUTH_MODE=azcli
AZURE_DEVOPS_PAT=Configuration
Variable | Required | Default | Purpose |
| Yes | None | Organization name or Azure DevOps URL |
| No | None | Project used when a tool omits |
| No |
|
|
| PAT mode | None | Personal Access Token |
| No |
| REST API base URL |
| No |
| Default REST API version |
| No |
| Enable guarded mutations |
| No |
| Per-request timeout |
| No |
| Retry count for safe reads |
| No |
| Per-side local diff file limit |
| No |
| Maximum returned diff lines |
Placeholder secrets such as replace-me are rejected at startup.
Codex configuration
The repository includes .codex/config.toml. Build the project, create .env, trust/open the repository in Codex, and restart the MCP server list.
Manual registration:
codex mcp add azure-devops-mcp -- node "<absolute-path-to-project>\dist\server.js"The project configuration uses default_tools_approval_mode = "writes", adding Codex approval on top of the server's own mutation gates. .vscode/mcp.json is also included.
Safety model
Every mutation requires:
AZURE_DEVOPS_ENABLE_WRITE_TOOLS=trueat startup.confirm: truein the individual MCP call.
Additional safeguards:
work item updates can test
expectedRevision;branch deletion requires
expectedObjectId;inline comments validate the current iteration, file side, line range, and
changeTrackingId;PR completion requires the exact current source commit SHA;
PR completion and auto-complete always use
bypassPolicy: false;comment edits and deletes require exact work item or PR/thread/comment IDs, and Azure DevOps still enforces author and permission rules;
mutation requests are never automatically retried;
PATs, bearer tokens, and authorization headers never appear in tool or doctor output.
Example prompts
Read work item 544, including comments, relations, and delivery links.
Replace my English PR comment with this Turkish explanation after I confirm.
Delete my duplicate reply from thread 42 after I confirm the comment ID.
Move work item 544 to Project\Sprint 8 after I confirm.
Create a branch feature/544 at this exact commit after I confirm.
Review this Azure DevOps pull request URL and report merge blockers.
Add a required reviewer and enable squash auto-complete after I confirm.
Show failed builds for the hpower repository and retrieve the last run logs.
Run pipeline 12 on feature/544 with deploy=false after I confirm.
Show the current sprint capacity and calculated story-point velocity.
Report branches and active PRs older than 45 days.Validation
npm run typecheck
npm run typecheck:tests
npm test
npm run build
npm run smoke:mcp
npm run doctor
npm pack --dry-rundoctor performs live read-only checks without printing credentials.
Scope boundaries
This release does not manage wikis, test plans, service connections, variable groups, deployment environments, saved queries, repository creation, or Azure DevOps Server/on-premises. Pipeline rerun is full-run only.
API references
The adapters target Microsoft's Azure DevOps REST API 7.1 documentation for Git, PR thread comments, Work Item Tracking, work item comments, Pipelines, Build, and Work/Sprints.
License
MIT © 2026 Hasan Özcan. See LICENSE.
Available Tools
68 toolsadd_work_item_attachmentAdd work item attachmentA
Upload a base64 file up to 10 MiB and attach it to a work item. Requires write tools and confirm=true.
Inputs: confirm (required), fileName (required), workItemId (required), contentBase64 (required), +3 more.
add_work_item_commentAdd work item commentA
Add a Markdown or HTML comment to an Azure Boards work item. Requires write tools and confirm=true.
Inputs: text (required), confirm (required), workItemId (required), format, +1 more.
add_work_item_relationAdd work item relationA
Link two work items as parent, child, related, dependency, or duplicate. Requires write tools and confirm=true.
Inputs: confirm (required), relation (required), workItemId (required), targetWorkItemId (required), +3 more.
check_azure_devops_authCheck Azure DevOps authenticationA
Verify authentication and optional project access without exposing credentials.
Inputs: project.
compare_branchesCompare branchesC
Compare two branches and return ahead/behind counts, common commit, and changed items.
Inputs: baseBranch (required), repositoryId (required), targetBranch (required), top, +1 more.
complete_pull_requestComplete pull requestA
Merge an active, non-draft PR without bypassing policies. Requires the reviewed source commit, write tools, and confirm=true.
Inputs: confirm (required), repositoryId (required), mergeStrategy (required), pullRequestId (required), +5 more.
create_branchCreate branchB
Create a branch at an exact source commit, failing safely if the branch already exists.
Inputs: confirm (required), branchName (required), repositoryId (required), sourceObjectId (required), +1 more.
create_pull_requestCreate pull requestB
Create a same-repository Azure Repos pull request. Requires write tools and confirm=true.
Inputs: title (required), confirm (required), repositoryId (required), sourceBranch (required), +7 more.
create_pull_request_commentCreate pull request commentA
Create a top-level pull request comment. Requires write tools and confirm=true.
Inputs: confirm (required), content (required), repositoryId (required), pullRequestId (required), +1 more.
create_pull_request_inline_commentCreate pull request inline commentB
Validate and create a file/line comment on the current pull request iteration. Requires write tools and confirm=true.
Inputs: path (required), confirm (required), content (required), repositoryId (required), +7 more.
create_work_itemCreate work itemA
Create an Azure Boards work item with standard or custom fields. Requires write tools and confirm=true.
Inputs: title (required), confirm (required), workItemType (required), tags, +8 more.
delete_branchDelete branchA
Delete a branch only if it still points at the exact expected commit.
Inputs: confirm (required), branchName (required), repositoryId (required), expectedObjectId (required), +1 more.
delete_pull_request_commentDelete pull request commentA
Soft-delete a top-level or reply comment inside a pull request thread. Azure DevOps author and permission rules apply. Requires write tools and confirm=true.
Inputs: confirm (required), threadId (required), commentId (required), repositoryId (required), +2 more.
delete_work_item_commentDelete work item commentA
Soft-delete an Azure Boards work item comment. Azure DevOps author and permission rules apply. Requires write tools and confirm=true.
Inputs: confirm (required), commentId (required), workItemId (required), project.
get_batch_pull_request_review_summaryGet batch pull request review summaryA
Summarize votes and unresolved threads across up to 50 pull requests.
Inputs: top, status, project, repositoryId.
get_clone_linksGet clone linksB
Return HTTPS, SSH, and web URLs for an Azure Repos repository.
Inputs: repositoryId (required), project.
get_iteration_velocityGet iteration velocityB
Calculate delivered item and story-point totals for a sprint using configurable point field and completed states.
Inputs: iterationId (required), team, project, pointsField, +1 more.
get_iteration_work_itemsGet iteration work itemsB
Get work items assigned to a team iteration/sprint.
Inputs: iterationId (required), team, project.
get_pipeline_runGet pipeline runC
Get one Azure Pipeline run and its current state/result.
Inputs: runId (required), pipelineId (required), project.
get_pipeline_run_logsGet pipeline run logsC
List log records for a pipeline run or fetch one bounded plain-text log.
Inputs: runId (required), logId, project, maxChars.
get_pull_requestGet pull requestB
Get one Azure Repos pull request with commits and linked work item references.
Inputs: repositoryId (required), pullRequestId (required), project.
get_pull_request_by_urlGet pull request by URLB
Parse an Azure DevOps pull request URL and retrieve the pull request.
Inputs: url (required).
get_pull_request_changed_filesGet pull request changed filesB
Return changed files and locally computed line statistics for a pull request iteration.
Inputs: repositoryId (required), pullRequestId (required), project, maxFiles, +1 more.
get_pull_request_commitsGet pull request commitsC
List commits included in a pull request.
Inputs: repositoryId (required), pullRequestId (required), top, project, +1 more.
get_pull_request_diffGet pull request diffC
Build and return a unified diff for an Azure Repos pull request.
Inputs: repositoryId (required), pullRequestId (required), project, maxFiles, +4 more.
get_pull_request_diff_statsGet pull request diff statisticsC
Return aggregate additions, deletions, file counts, and largest changed files.
Inputs: repositoryId (required), pullRequestId (required), project, maxFiles, +2 more.
get_pull_request_file_diffGet pull request file diffB
Return the locally generated unified diff for one file in a pull request.
Inputs: path (required), repositoryId (required), pullRequestId (required), project, +4 more.
get_pull_request_iterationsGet pull request iterationsB
List reviewable iterations created by pushes to a pull request.
Inputs: repositoryId (required), pullRequestId (required), project, includeCommits.
get_pull_request_merge_readinessGet pull request merge readinessB
Evaluate draft/status, mergeability, votes, unresolved threads, policies, and PR status checks without merging.
Inputs: repositoryId (required), pullRequestId (required), project.
get_pull_request_review_contextGet pull request review contextA
Return PR metadata, diff summary, unified diff, commits, threads, reviewers, and linked work items in one review bundle.
Inputs: repositoryId (required), pullRequestId (required), project, maxFiles, +5 more.
get_pull_request_reviewersGet pull request reviewersA
List pull request reviewers and their current votes.
Inputs: repositoryId (required), pullRequestId (required), project.
get_pull_request_thread_commentsGet pull request thread commentsA
List comments inside one pull request thread.
Inputs: threadId (required), repositoryId (required), pullRequestId (required), project.
get_pull_request_threadsGet pull request threadsC
List top-level and inline comment threads on a pull request.
Inputs: repositoryId (required), pullRequestId (required), top, project, +3 more.
get_pull_request_work_itemsGet pull request work itemsB
Get work items directly linked to a pull request.
Inputs: repositoryId (required), pullRequestId (required), project.
get_repositoryGet repositoryB
Get Azure Repos repository metadata.
Inputs: repositoryId (required), project.
get_stale_repository_reportGet stale repository reportC
Report old branches and open pull requests using a shared age threshold.
Inputs: repositoryId (required), top, project, staleDays, +1 more.
get_team_capacityGet team capacityB
Get per-team-member sprint capacity, activities, and days off.
Inputs: iterationId (required), team, project.
get_work_itemGet work itemA
Get one Azure Boards work item by ID, including all fields and relations by default.
Inputs: workItemId (required), asOf, expand, fields, +1 more.
get_work_item_audit_historyGet work item audit historyC
List revision updates and field/relation changes for a work item.
Inputs: workItemId (required), top, skip, project.
get_work_item_commentsGet work item commentsC
List pageable comments for one Azure Boards work item.
Inputs: workItemId (required), top, order, expand, +3 more.
get_work_item_delivery_traceGet work item delivery traceA
Trace a work item to linked pull requests, commits, builds, branches, and related work items.
Inputs: workItemId (required), project.
list_branchesList branchesC
List branches in an Azure Repos repository.
Inputs: repositoryId (required), top, filter, project, +1 more.
list_buildsList buildsC
List and filter Azure Pipeline build records for status, result, repository, definition, or branch.
Inputs: top, branch, project, repositoryId, +4 more.
list_commitsList commitsB
List repository commits, optionally scoped to a branch, tag, or commit.
Inputs: repositoryId (required), top, skip, author, +5 more.
list_pipeline_runsList pipeline runsC
List runs for one Azure Pipeline.
Inputs: pipelineId (required), top, project, continuationToken.
list_pipelinesList pipelinesC
List Azure Pipelines definitions in a project.
Inputs: top, orderBy, project, continuationToken.
list_projectsList Azure DevOps projectsB
List projects in the configured Azure DevOps organization.
Inputs: top, stateFilter, continuationToken.
list_pull_request_labelsList pull request labelsB
List labels applied to a pull request.
Inputs: repositoryId (required), pullRequestId (required), project.
list_pull_requestsList pull requestsB
List Azure Repos pull requests in a repository or project.
Inputs: top, skip, status, project, +5 more.
list_repositoriesList repositoriesB
List Azure Repos Git repositories in a project.
Inputs: project.
list_stale_branchesList stale branchesB
Find branches whose latest commit is older than a configured age; main, master, and develop are protected by default.
Inputs: repositoryId (required), top, project, staleDays, +1 more.
list_team_iterationsList team iterationsB
List current, past, future, or all sprint iterations for a team.
Inputs: team, project, timeframe.
manage_pull_request_labelManage pull request labelC
Add or remove a pull request label.
Inputs: label (required), action (required), confirm (required), repositoryId (required), +2 more.
manage_pull_request_reviewerManage pull request reviewerC
Add or remove a PR reviewer by Azure DevOps identity ID.
Inputs: action (required), confirm (required), reviewerId (required), repositoryId (required), +3 more.
query_work_itemsQuery work itemsA
Run a read-only WIQL SELECT query and resolve matching Azure Boards work item details.
Inputs: wiql (required), top, fields, project, +1 more.
reorder_backlog_work_itemsReorder backlog work itemsA
Move or reorder work items in a team backlog using adjacent or parent IDs. Requires write tools and confirm=true.
Inputs: ids (required), confirm (required), team, nextId, +4 more.
reply_to_pull_request_threadReply to pull request threadA
Reply inside an existing pull request comment thread. Requires write tools and confirm=true.
Inputs: confirm (required), content (required), threadId (required), repositoryId (required), +3 more.
request_pull_request_changesRequest pull request changesA
Set the authenticated user's Azure DevOps vote to waitForAuthor (-5). Requires write tools and confirm=true.
Inputs: confirm (required), repositoryId (required), pullRequestId (required), project.
rerun_pipelineRerun pipelineA
Queue a full rerun using the resolved resources of a previous run. Azure REST does not expose failed-job-only rerun here.
Inputs: runId (required), confirm (required), pipelineId (required), project.
run_pipelineRun pipelineB
Queue or preview an Azure Pipeline run with optional branch, variables, parameters, and skipped stages.
Inputs: confirm (required), pipelineId (required), branch, project, +4 more.
set_pull_request_auto_completeSet pull request auto-completeC
Enable or disable policy-respecting PR auto-complete. Policy bypass is always false.
Inputs: confirm (required), enabled (required), repositoryId (required), pullRequestId (required), +5 more.
set_pull_request_voteSet pull request voteB
Set the authenticated user's Azure DevOps pull request vote. Requires write tools and confirm=true.
Inputs: vote (required), confirm (required), repositoryId (required), pullRequestId (required), +1 more.
update_pull_requestUpdate pull requestA
Change PR title, description, draft state, or active/abandoned status. Completion is handled by complete_pull_request.
Inputs: confirm (required), repositoryId (required), pullRequestId (required), title, +4 more.
update_pull_request_commentUpdate pull request commentA
Replace a top-level or reply comment inside a pull request thread. Azure DevOps author and permission rules apply. Requires write tools and confirm=true.
Inputs: confirm (required), content (required), threadId (required), commentId (required), +3 more.
update_pull_request_thread_statusUpdate pull request thread statusB
Resolve, reactivate, close, or otherwise update a pull request thread. Requires write tools and confirm=true.
Inputs: status (required), confirm (required), threadId (required), repositoryId (required), +2 more.
update_work_itemUpdate work itemA
Update state, assignee, tags, sprint, area, or custom fields on an Azure Boards item. Optional revision check prevents stale writes.
Inputs: confirm (required), workItemId (required), tags, state, +9 more.
update_work_item_commentUpdate work item commentA
Replace the text of an Azure Boards work item comment. Azure DevOps author and permission rules apply. Requires write tools and confirm=true.
Inputs: text (required), confirm (required), commentId (required), workItemId (required), +1 more.
validate_inline_comment_targetValidate inline comment targetA
Dry-run an inline comment path and line range against the current pull request iteration.
Inputs: path (required), repositoryId (required), pullRequestId (required), toLine, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 68 tools
Most tools are clearly separated by resource (work items, PRs, pipelines, repos, iterations) and action. Some potential confusion exists among PR comment tools (create_pull_request_comment, create_pull_request_inline_comment, reply_to_pull_request_thread, update_pull_request_comment) and between get_pull_request_diff and get_pull_request_file_diff, but descriptions are specific enough to disambiguate.
The naming convention is predominantly verb_noun (e.g., list_projects, create_work_item, get_pull_request), with consistent snake_case. Minor deviations exist: check_azure_devops_auth, validate_inline_comment_target, and get_batch_pull_request_review_summary are more descriptive phrases, but they still follow the same general style.
68 tools is high for a single server, but Azure DevOps is a broad platform covering Boards, Repos, Pipelines, and PR workflows. The count feels heavy and could overwhelm agents, though each tool addresses a distinct need within the domain.
The tool surface is remarkably comprehensive: work item CRUD plus comments, relations, attachments, audit history; PR creation, review, comments, threads, votes, labels, reviewers, merge readiness; repo/branch management; pipeline runs and logs; iteration/backlog planning. There are no obvious dead ends for core Azure DevOps workflows.
Maintenance
Related MCP Connectors
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
A MCP server built for developers enabling Git based project management with project and personal…
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Azure DevOps services including work items, repositories, pipelines, wikis, and test plans through a local MCP server that provides direct access to Azure DevOps REST APIs from your code editor.MIT
- AlicenseBqualityDmaintenanceA read-only MCP server connecting AI assistants to Azure DevOps Server (on-premises) for browsing projects, repos, builds, work items, releases, pipelines, and test results.391MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with Azure DevOps through an MCP server with 34 tools for PRs, work items, repos, and branches, optimized for token efficiency and agent-first workflows.4 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Azure DevOps Server 2022 (on-premises) that enables AI assistants to interact with work items, repositories, builds, and sprints through 29 tools.9 npmMIT