Azure DevOps MCP Server

Azure DevOps MCP Server

Focused local MCP server for Azure DevOps Services, Azure Repos, and Azure Boards. It provides ticket-reading and pull-request-review workflows through 31 MCP tools backed by Azure DevOps REST API 7.1.

Category
访问服务器

README

Azure DevOps MCP Server

Local Model Context Protocol (MCP) server for Azure DevOps Services. It exposes 64 tools for Azure Boards, Azure Repos, pull request review and lifecycle management, Azure Pipelines, team sprints/backlogs, and delivery reporting.

Read tools are enabled by default. Every mutation requires both a server-side feature flag and an explicit per-call confirmation. Pull request completion and auto-complete never bypass branch policies.

Capabilities

Azure Boards

  • Read work items, every field, relations, comments, and historical snapshots.
  • Run read-only WIQL SELECT queries and resolve the matching work items.
  • Create and update work items, including state, assignee, tags, area, sprint, and custom fields.
  • Add comments, parent/child/related/dependency/duplicate links, and attachments up to 10 MiB.
  • Use an expected revision to prevent stale work item updates.
  • Trace a ticket to linked pull requests, commits, builds, branches, and related work items.
  • Read the work item's field and relation update history.

Repositories and branches

  • List projects, repositories, clone links, branches, and commits.
  • Create a branch at an exact commit.
  • Delete a branch only when its current object ID matches the caller's expectation.
  • Compare branches with ahead/behind counts and changed items.
  • Find stale branches while excluding protected branch names.

Pull requests and code review

  • List and retrieve pull requests, including direct Azure DevOps PR URLs.
  • Read commits, reviewers/votes, iterations, threads, comments, labels, and linked work items.
  • Generate bounded unified diffs locally and validate exact inline-comment targets.
  • Create and update PRs; switch draft state; abandon or reactivate a PR.
  • Add/remove reviewers and labels; create/reply/resolve review comments; cast votes.
  • Enable policy-respecting auto-complete or merge at an exact reviewed source SHA.
  • Evaluate merge readiness from draft/status, merge state, votes, required reviewers, unresolved threads, policy evaluations, and PR status checks.
  • Produce batch review summaries and stale PR reports.

Azure Pipelines

  • List pipelines, runs, and builds; inspect run state/result.
  • Filter builds by definition, repository, branch, status, and result.
  • Queue or preview a run with a branch, variables, template parameters, and skipped stages.
  • Re-run a full pipeline using a previous run's resolved resources.
  • List build log records and retrieve bounded log text.

Azure DevOps REST does not expose a generic failed-job-only rerun through this implementation; rerun_pipeline queues a full run.

Sprints and backlogs

  • List team iterations by current, past, or future timeframe.
  • Get the work items and team-member capacity for a sprint.
  • Calculate item and story-point velocity with configurable point field and completed states.
  • Reorder or reparent backlog items.
  • Move a work item to a sprint through update_work_item and System.IterationPath.

Tool groups

Group Count Coverage
Core and repository reads 6 Auth, projects, repositories, clone links, branch listing
Azure Boards 8 Work items, WIQL, comments, create/update, relations, attachments
Pull requests and history 10 PR metadata, commits, threads, iterations, reviewers, linked work items
Review and diff 6 Changed files, stats, unified diffs, inline validation, review context
PR review and lifecycle writes 13 PR create/update/merge, auto-complete, comments, votes, reviewers, labels
Branch lifecycle 4 Create, delete, compare, stale branches
Pipelines and builds 7 Definitions, runs, queue/rerun, logs, build filters
Sprints and backlog 5 Iterations, work items, capacity, velocity, reorder
Quality and trace reports 5 Merge readiness, batch/stale reports, delivery trace, audit history
Total 64

The complete input reference is in docs/tools.md.

Requirements

  • Node.js 20+
  • npm
  • An Azure DevOps Services organization
  • An Azure DevOps PAT or an Azure CLI session created with az login

Azure DevOps Server/on-premises is not currently supported.

Quick start

git clone https://github.com/hasanozcan/azure-devops-mcp.git
cd azure-devops-mcp
npm install
Copy-Item .env.example .env

Edit .env:

AZURE_DEVOPS_ORGANIZATION=your-organization
AZURE_DEVOPS_DEFAULT_PROJECT=your-project
AZURE_DEVOPS_AUTH_MODE=pat
AZURE_DEVOPS_PAT=your-token
AZURE_DEVOPS_ENABLE_WRITE_TOOLS=false

Then validate and build:

