Claude Code Tools

azure-devops-mcp

official

MCP server for Azure DevOps Server 2022 / TFS - READ-ONLY access to builds, work items, releases, git, pipelines, and test results

Version
1.1.2
Last Updated
2026-01-22
Source
official

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

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)

  1. Go to Azure DevOps Server
  2. Click on your profile icon > Security > Personal access tokens
  3. 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

VariableRequiredDescription
AZURE_DEVOPS_URLYesServer base URL (e.g., http://tfs:8080/tfs)
AZURE_DEVOPS_PATYesPersonal Access Token
AZURE_DEVOPS_COLLECTIONNoCollection name (default: DefaultCollection)
AZURE_DEVOPS_PROJECTNoDefault project for commands

Available Tools

Projects

ToolDescription
test_connectionTest connection to Azure DevOps and verify authentication
list_projectsList all projects in the organization
get_projectGet detailed project information

Git / Repositories

ToolDescription
list_reposList repositories in a project
list_branchesList branches in a repository
list_commitsGet commit history with filters
get_commitGet commit details with changes
get_commit_diffGet file diff for a commit
list_pull_requestsList pull requests
get_pull_requestGet PR details with comments
compare_branchesCompare two branches (regression analysis)
search_codeSearch for text in repository files
get_file_contentGet file content from a repo at a specific branch/commit
get_commits_for_work_itemFind commits referencing a work item
get_prs_for_work_itemFind PRs linked to a work item

Builds

ToolDescription
list_buildsList recent builds
get_buildGet build details
get_build_logsGet build logs
list_build_definitionsList build definitions
analyze_build_errorsExtract errors from failed builds

Work Items

ToolDescription
query_work_itemsSearch work items (WIQL or filters)
get_work_itemGet work item details
list_work_item_typesList available work item types
list_iterationsList iterations/sprints in a project
list_areasList area paths in a project

Releases

ToolDescription
list_releasesList releases
get_releaseGet release details
list_release_definitionsList release definitions
get_release_logsGet deployment logs

Pipelines

ToolDescription
list_pipelinesList YAML pipelines
get_pipeline_runsGet recent pipeline runs
get_pipeline_yamlGet pipeline YAML configuration
get_pipeline_variablesGet pipeline variables

Test Results

ToolDescription
list_test_runsList test runs in a project
get_test_runGet test run details
get_test_resultsGet test results from a run
get_failed_testsGet failed tests from a run
get_test_runs_for_buildGet test runs for a specific build
analyze_test_failuresAnalyze and group test failures

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_URL is 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_PROJECT environment variable, or
  • Pass project parameter in tool calls

License

MIT