Azure PR MCP Server
An MCP server that enables reviewing Azure DevOps Pull Request comments using the Azure CLI, with features like comment retrieval and status filtering.
README
Azure PR MCP Server
A Model Context Protocol (MCP) server for reviewing Azure DevOps Pull Request comments using the Azure CLI.
๐ Readonly.
๐ค Made by the AI for the AI.
Features
- โ Azure CLI Validation - Automatically checks for Azure CLI availability
- ๐ Authentication Handling - Verifies Azure CLI authentication status
- ๐ฌ PR Comment Retrieval - Fetches PR comments with full metadata
- ๐ Status Filtering - Filter comments by status (active, fixed, closed, etc.)
- ๐งช Unit Tests - Comprehensive test coverage using Vitest
Prerequisites
- Node.js >= 18
- pnpm >= 9.0.0
- Azure CLI - Installation guide
- Azure DevOps Organization - Access to an Azure DevOps organization with pull requests
Installation
Install dependencies
pnpm install
Build the project
pnpm build
Azure CLI Setup
-
Install Azure CLI (if not already installed):
- macOS:
brew install azure-cli - Windows: Download from Microsoft Docs
- Linux: Follow Linux installation guide
- macOS:
-
Login to Azure:
az login -
The Azure DevOps extension will be automatically installed when you first use the server.
Usage
Running the MCP Server
The server runs on stdio and is designed to be used with MCP clients:
node dist/index.js
Available Tools
1. check_azure_cli
Checks if Azure CLI is installed and the user is authenticated.
Input: None
Output:
{
"cli_installed": true,
"cli_version": "2.50.0",
"authenticated": true,
"account": "user@example.com",
"devops_extension": true,
"status": "ready"
}
2. get_pr_comments
Retrieves comments from an Azure DevOps Pull Request with optional status filtering.
Input:
pr_url(required): Full Azure DevOps PR URL- Format:
https://dev.azure.com/{org}/{project}/_git/{repo}/pullrequest/{id} - Legacy format:
https://{org}.visualstudio.com/{project}/_git/{repo}/pullrequest/{id}
- Format:
status_filter(optional): Filter by comment status- Options:
active,fixed,closed,wontfix,pending,bydesign,unknown,system
- Options:
Output:
{
"pr_url": "https://dev.azure.com/myorg/myproject/_git/myrepo/pullrequest/123",
"status_filter": "active",
"total_comments": 5,
"comments": [
{
"id": 1,
"thread_id": 100,
"author": "John Doe",
"author_email": "john.doe@example.com",
"content": "Please add error handling here",
"status": "active",
"thread_status": "active",
"comment_type": "text",
"published_date": "2025-11-20T10:30:00Z",
"last_updated_date": "2025-11-20T10:30:00Z"
}
]
}
Example PR URL Formats
https://dev.azure.com/myorg/myproject/_git/myrepo/pullrequest/123
https://myorg.visualstudio.com/myproject/_git/myrepo/pullrequest/456
MCP Client Configuration
VS Code with GitHub Copilot (User-Level Global Configuration)
For global access across all workspaces, add the server to your user-level MCP configuration:
File Location: ~/.config/Code/User/mcp.json (Linux/macOS) or %APPDATA%\Code\User\mcp.json (Windows)
Add this entry to the servers object:
{
"servers": {
"simple-azure-devops-mcp": {
"command": "node",
"type": "stdio",
"args": ["/absolute/path/to/azure-mcp/dist/index.js"]
}
}
}
Important: Replace /absolute/path/to/azure-mcp/dist/index.js with the actual path to your built project.
Setup Steps:
- Build the project:
pnpm build - Edit
~/.config/Code/User/mcp.jsonand add the server configuration - Reload VS Code window (Cmd/Ctrl + Shift + P โ "Developer: Reload Window")
- Open GitHub Copilot Chat
- The MCP tools will be available in all workspaces
VS Code with GitHub Copilot (Workspace Level)
Create or edit .vscode/settings.json to automatically enable MCP server for the current workspace:
{
"github.copilot.chat.mcp.enabled": true,
"github.copilot.chat.mcp.servers": {
"simple-azure-devops-mcp": {
"command": "node",
"args": ["${workspaceFolder}/dist/index.js"]
}
}
}
Setup Steps:
- Open this workspace in VS Code
- Ensure the project is built:
pnpm build - Reload VS Code window (Cmd/Ctrl + Shift + P โ "Developer: Reload Window")
- Open GitHub Copilot Chat
- The MCP tools will be automatically available
Note: Make sure you have GitHub Copilot enabled and MCP support is available in your VS Code version.
VS Code (Cline Extension)
- Install the Cline extension from the VS Code marketplace
- Open Cline Settings (click the gear icon in Cline panel)
- Add MCP Server in the MCP Servers section:
{
"mcpServers": {
"simple-azure-devops-mcp": {
"command": "node",
"args": ["/absolute/path/to/azure-mcp/dist/index.js"]
}
}
}
Important: Use the absolute path to your project. For example:
- Linux/macOS:
/home/username/Code/azure-mcp/dist/index.js - Windows:
C:\\Users\\username\\Code\\azure-mcp\\dist\\index.js
- Restart Cline or reload VS Code
- The tools should now appear in Cline's available tools
VS Code Settings Location
You can also manually edit the Cline configuration file:
- Linux:
~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json - macOS:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json - Windows:
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Claude Desktop
Add this server to your Claude Desktop configuration:
{
"mcpServers": {
"simple-azure-devops-mcp": {
"command": "node",
"args": ["/absolute/path/to/azure-mcp/dist/index.js"]
}
}
}
Configuration file location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Development
This project uses pnpm as its official package manager. Please use pnpm for all package management operations to ensure consistency and proper dependency resolution.
Run tests
pnpm test
Run tests with coverage
pnpm test:coverage
Linting and Formatting
This project uses ESLint for linting and Prettier for code formatting:
# Run linter
pnpm lint
# Fix linting issues automatically
pnpm lint:fix
# Format code with Prettier
pnpm format
# Check formatting without making changes
pnpm format:check
Git Hooks
Husky is configured to run lint-staged on pre-commit, which automatically:
- Runs ESLint with auto-fix on staged TypeScript files
- Formats code with Prettier
This ensures code quality and consistency before commits.
Watch mode for development
pnpm dev
Project Structure
azure-mcp/
โโโ src/
โ โโโ index.ts # Main MCP server
โ โโโ azure-cli.ts # Azure CLI utilities
โ โโโ pr-comments.ts # PR comment retrieval logic
โ โโโ azure-cli.test.ts # Tests for Azure CLI utilities
โ โโโ pr-comments.test.ts # Tests for PR comment parsing
โโโ dist/ # Compiled JavaScript (generated)
โโโ package.json # Package configuration
โโโ tsconfig.json # TypeScript configuration
โโโ vitest.config.ts # Vitest test configuration
โโโ README.md # This file
Comment Status Types
- active: Comment thread is active and requires attention
- fixed: Issue has been addressed
- closed: Thread is closed
- wontfix: Issue won't be addressed
- pending: Waiting for action
- bydesign: Behavior is intentional
- unknown: Status is not determined
- system: System-generated comment
Troubleshooting
Azure CLI not found
Error: Azure CLI is not installed or not available in PATH
Solution: Install Azure CLI and ensure it's in your PATH.
Not authenticated
Error: Not authenticated. Please run: az login
Solution: Run az login and complete the authentication flow.
Azure DevOps extension missing
The server will automatically attempt to install the azure-devops extension. If this fails:
az extension add --name azure-devops
Invalid PR URL format
Error: Invalid Azure DevOps PR URL format
Solution: Ensure your PR URL matches one of these formats:
https://dev.azure.com/{org}/{project}/_git/{repo}/pullrequest/{id}https://{org}.visualstudio.com/{project}/_git/{repo}/pullrequest/{id}
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
pnpm test - Submit a pull request
License
MIT
Resources
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.