Azure DevOps MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Azure DevOps MCP Server list open pull requests in project MyProject"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Azure DevOps MCP Server
A Model Context Protocol (MCP) server for Azure DevOps Server 2022 (on-premise) that exposes Azure DevOps capabilities as AI-callable tools — letting any MCP-compatible AI assistant query pipelines, pull requests, builds, repositories, and work items through natural language.
What can it do?
Ask your AI assistant in plain language — the MCP server handles the Azure DevOps REST API calls:
Simple queries
"List all projects in the collection"
"What branches does the backend repository have?"
"Show me all open pull requests"
"What's the status of the last build?"
"Who is assigned to work item #42?"
"Read the appsettings.json from the main branch"Moderate queries
"List all failed builds in the last 24 hours and which pipelines they belong to"
"Show me the open PRs targeting the main branch and their reviewers"
"Find all active bugs in the project"
"Create a pull request from feature/payment to develop with a description"
"Add John as a reviewer to PR #87"
"Run the pipeline named 'deploy-staging' on the release branch"
"What was the last pipeline that ran on agent pool win19-prod-bi?"
"How many builds completed this week compared to last week?"
"How many build agents are online right now?"Complex queries
"Which PRs opened in the last 48 hours still have no reviewer? Group them by repository."
"Get the logs of the last failed build for the 'deploy-prod' pipeline and summarize what went wrong"
"Find all In Progress work items assigned to me and list them by priority"
"Show me all unresolved review comments on PR #112 — what feedback is still pending?"
"How many completed builds ran in the last 7 days vs the 7 days before that? What is the percentage change?"
"Find high-priority work items that haven't been updated in more than 3 days"
"Which repositories have open PRs with no reviewer and at least one unresolved comment?"
"Which agent pools are available, and how many agents are online in each pool?"Related MCP server: Azure DevOps MCP Server
Available Tools
Projects
Tool | Description |
| List all projects in the collection |
Repositories & Branches
Tool | Description |
| List Git repositories in a project |
| List branches of a repository |
| Read file content from a repository at any branch |
Pull Requests
Tool | Description |
| List PRs across all repos in a project (filter by status) |
| Find open PRs with no reviewer, with optional time window (e.g. last 24 hours) |
| Get PR details: description, merge status, reviewers and their votes |
| Get review comment threads on a PR (filter by active/resolved) |
| Add a reviewer to a PR by email or display name |
| Create a new PR from source to target branch (supports draft) |
Pipelines & Builds
Tool | Description |
| List all pipeline definitions in a project |
| List available agent pools/queues in a project |
| List agents across all pools or a specific pool with online/offline status and counts |
| Get the most recent build — filter by pipeline name or agent pool name |
| List builds with filters: pipeline (by ID or |
| Find failed/partial builds in the last N hours |
| Get details of a specific build |
| Fetch console log output of a build (auto-truncated, last 150 lines). Set |
| Find and run a pipeline by name (partial match, no ID needed) |
| Queue a pipeline run by numeric ID |
Work Items
Tool | Description |
| Search work items by type, state, assignee, or keyword using WIQL |
| Get full details of a work item by ID |
| Create a new work item (Bug, Task, User Story, etc.) |
| Update fields of an existing work item (state, assignee, title, etc.) |
Classic Release Pipelines
Tool | Description |
| List classic release pipeline definitions with their stages |
| List releases with per-stage deployment status — filter by pipeline name and/or stage name (e.g. "last release deployed to Shatel") |
| Get full details of a release: all stage statuses, deploy times, and artifact versions |
| Get the list of commits / TFVC changesets included in a release (answers "what changed in this deployment?") |
Architecture
AI Client (Claude, Open WebUI, etc.)
│ MCP Protocol (JSON-RPC)
▼
┌─────────────────────────┐
│ Azure DevOps MCP │
│ ───────────────── │
│ HTTP (Kubernetes) or │
│ stdio (local) │
│ │
│ tools/ │
│ projects.ts │
│ repos.ts │
│ pipelines.ts │
│ workitems.ts │
└────────────┬────────────┘
│ REST API (api-version 7.0)
│ Basic Auth (PAT)
▼
┌─────────────────────────┐
│ Azure DevOps Server │
│ 2022 (on-premise) │
└─────────────────────────┘Transport: Stateless Streamable HTTP for Kubernetes (scales horizontally, no sticky sessions) or stdio for local use
Auth: Personal Access Token via HTTP Basic auth (
Authorization: Basic base64(:<PAT>))API version: 7.0 — the highest supported by Azure DevOps Server 2022.0.x
Requirements
Node.js 20+
Azure DevOps Server 2022 (on-premise)
A Personal Access Token with:
Code (Read & Write)— for repo, branch, file, and pull request toolsBuild (Read & Execute)— for pipeline and build toolsWork Items (Read & Write)— for work item tools
Quick Start
Local (stdio — for Claude Desktop / Claude Code)
npm install
npm run build
# Register with Claude Code
claude mcp add azure-devops \
--env AZDO_ORG_URL=https://your-server.example.com/YourCollection \
--env AZDO_PAT=your_pat_here \
--env AZDO_PROJECT=YourProject \
-- node dist/index.jsDocker
# Build
docker build -t your-registry/azure-devops-mcp:1.0.0 .
# Run locally for testing
docker run -p 3000:3000 \
-e AZDO_ORG_URL=https://your-server.example.com/YourCollection \
-e AZDO_PAT=your_pat_here \
-e AZDO_PROJECT=YourProject \
your-registry/azure-devops-mcp:1.0.0Kubernetes
# 1. Create namespace
kubectl create namespace mcp-servers
# 2. Create secret (keep PAT out of git)
kubectl create secret generic azure-devops-mcp-secret \
--namespace mcp-servers \
--from-literal=AZDO_PAT='your_pat_here'
# 3. Edit k8s/configmap.yaml with your AZDO_ORG_URL and AZDO_PROJECT
# 4. Apply manifests
kubectl apply -f k8s/configmap.yaml
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml
# 5. Verify
kubectl -n mcp-servers rollout status deploy/azure-devops-mcpIn-cluster endpoint:
http://azure-devops-mcp.mcp-servers.svc.cluster.local/mcpQuick test with port-forward
# Terminal 1
kubectl -n mcp-servers port-forward deploy/azure-devops-mcp 3000:3000
# Terminal 2 — health check
curl http://127.0.0.1:3000/healthz
# Terminal 2 — list projects
curl -sS -X POST http://127.0.0.1:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
--data-binary '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_projects","arguments":{}}}'Configuration
Environment Variables
Variable | Required | Description |
| Yes | Collection URL, e.g. |
| Yes | Personal Access Token |
| No | Default project — avoids passing project name in every request |
| No | Default: |
| No |
|
| No | HTTP port, default: |
| No | Endpoint path, default: |
.env example
AZDO_ORG_URL=https://your-server.example.com/YourCollection
AZDO_PAT=your_pat_here
AZDO_PROJECT=YourProject
MCP_TRANSPORT=http
PORT=3000Project Structure
src/
├── index.ts Entry point — selects transport based on MCP_TRANSPORT
├── config.ts Env var reading and validation
├── server.ts MCP server construction and tool registration
├── azureClient.ts REST client with PAT Basic auth and 30s timeout
├── httpServer.ts Stateless Streamable HTTP transport for Kubernetes
└── tools/
├── projects.ts Project discovery tools
├── repos.ts Repository, branch, and pull request tools
├── pipelines.ts Pipeline and build tools
├── workitems.ts Work item tools (WIQL, create, update)
└── helpers.ts Shared utilities (response formatting, truncation)
k8s/
├── configmap.yaml Non-secret configuration
├── deployment.yaml Kubernetes Deployment (non-root, read-only FS)
└── service.yaml ClusterIP ServiceTechnical Notes
Stateless HTTP: Each request creates an independent MCP server instance — scales horizontally without sticky sessions.
Health check:
GET /healthzfor Kubernetes liveness and readiness probes.API version 7.0: Azure DevOps Server 2022.0.x supports up to 7.0 only. Version 7.1 is available in Azure DevOps Services (cloud) and Server 2022.1+.
Response truncation: Tool responses are capped at 24,000 characters to avoid flooding the model context window.
Request timeout: All Azure DevOps API calls abort after 30 seconds with a clear error message.
Container security: Runs as non-root user 1000, read-only root filesystem, all Linux capabilities dropped.
Weak model friendly: Tools return pre-processed, ready-to-answer data rather than raw JSON — works well with smaller models that struggle to process large API responses.
License
MIT
Available Tools
16 toolscreate_pull_requestCreate pull requestB
Create a new pull request from a source branch into a target branch.
Inputs: repositoryId (required), sourceBranch (required), targetBranch (required), title (required), +3 more.
get_buildGet buildB
Get details of a single build by id.
Inputs: buildId (required), project.
get_build_logsGet build logsA
Fetch the console log output of a build. Use this when the user asks for build logs, error details, failure reason, or what went wrong in a build. Returns log text per stage/task. Large logs are automatically truncated to the last 150 lines per entry.
Inputs: buildId (required), project, maxLinesPerEntry.
get_file_contentGet file contentB
Read the content of a file from a repository at an optional branch.
Inputs: repositoryId (required), path (required), project, branch.
get_last_buildGet last build statusA
Get the status and result of the most recent build in a project. Use this to answer questions like 'what is the last pipeline status?', 'did the last build succeed?', 'what ran last?'. Optionally filter by pipeline name (partial match). Returns: buildNumber, status (inProgress/completed), result (succeeded/failed/partiallySucceeded/canceled), pipeline name, branch, who triggered it, and start/finish time.
Inputs: project, pipelineName.
get_pull_requestGet pull requestA
Get details of a single pull request by id.
Inputs: repositoryId (required), pullRequestId (required), project.
list_branchesList branchesB
List branches (refs/heads) of a repository.
Inputs: repositoryId (required), project.
list_buildsList buildsB
List recent builds in a project, optionally filtered by pipeline/definition.
Inputs: project, definitionId, top, statusFilter.
list_failed_buildsList failed buildsA
Find builds that failed or partially succeeded in the last N hours. Use this for questions like 'آیا build شکستخوردهای داشتیم؟', 'failed builds in the last 24 hours', 'what broke today?', 'build failures this week'. Returns: pipeline name, result, branch, who triggered it, and when it ran.
Inputs: project, hours, includePartial, top.
list_pipelinesList pipelinesC
List pipelines defined in a project.
Inputs: project.
list_projectsList projectsA
List all projects in the Azure DevOps collection. Call this first when the project name is unknown or a lookup by name fails.
Inputs: no named parameters.
list_prs_without_reviewerList PRs without reviewerA
Find open pull requests that have no reviewer assigned, optionally within a time window. Use this for: 'which PRs have no reviewer?', 'unreviewed PRs in last 24 hours', 'PRs waiting for review this week'. Use the hours parameter to filter by creation date (e.g. hours=24 for last 24 hours). Omit hours to return all open PRs without a reviewer regardless of age.
Inputs: project, hours, top.
list_pull_requestsList pull requestsA
List pull requests across ALL repositories in a project, or filter to one repository. Use this for questions like 'show all open PRs', 'which PRs have no reviewer', 'list PRs in project X'. Leave repositoryId empty to search the whole project at once.
Inputs: project, repositoryId, status, top.
list_repositoriesList repositoriesB
List all Git repositories in a project.
Inputs: project.
run_pipelineRun pipelineA
Queue a new run of a pipeline by its numeric id. Use run_pipeline_by_name if you only know the name.
Inputs: pipelineId (required), project, branch.
run_pipeline_by_nameRun pipeline by nameA
Find a pipeline by name and run it. Use this when the user says 'run pipeline X', 'اجرا کن pipeline X', 'trigger X'. Searches for the pipeline by partial name match, then queues a run automatically. No need to call list_pipelines first.
Inputs: pipelineName (required), project, branch.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Each tool has a clearly distinct purpose: PR creation vs retrieval, build logs vs build listing, specialized tools for failed builds or unreviewed PRs. There is no functional overlap that would cause ambiguity.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., create_pull_request, get_last_build, list_repositories). The naming is predictable and uniform across the entire set.
16 tools cover core Azure DevOps operations (projects, repos, branches, PRs, builds, pipelines) without being bloated. Each tool serves a necessary function, and the count is appropriate for the domain.
The tool surface covers essential CRUD-like operations for PRs, builds, and pipelines. Minor gaps exist (e.g., no update or merge for PRs, no build cancellation), but the most common agent scenarios are supported.
Maintenance
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Plan Salesforce deploys, open pull requests and trigger pipelines from your AI client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Azure DevOps to manage work items, Git repositories, branches, commits, and projects through natural language commands.888 npm5MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to interact with Azure DevOps APIs for managing projects, work items, repositories, pull requests, and pipelines through natural language.51 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Azure DevOps entities like projects, repositories, work items, pull requests, and pipelines.15 npm17MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Azure DevOps APIs for managing projects, work items, repositories, pull requests, pipelines, and more through natural language.14,175 npmMIT