add_pull_request_comment
Add a comment to a pull request (repositoryId optional; derived from pullRequestId when omitted)
Work items, repositories, pull requests, pipelines and wikis in one Azure DevOps organization — read them, write them, and follow a failing check back to the log line that caused it.
LABSCO SUMMARY
get_pull_request_checks reports which policy or pipeline is holding the PR and hands back the run identifiers, and pipeline_timeline plus get_pipeline_log take those identifiers down to a specific log range — a chain that most Azure DevOps integrations stop short of. Two things worth knowing before you commit to it: Microsoft ships its own server for Azure DevOps Services, and this one earns its place mainly on Azure DevOps Server on-premises; and create_commit rejects a request where the same file path appears twice, so edits to one file have to be merged into a single change entry.
A community server over the Azure DevOps REST APIs that also targets Azure DevOps Server on-premises, including older collections. Most calls take organizationId and projectId, so one connection can reach across an organization rather than a single project.
An Azure DevOps account with access to the organization, and Node.js v16 or higher; it runs as npx -y @tiberriver256/mcp-server-azure-devops. AZURE_DEVOPS_ORG_URL is the one required variable — the full organization or collection URL. AZURE_DEVOPS_AUTH_METHOD picks between pat, azure-identity and azure-cli and defaults to azure-identity; pat reads AZURE_DEVOPS_PAT, and a service principal additionally needs AZURE_TENANT_ID, AZURE_CLIENT_ID and AZURE_CLIENT_SECRET. Azure DevOps Server on-premises supports PAT only. AZURE_DEVOPS_DEFAULT_PROJECT saves naming a project on every call; AZURE_DEVOPS_API_VERSION and LOG_LEVEL are optional.
One command plus a key — npx -y @tiberriver256/mcp-server-azure-devops, then supply credentials
USE CASES
Read the checks and policy evaluations blocking it, then follow the pipeline and run ids they report into the stage timeline and the specific log lines.
Pull the changed files with their unified diffs, leave a comment on a specific file and line, and resolve the thread when it is addressed.
Branch from the target, commit the file changes, and open the pull request with reviewers and the work items it closes attached.
Create it with type, area path, iteration and assignee, then link it to the parent or related item it belongs with.
See the repositories and the tree across their default branches, then read the specific files, so exploring does not mean cloning first.
Search code, wiki pages and work items for the same phrase, then open the wiki page that turns out to hold the answer.
Trigger the pipeline on a branch with variables and template parameters, then read the run and fetch text out of the artifact it produced.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
add_pull_request_commentAdd a comment to a pull request (repositoryId optional; derived from pullRequestId when omitted)
create_branchCreate a new branch from an existing one
create_commitCreate a commit on an existing branch using file changes.
🎯 RECOMMENDED: Use the SEARCH/REPLACE format (much easier, no line counting!).
Option 1: SEARCH/REPLACE format (EASIEST) Simply provide the exact text to find and replace:
{
"changes": [{
"path": "src/api/services/function-call.ts",
"search": "return axios.post(apiUrl, payload, requestConfig);",
"replace": "return axios.post(apiUrl, payload, requestConfig).then(r => { processResponse(r); return r; });"
}]
}The server fetches the file, performs the replacement, and generates the diff automatically. No line counting, no hunk headers, no context lines needed!
Option 2: UNIFIED DIFF format (Advanced) If you prefer full control, provide complete unified diffs:
--- a/filepath and +++ /dev/null--- /dev/null and +++ b/filepathExample unified diff:
{
"changes": [{
"patch": "diff --git a/file.yaml b/file.yaml\n--- a/file.yaml\n+++ b/file.yaml\n@@ -4,7 +4,7 @@ spec:\n spec:\n type: ClusterIP\n ports:\n- - port: 8080\n+ - port: 9090\n targetPort: http\n"
}]
}create_pull_requestCreate a new pull request, including reviewers, linked work items, and optional tags
create_wikiCreate a new wiki in the project
create_wiki_pageCreate a new page in a wiki. If the page already exists at the specified path, it will be updated.
create_work_itemCreate a new work item
download_pipeline_artifactDownload a file from a pipeline run artifact and return its textual content
get_all_repositories_treeDisplays a hierarchical tree view of files and directories across multiple Azure DevOps repositories within a project, based on their default branches
get_file_contentGet content of a file or directory from a repository
get_meGet details of the authenticated user (id, displayName, email)
get_pipelineGet details of a specific pipeline
get_pipeline_logRetrieve a specific pipeline log using the timeline log identifier
get_pipeline_runGet details for a specific pipeline run
get_projectGet details of a specific project
get_project_detailsGet comprehensive details of a project including process, work item types, and teams
get_pull_requestGet a pull request by ID (no repositoryId required; best for Azure DevOps Server where PR IDs are project-scoped)
get_pull_request_changesGet the files changed in a pull request, their unified diffs, source/target branch names, and the status of policy evaluations
get_pull_request_checksSummarize the latest status checks and policy evaluations for a pull request.
get_pull_request_commentsGet comments from a specific pull request
get_repositoryGet details of a specific repository
get_repository_detailsGet detailed information about a repository including statistics and refs
get_repository_treeDisplays a hierarchical tree view of files and directories within a single repository starting from an optional path
get_wiki_pageGet the content of a wiki page
get_wikisGet details of wikis in a project
get_work_itemGet details of a specific work item
get_work_item_commentsGet comments and discussion history for a specific work item
list_commitsList recent commits on a branch including file-level diff content for each commit
list_organizationsList all Azure DevOps organizations accessible to the current authentication
list_pipeline_runsList recent runs for a pipeline
list_pipelinesList pipelines in a project
list_projectsList all projects in an organization
list_pull_requestsList pull requests in a repository
list_repositoriesList repositories in a project
list_wiki_pagesList pages within an Azure DevOps wiki
list_work_itemsList work items in a project
manage_work_item_linkAdd or remove links between work items
pipeline_timelineRetrieve the timeline of stages and jobs for a pipeline run, to reduce the amount of data returned, you can filter by state and result
search_codeSearch for code across repositories in a project
search_wikiSearch for content across wiki pages in a project
search_work_itemsSearch for work items across projects in Azure DevOps
trigger_pipelineTrigger a pipeline run
update_pull_requestUpdate an existing pull request with new properties, manage reviewers and work items, and add or remove tags
update_pull_request_thread_statusUpdate the status of a comment thread in a pull request (repositoryId optional; derived from pullRequestId when omitted)
update_wiki_pageUpdate content of a wiki page
update_work_itemUpdate an existing work item
BEFORE YOU INSTALL
46 tools when we connected. get_me and list_organizations work only on Azure DevOps Services, so an on-premises Azure DevOps Server install has 44. Six tools, including create_wiki and list_commits, are undocumented.
All 6 documented setups run the server on your machine.
CONTEXT COST
Rated by the size of the 46 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx -y @tiberriver256/mcp-server-azure-devops{
"mcpServers": {
"azureDevOps": {
"command": "npx",
"args": [
"-y",
"@tiberriver256/mcp-server-azure-devops"
],
"env": {
"AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/<YOUR_ORGANIZATION>",
"AZURE_DEVOPS_AUTH_METHOD": "azure-identity",
"AZURE_DEVOPS_DEFAULT_PROJECT": "<YOUR_AZURE_DEVOPS_DEFAULT_PROJECT>"
}
}
}
}{
"mcpServers": {
"azureDevOps": {
"command": "npx",
"args": [
"-y",
"@tiberriver256/mcp-server-azure-devops"
],
"env": {
"AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/<YOUR_ORGANIZATION>",
"AZURE_DEVOPS_AUTH_METHOD": "pat",
"AZURE_DEVOPS_PAT": "<YOUR_PAT>",
"AZURE_DEVOPS_DEFAULT_PROJECT": "<YOUR_AZURE_DEVOPS_DEFAULT_PROJECT>"
}
}
}
}{
"mcpServers": {
"azureDevOps": {
"command": "npx",
"args": [
"-y",
"@tiberriver256/mcp-server-azure-devops"
],
"env": {
"AZURE_DEVOPS_ORG_URL": "https://server:8080/tfs/DefaultCollection",
"AZURE_DEVOPS_AUTH_METHOD": "pat",
"AZURE_DEVOPS_PAT": "<YOUR_PAT>",
"AZURE_DEVOPS_DEFAULT_PROJECT": "<YOUR_AZURE_DEVOPS_DEFAULT_PROJECT>"
}
}
}
}