Azure DevOps MCP Server
A READ-ONLY MCP (Model Context Protocol) server that connects AI assistants to Azure DevOps Server (on-premises). Works with Claude Code CLI, VS Code AI extensions (Continue, Cline), Cursor, and any MCP-compatible client.
Features
- Projects: List and explore projects
- Git/Repos: Browse repositories, commits, branches, pull requests, diffs, and code search
- Builds: List builds, view logs, analyze errors
- Work Items: Query work items, find linked commits/PRs
- Releases: View releases and deployment status
- Pipelines: List YAML pipelines, view runs, get pipeline configuration
- Test Results: View test runs, results, and analyze failures
Prerequisites
- Node.js 18 or higher
- Azure DevOps Server 2020 or 2022 (on-premises)
- Personal Access Token (PAT) with read scopes
Installation
Option 1: npm (Recommended)
npx azure-devops-mcp@latest
Option 2: Clone and Build
git clone https://github.com/elad-nofy/azure-devops-mcp.git
cd azure-devops-mcp
npm install
npm run build
Configuration
Create a Personal Access Token (PAT)
- Go to Azure DevOps Server
- Click on your profile icon > Security > Personal access tokens
- Create a new token with the following scopes:
- Code: Read
- Build: Read
- Work Items: Read
- Release: Read
- Test Management: Read
Configure MCP Client
Claude Code CLI
Add to your global settings (~/.claude.json on macOS/Linux, %USERPROFILE%\.claude.json on Windows):
Windows:
{
"mcpServers": {
"azure-devops": {
"command": "cmd",
"args": ["/c", "npx", "azure-devops-mcp"],
"env": {
"AZURE_DEVOPS_URL": "http://your-tfs-server:8080/tfs",
"AZURE_DEVOPS_PAT": "your-personal-access-token",
"AZURE_DEVOPS_COLLECTION": "YourCollection",
"AZURE_DEVOPS_PROJECT": "YourDefaultProject"
}
}
}
}
macOS / Linux:
{
"mcpServers": {
"azure-devops": {
"command": "npx",
"args": ["azure-devops-mcp"],
"env": {
"AZURE_DEVOPS_URL": "http://your-tfs-server:8080/tfs",
"AZURE_DEVOPS_PAT": "your-personal-access-token",
"AZURE_DEVOPS_COLLECTION": "YourCollection",
"AZURE_DEVOPS_PROJECT": "YourDefaultProject"
}
}
}
}
VS Code (Continue/Cline)
Add similar configuration to the extension's MCP settings.
Environment Variables
Available Tools
Projects
Git / Repositories
Builds
Work Items
Releases
Pipelines
Test Results
Usage Examples
Once configured, you can ask your AI assistant questions like:
- "Show me the recent builds for project X"
- "What's the status of PR #123?"
- "List all bugs assigned to me"
- "Show me the commits from last week"
- "Why did build #456 fail?"
- "What tests failed in build #789?"
- "Compare branches Dev/9.1 and Dev/9.2"
- "Search for 'IMediator' in the Controllers folder"
Development
# Install dependencies
npm install
# Build
npm run build
# Watch mode
npm run dev
Troubleshooting
Connection errors
- Verify
AZURE_DEVOPS_URLis correct and accessible - Check if your PAT has not expired
- Ensure your network allows connection to the server
Permission errors
- Verify PAT has required scopes
- Check if you have access to the project/repository
"Project is required" errors
- Set
AZURE_DEVOPS_PROJECTenvironment variable, or - Pass
projectparameter in tool calls
License
MIT