MCP server for Azure DevOps pull request interactions

MCP server for Azure DevOps pull request interactions

azure-devops-pullrequest-mcp-server•byoshvartz

An MCP server providing tools to retrieve Azure DevOps pull request details and comment threads, and to create new comment threads on specific code locations.

License: MIT License•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •GetPrDetails retrieves details about a specific pull request.
  • •GetPrThreads fetches comment threads from a pull request.
  • •CreatePrThread creates a new comment thread at a specific location in code, taking file path and line or offset context.
  • •Supports Azure Identity authentication via DefaultAzureCredential, with Personal Access Token as a legacy option.

BEST FOR

  • •Performing an assisted pull request review workflow, retrieving PR details and reviewing changed files.
  • •Reading existing review comments in an Azure DevOps pull request.
  • •Adding code review comments to specific files and lines.

ABOUT AZURE-DEVOPS-PULLREQUEST-MCP-SERVER

MCP server for Azure DevOps pull request interactions is cataloged as an MCP server attributed to oshvartz. An MCP server providing tools to retrieve Azure DevOps pull request details and comment threads, and to create new comment threads on specific code locations. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP server for Azure DevOps pull request interactions are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What tools does this MCP server expose?

It exposes GetPrDetails, GetPrThreads, and CreatePrThread.

Which authentication methods are supported?

It recommends Azure Identity using DefaultAzureCredential, and also supports a legacy Personal Access Token option.

上游原版 README

在 GitHub 查看同一版本原文

README.md · af3059f23fd5 · 采集于 2026-11-13 10:55:35 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Azure DevOps Pull Request MCP Server

A Model Context Protocol (MCP) server implementation focused on Azure DevOps pull request interactions. This server provides tools for accessing and manipulating Azure DevOps pull requests, built using the ModelContextProtocol NuGet package.

Overview

This MCP server is designed as a learning project to demonstrate integration with Azure DevOps pull request APIs through the Model Context Protocol. It provides tools for:

  • Retrieving pull request details
  • Fetching pull request threads/comments
  • Creating new comment threads on specific code locations

Project Status

DISCLAIMER: This project is still a Work in Progress (WIP)

Upcoming Features

  • Package server as a dotnet tool for easier installation and usage
  • Enhanced thread support:
    • Ability to respond to existing threads
    • Add comments to existing threads
    • Better thread management capabilities

Usage Examples

PR Review Workflow

To perform a pull request review, you can use the following prompt template:

I want us to review together PR https://dev.azure.com/org/project/_git/repo/pullrequest/123 
First let's have high level review of the PR context and then let's drill down to changed files 
and what was changed there - please share if you have any suggestions or you notice any issues. 
Please verify you are in the local folder of the repo we are doing PR on and switch to the PR 
branch to be able to look at files.

This will trigger the following workflow:

  1. Retrieve PR details using GetPrDetails tool
  2. Analyze PR context and scope
  3. Review changed files in local repo
  4. Provide suggestions using CreatePrThread tool

Creating a New Thread

var input = new AdoCreateThreadInput 
{
    PrUrl = "https://dev.azure.com/org/project/_git/repo/pullrequest/123",
    Content = "Consider using a more descriptive variable name",
    Context = new ThreadContext 
    {
        FilePath = "src/file.cs",
        StartLine = 10,
        EndLine = 10
    }
};

Example Review Session

Prompts you can use during the review:

1. Get PR Overview:
"Let's review PR https://dev.azure.com/org/project/_git/repo/pullrequest/123"

2. Focus on Specific File:
"Can you analyze the changes in src/file.cs?"

3. Add Comment:
"Please add a comment on line 45 of src/file.cs suggesting to use async/await"

4. Get Existing Comments:
"Show me all the review comments in this PR"

Each of these prompts will utilize the appropriate MCP tools:

  • GetPrDetails for PR information
  • GetPrThreads for existing comments
  • CreatePrThread for adding new comments

