Skip to main content
Glama
Azure DevOps MCP Server
by Elad-Health

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

Related MCP server: mcp-devops-onpremise

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

Variable

Required

Description

AZURE_DEVOPS_URL

Yes

Server base URL (e.g., http://tfs:8080/tfs)

AZURE_DEVOPS_PAT

Yes

Personal Access Token

AZURE_DEVOPS_COLLECTION

No

Collection name (default: DefaultCollection)

AZURE_DEVOPS_PROJECT

No

Default project for commands

Available Tools

Projects

Tool

Description

test_connection

Test connection to Azure DevOps and verify authentication

list_projects

List all projects in the organization

get_project

Get detailed project information

Git / Repositories

Tool

Description

list_repos

List repositories in a project

list_branches

List branches in a repository

list_commits

Get commit history with filters

get_commit

Get commit details with changes

get_commit_diff

Get file diff for a commit

list_pull_requests

List pull requests

get_pull_request

Get PR details with comments

compare_branches

Compare two branches (regression analysis)

search_code

Search for text in repository files

get_file_content

Get file content from a repo at a specific branch/commit

get_commits_for_work_item

Find commits referencing a work item

get_prs_for_work_item

Find PRs linked to a work item

Builds

Tool

Description

list_builds

List recent builds

get_build

Get build details

get_build_logs

Get build logs

list_build_definitions

List build definitions

analyze_build_errors

Extract errors from failed builds

Work Items

Tool

Description

query_work_items

Search work items (WIQL or filters)

get_work_item

Get work item details

list_work_item_types

List available work item types

list_iterations

List iterations/sprints in a project

list_areas

List area paths in a project

Releases

Tool

Description

list_releases

List releases

get_release

Get release details

list_release_definitions

List release definitions

get_release_logs

Get deployment logs

Pipelines

Tool

Description

list_pipelines

List YAML pipelines

get_pipeline_runs

Get recent pipeline runs

get_pipeline_yaml

Get pipeline YAML configuration

get_pipeline_variables

Get pipeline variables

Test Results

Tool

Description

list_test_runs

List test runs in a project

get_test_run

Get test run details

get_test_results

Get test results from a run

get_failed_tests

Get failed tests from a run

get_test_runs_for_build

Get test runs for a specific build

analyze_test_failures

Analyze 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

Available Tools

39 tools
analyze_build_errorsA

Analyze a failed build and extract errors, warnings, and issues from logs

NameRequiredDescriptionDefault
projectNoProject name
buildIdYesBuild ID to analyze
analyze_test_failuresB

Analyze test failures in a build - groups failures by error type

NameRequiredDescriptionDefault
projectNoProject name
buildIdYesBuild ID to analyze
compare_branchesA

Compare two branches - shows commits in target that are not in base (useful for regression analysis)

NameRequiredDescriptionDefault
projectNoProject name
repositoryYesRepository name or ID
baseBranchYesBase branch (e.g., "main" or "refs/heads/main")
targetBranchYesTarget branch to compare (e.g., "develop")
topNoMax commits to return
get_buildA

Get detailed information about a specific build

NameRequiredDescriptionDefault
projectNoProject name
buildIdYesBuild ID
get_build_logsB

Get build logs - useful for analyzing build errors and failures

NameRequiredDescriptionDefault
projectNoProject name
buildIdYesBuild ID
logIdNoSpecific log ID (omit to get log list first)
get_commitB

Get detailed information about a specific commit including changes

NameRequiredDescriptionDefault
projectNoProject name
repositoryYesRepository name or ID
commitIdYesFull commit SHA
includeChangesNoInclude file changes
get_commit_diffA

Get the diff/changes for a file in a commit

NameRequiredDescriptionDefault
projectNoProject name
repositoryYesRepository name or ID
commitIdYesCommit SHA
pathYesFile path to get diff for
get_commits_for_work_itemA

Find commits associated with a work item ID (searches commit messages for #ID)

NameRequiredDescriptionDefault
projectNoProject name
repositoryYesRepository name or ID
workItemIdYesWork item ID to search for
topNoMax commits to return
get_failed_testsA

Get failed tests from a test run - useful for investigating failures

NameRequiredDescriptionDefault
projectNoProject name
runIdYesTest run ID
get_file_contentA

Get the content of a file from a repository at a specific branch or commit

NameRequiredDescriptionDefault
projectNoProject name
repositoryYesRepository name or ID
pathYesFile path (e.g., "/src/index.ts")
branchNoBranch name (e.g., "main")
commitIdNoSpecific commit SHA (overrides branch)
get_pipeline_runsC

Get recent runs for a pipeline

NameRequiredDescriptionDefault
projectNoProject name
pipelineIdYesPipeline/definition ID
branchNoFilter by branch
topNoMax runs to return
get_pipeline_variablesB

Get variables defined for a pipeline

NameRequiredDescriptionDefault
projectNoProject name
pipelineIdYesPipeline/definition ID
get_pipeline_yamlB

Get the YAML configuration for a pipeline

NameRequiredDescriptionDefault
projectNoProject name
pipelineIdYesPipeline/definition ID
get_projectA

Get detailed information about a specific project

NameRequiredDescriptionDefault
projectYesProject name or ID
get_prs_for_work_itemB

Find pull requests linked to a work item

NameRequiredDescriptionDefault
projectNoProject name
repositoryYesRepository name or ID
workItemIdYesWork item ID
get_pull_requestA

Get detailed information about a pull request including comments and threads

NameRequiredDescriptionDefault
projectNoProject name
repositoryYesRepository name or ID
pullRequestIdYesPull request ID
get_releaseB

Get detailed information about a specific release

NameRequiredDescriptionDefault
projectNoProject name
releaseIdYesRelease ID
get_release_logsA

Get deployment logs for a release environment

NameRequiredDescriptionDefault
projectNoProject name
releaseIdYesRelease ID
environmentIdYesEnvironment ID
get_test_resultsB

Get test results from a test run - shows which tests passed/failed

NameRequiredDescriptionDefault
projectNoProject name
runIdYesTest run ID
topNoMax results to return
get_test_runB

Get detailed information about a specific test run

NameRequiredDescriptionDefault
projectNoProject name
runIdYesTest run ID
get_test_runs_for_buildB

Get test runs associated with a specific build

NameRequiredDescriptionDefault
projectNoProject name
buildIdYesBuild ID
get_work_itemB

Get detailed information about a specific work item

NameRequiredDescriptionDefault
idYesWork item ID
expandNoInclude all fields and relations
list_areasA

List area paths in a project - useful for organizing and filtering work items by team or component

NameRequiredDescriptionDefault
projectNoProject name
depthNoDepth of child areas to return
list_branchesC

List branches in a repository

NameRequiredDescriptionDefault
projectNoProject name
repositoryYesRepository name or ID
list_build_definitionsC

List build/pipeline definitions

NameRequiredDescriptionDefault
projectNoProject name
nameNoFilter by definition name (supports wildcards *)
pathNoFilter by folder path
list_buildsB

List recent builds with status and results

NameRequiredDescriptionDefault
projectNoProject name
definitionsNoFilter by build definition IDs
branchNameNoFilter by branch (e.g., "refs/heads/main")
statusFilterNoFilter by status
resultFilterNoFilter by result
requestedForNoFilter by user who requested the build
topNoMax builds to return
list_commitsB

Get commit history for a repository

NameRequiredDescriptionDefault
projectNoProject name
repositoryYesRepository name or ID
branchNoBranch name (e.g., "refs/heads/main")
authorNoFilter by author email
fromDateNoStart date (ISO format)
toDateNoEnd date (ISO format)
topNoMax commits to return
list_iterationsA

List iterations (sprints) in a project - useful for sprint planning and filtering work items

NameRequiredDescriptionDefault
projectNoProject name
depthNoDepth of child iterations to return
list_pipelinesB

List pipeline definitions in a project

NameRequiredDescriptionDefault
projectNoProject name
nameNoFilter by name (supports * wildcard)
pathNoFilter by folder path
topNoMax pipelines to return
list_projectsA

List all projects in the Azure DevOps organization/collection

NameRequiredDescriptionDefault

No parameters

list_pull_requestsC

List pull requests in a repository

NameRequiredDescriptionDefault
projectNoProject name
repositoryYesRepository name or ID
statusNoPR status filteractive
creatorIdNoFilter by creator ID
reviewerIdNoFilter by reviewer ID
topNoMax PRs to return
list_release_definitionsC

List release/deployment pipeline definitions

NameRequiredDescriptionDefault
projectNoProject name
searchTextNoFilter by name
pathNoFilter by folder path
list_releasesB

List releases with deployment status

NameRequiredDescriptionDefault
projectNoProject name
definitionIdNoFilter by release definition ID
statusFilterNoFilter by status
environmentStatusFilterNoFilter by environment status
topNoMax releases to return
list_reposA

List all Git repositories in a project

NameRequiredDescriptionDefault
projectNoProject name (uses default if not specified)
list_test_runsB

List test runs for a project - useful for finding test execution history

NameRequiredDescriptionDefault
projectNoProject name
buildUriNoFilter by build URI
topNoMax runs to return
list_work_item_typesA

List available work item types in a project

NameRequiredDescriptionDefault
projectNoProject name
query_work_itemsC

Query work items using WIQL (Work Item Query Language) or simple filters

NameRequiredDescriptionDefault
projectNoProject name
wiqlNoWIQL query string (if provided, other filters are ignored)
workItemTypeNoFilter by type (Bug, Task, User Story, etc.)
stateNoFilter by state (Active, Closed, etc.)
assignedToNoFilter by assigned user (use "@Me" for current user)
areaPathNoFilter by area path
iterationPathNoFilter by iteration path
tagsNoFilter by tag
topNoMax items to return
search_codeB

Search for code/text content in a repository

NameRequiredDescriptionDefault
projectNoProject name
repositoryYesRepository name or ID
searchTextYesText to search for in file contents
pathNoFolder path to search in (e.g., "/src")
branchNoBranch to search (default: default branch)
fileExtensionNoFilter by file extension (e.g., ".cs", ".ts")
topNoMax results to return
test_connectionA

Test the connection to Azure DevOps Server and verify authentication

NameRequiredDescriptionDefault

No parameters

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 39 tool updatesv1.1.2
    • First observedanalyze_build_errors
    • First observedanalyze_test_failures
    • First observedcompare_branches
    • First observedget_build
    • First observedget_build_logs
    • First observedget_commit
    • First observedget_commit_diff
    • First observedget_commits_for_work_item
    • First observedget_failed_tests
    • First observedget_file_content
    • First observedget_pipeline_runs
    • First observedget_pipeline_variables
    • First observedget_pipeline_yaml
    • First observedget_project
    • First observedget_prs_for_work_item
    • First observedget_pull_request
    • First observedget_release
    • First observedget_release_logs
    • First observedget_test_results
    • First observedget_test_run
    • First observedget_test_runs_for_build
    • First observedget_work_item
    • First observedlist_areas
    • First observedlist_branches
    • First observedlist_build_definitions
    • First observedlist_builds
    • First observedlist_commits
    • First observedlist_iterations
    • First observedlist_pipelines
    • First observedlist_projects
    • First observedlist_pull_requests
    • First observedlist_release_definitions
    • First observedlist_releases
    • First observedlist_repos
    • First observedlist_test_runs
    • First observedlist_work_item_types
    • First observedquery_work_items
    • First observedsearch_code
    • First observedtest_connection

TDQS

B3.1/5.0

Scored across 39 tools

Disambiguation4/5

Most tools target distinct resources (builds, repos, work items, tests, releases), but some overlap exists, e.g., list_builds vs get_pipeline_runs, and multiple test analysis tools. Descriptions help differentiate, but an agent might occasionally select the wrong tool.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with lowercase and underscores (e.g., list_branches, get_work_item, analyze_build_errors). No mixing of conventions, making the set predictable for agents.

Tool Count3/5

At 39 tools, the count is high but justified by the broad scope of Azure DevOps (builds, repos, work items, tests, releases). However, it exceeds the typical 15-25 range and feels heavy, fitting the 'borderline' description.

Completeness2/5

The tool surface is heavily read-oriented, lacking mutation operations such as create, update, delete for work items, pull requests, pipelines, and releases. This is a significant gap for a DevOps server, likely causing agent failures when workflows require state changes.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers