azure-devops-pullrequest
mcp server for ADO pull requests
claude mcp add --transport stdio oshvartz-azure-devops-pullrequest-mcp-server dotnet path/to/bin/Release/net8.0/AzureDevopsPullrequestMcpServer.dll \ --env AZURE_DEVOPS_PAT="your-pat-token"
How to use
Azure DevOps Pull Request MCP Server exposes three tools for interacting with Azure DevOps pull requests: GetPrDetails, GetPrThreads, and CreatePrThread. You can use it to fetch PR metadata, retrieve existing review threads, and create new review comments anchored to a specific file and location within the PR branch. The server supports two authentication methods: Azure Identity (recommended) using DefaultAzureCredential, or a legacy PAT token. When PAT is not provided, the server will attempt to authenticate via Azure Identity automatically. Typical usage involves running the server and invoking the available tools through MCP prompts or an integrated client, then issuing commands to fetch PR information, list or inspect threads, and add new comments at precise file paths and line ranges.
For a PR review workflow, you would first use GetPrDetails to obtain context about the PR, then optionally GetPrThreads to review current discussions, and finally CreatePrThread to add a new comment tied to a specific file and line range. Each tool accepts a structured input with the PR URL and relevant context. These tools enable a guided PR review experience within an MCP-enabled environment.
How to install
Prerequisites:
- .NET 8.0 SDK installed
- Access to Azure DevOps (or PAT if using legacy auth)
- Git installed (for cloning/building if you’re pulling from source)
Installation steps:
-
Clone the repository: git clone https://example.com/your-repo.git cd your-repo
-
Build the MCP server: dotnet build -c Release
-
Run or configure in your MCP settings:
- If using the built DLL directly in VSCode settings, ensure the path in mcpServers.azure-devops-pr.args points to the built DLL, e.g. path/to/bin/Release/net8.0/AzureDevopsPullrequestMcpServer.dll.
- If you prefer running directly for testing: dotnet path/to/bin/Release/net8.0/AzureDevopsPullrequestMcpServer.dll
-
Configure authentication (choose one):
- Recommended: Use Azure Identity by not setting AZURE_DEVOPS_PAT. The server will use DefaultAzureCredential automatically.
- Legacy PAT: If using PAT, set AZURE_DEVOPS_PAT in the mcp configuration or environment as described in the README, and provide the PAT with appropriate scopes.
-
Verify the MCP server appears in your Connected MCP Servers list and is ready to accept commands.
Additional notes
Tips and notes:
- If AZURE_DEVOPS_PAT is not provided, the server will attempt to authenticate using DefaultAzureCredential (recommended), which supports managed identities and other Azure authentication methods.
- For PAT-based authentication, ensure the token has Code (Read & Write) and Pull Request Threads (Read & Write) scopes.
- The timeout setting controls operation timeouts in seconds (default 60).
- The transportType is stdio for in-editor usage; adjust if you’re integrating with a different IPC mechanism.
- When configuring, remember to replace path/to with the actual path to your built DLL and, if necessary, adjust the server name in mcpServers to match your deployment.
Related MCP Servers
mssql
MSSQL Server MCP implementation written in C#
McpDotNet.Extensions.SemanticKernel
Microsoft SemanticKernel integration for the Model Context Protocol (MCP). Enables seamless use of MCP tools as AI functions.
DatabaseMcpServer
MCP server from ttcc666/DatabaseMcpServer
mcp-dataverse
MCP Server for querying Dataverse using SQL
xperience-community
ASP.NET Core MCP server for Xperience by Kentico projects
console-to-http
Example of converting a stdio MCP server to HTTP using ModelContextProtocol.AspNetCore