npm run doctor
npm run build
npm start

The transport is local stdio; stdout is reserved for MCP protocol messages.

Finding organization and project values

For a URL such as:

https://thecellsolutions.visualstudio.com/hpowere/_git/hpower/pullrequests

use:

AZURE_DEVOPS_ORGANIZATION=thecellsolutions
AZURE_DEVOPS_DEFAULT_PROJECT=hpowere

For https://dev.azure.com/<organization>/<project>/..., use the first path segment as the organization and the second as the project.

Authentication and permissions

Recommended PAT permissions depend on the tools you enable:

Capability PAT permission
Repository, branch, commit, PR, and diff reads Code: Read
PR/branch/reviewer/label/comment mutations Code: Read & write
Work item, WIQL, comment, history, sprint-item reads Work Items: Read
Work item creation/update/comments/relations/attachments/backlog reorder Work Items: Read & write
Pipeline, run, build, and log reads Build: Read
Queue, preview, or rerun pipelines Build: Read & execute
Iteration and capacity discovery Project and Team: Read

Use the shortest practical PAT expiration. See docs/auth.md.

Azure CLI mode:

az login
AZURE_DEVOPS_AUTH_MODE=azcli
AZURE_DEVOPS_PAT=

Configuration

Variable Required Default Purpose
AZURE_DEVOPS_ORGANIZATION Yes None Organization name or Azure DevOps URL
AZURE_DEVOPS_DEFAULT_PROJECT No None Project used when a tool omits project
AZURE_DEVOPS_AUTH_MODE No pat pat or azcli
AZURE_DEVOPS_PAT PAT mode None Personal Access Token
AZURE_DEVOPS_BASE_URL No https://dev.azure.com REST API base URL
AZURE_DEVOPS_API_VERSION No 7.1 Default REST API version
AZURE_DEVOPS_ENABLE_WRITE_TOOLS No false Enable guarded mutations
AZURE_DEVOPS_REQUEST_TIMEOUT_MS No 30000 Per-request timeout
AZURE_DEVOPS_RETRY_COUNT No 2 Retry count for safe reads
AZURE_DEVOPS_MAX_DIFF_FILE_BYTES No 1048576 Per-side local diff file limit
AZURE_DEVOPS_MAX_DIFF_LINES No 5000 Maximum returned diff lines

Placeholder secrets such as replace-me are rejected at startup.

Codex configuration

The repository includes .codex/config.toml. Build the project, create .env, trust/open the repository in Codex, and restart the MCP server list.

Manual registration:

codex mcp add azure-devops-mcp -- node "<absolute-path-to-project>\dist\server.js"

The project configuration uses default_tools_approval_mode = "writes", adding Codex approval on top of the server's own mutation gates. .vscode/mcp.json is also included.

Safety model

Every mutation requires:

  1. AZURE_DEVOPS_ENABLE_WRITE_TOOLS=true at startup.
  2. confirm: true in the individual MCP call.

Additional safeguards:

  • work item updates can test expectedRevision;
  • branch deletion requires expectedObjectId;
  • inline comments validate the current iteration, file side, line range, and changeTrackingId;
  • PR completion requires the exact current source commit SHA;
  • PR completion and auto-complete always use bypassPolicy: false;
  • mutation requests are never automatically retried;
  • PATs, bearer tokens, and authorization headers never appear in tool or doctor output.

Example prompts

Read work item 544, including comments, relations, and delivery links.
Move work item 544 to Project\Sprint 8 after I confirm.
Create a branch feature/544 at this exact commit after I confirm.
Review this Azure DevOps pull request URL and report merge blockers.
Add a required reviewer and enable squash auto-complete after I confirm.
Show failed builds for the hpower repository and retrieve the last run logs.
Run pipeline 12 on feature/544 with deploy=false after I confirm.
Show the current sprint capacity and calculated story-point velocity.
Report branches and active PRs older than 45 days.

Validation

npm run typecheck
npm run typecheck:tests
npm test
npm run build
npm run smoke:mcp
npm run doctor
npm pack --dry-run

doctor performs live read-only checks without printing credentials.

Scope boundaries

This release does not manage wikis, test plans, service connections, variable groups, deployment environments, saved queries, repository creation, or Azure DevOps Server/on-premises. Pipeline rerun is full-run only.

API references

The adapters target Microsoft's Azure DevOps REST API 7.1 documentation for Git, Work Item Tracking, Pipelines, Build, and Work/Sprints.

License

MIT © 2026 Hasan Özcan. See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选