Requirements

  • .NET 8.0 SDK
  • One of the following authentication methods:
    1. Recommended: Azure Identity Authentication

      • Uses DefaultAzureCredential from Azure.Identity
      • More secure as it supports managed identities and other Azure authentication methods
      • No PAT required
    2. Legacy: Personal Access Token (PAT)

      • Not recommended for security reasons
      • If you must use PAT, it requires the following scopes:
        • Code (Read & Write)
        • Pull Request Threads (Read & Write)

Building and Installing the MCP Server

  1. Clone this repository
  2. Build the project:
dotnet build -c Release
  1. Add the MCP server to your VSCode settings by modifying the MCP settings JSON file.

Add the following configuration to the mcpServers object in your configuration file:

{
  "mcpServers": {
    "azure-devops-pr": {
      "autoApprove": [],
      "disabled": false,
      "timeout": 60,
      "command": "dotnet",
      "args": ["path/to/bin/Release/net8.0/AzureDevopsPullrequestMcpServer.dll"],
      "env": {
        // Optional: Only needed if using PAT authentication (not recommended)
        // "AZURE_DEVOPS_PAT": "your-pat-token"
        // If AZURE_DEVOPS_PAT is not set, DefaultAzureCredential will be used
      },
      "transportType": "stdio"
    }
  }
}

Replace:

  • path/to with the actual path to your built DLL
  • your-pat-token with your Azure DevOps Personal Access Token (only if using PAT authentication)

Note: If AZURE_DEVOPS_PAT is not provided in the configuration, the server will automatically use DefaultAzureCredential for authentication, which is the recommended approach.

Configuration options:

  • timeout: Operation timeout in seconds (default: 60)
  • transportType: Communication protocol (using "stdio")
  • disabled: Whether the server is disabled
  • autoApprove: List of operations that don't require explicit approval

The server will appear in the Connected MCP Servers section as:

azure-devops-pr (dotnet path/to/AzureDevopsPullrequestMcpServer.dll)

With the following available tools:

  • GetPrDetails
  • GetPrThreads
  • CreatePrThread

Usage

The application supports two authentication methods:

  1. Using Azure Identity (Recommended)
# DefaultAzureCredential will be used automatically if PAT is not provided
dotnet run -- --pr-url <azure-devops-pr-url>
  1. Using Personal Access Token (Legacy)
# Not recommended for security reasons
dotnet run -- --pat <your-pat-token> --pr-url <azure-devops-pr-url>

Example:

# Using Azure Identity (Recommended)
dotnet run -- --pr-url https://dev.azure.com/org/project/_git/repo/pullrequest/123

# Using PAT (Not Recommended)
dotnet run -- --pat abc123... --pr-url https://dev.azure.com/org/project/_git/repo/pullrequest/123

Available Tools

GetPrDetails

Retrieves details about a specific pull request.

Input Schema:

{
  "prUrl": "string",
  "includeStatuses": ["string"] | null,
  "excludeStatuses": ["string"] | null
}

GetPrThreads

Fetches comment threads from a pull request.

Input Schema:

{
  "prUrl": "string",
  "includeStatuses": ["string"] | null,
  "excludeStatuses": ["string"] | null
}

CreatePrThread

Creates a new comment thread at a specific location in code.

Input Schema:

{
  "prUrl": "string",
  "content": "string",
  "context": {
    "filePath": "string",
    "startLine": number | null,
    "startOffset": number | null,
    "endLine": number | null,
    "endOffset": number | null
  }
}

Development

Built with:

  • C#/.NET
  • ModelContextProtocol NuGet package
  • Azure DevOps REST APIs

Project Structure

  • src/Models/ - Data models for pull requests and threads
    • PullRequestDetails.cs - PR data structure
    • PullRequestThread.cs - Thread and comment models
    • AdoCreateThreadInput.cs - Thread creation input model
  • src/Services/
    • AdoPullRequestTool.cs - Core API communication service
  • src/Utils/
    • IUrlParser.cs - URL processing utilities

Contributing

This is a learning project demonstrating MCP server implementation. Feel free to use it as a reference for building your own MCP servers or extending its functionality.

License

MIT License

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP server for Azure DevOps pull request interactions from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/azure-devops-pullrequest-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools