Skip to main content
Glama
hasanozcan

Azure DevOps MCP Server

by hasanozcan

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.

The server is intentionally narrower than Microsoft's general-purpose Azure DevOps MCP server. It focuses on the day-to-day workflow around work items, repositories, and pull requests.

What it can do

Azure Boards work items

  • Get any work item by ID with all available fields by default, including Description and Acceptance Criteria when present.

  • Return work item metadata, links, parent/child relationships, and other relations.

  • Run read-only WIQL SELECT queries for open, assigned, recently changed, or otherwise filtered work items.

  • Resolve WIQL matches into useful work item summaries; queries return at most 100 items by default and 1,000 when explicitly requested.

  • Request custom Azure Boards fields when a smaller or specialized result is needed.

  • Read work item comments with paging, sort order, deleted-comment filtering, rendered text, and reactions.

  • Resolve work items directly linked to a pull request.

Example prompts:

Get work item 12345 with all fields, relations, and comments.
List the open bugs assigned to me in the current project.
Show the 20 most recently changed User Stories.
Find active work items tagged production.

Projects, repositories, branches, and commits

  • Verify authentication and project access without exposing credentials.

  • List projects and repositories.

  • Get repository metadata and HTTPS, SSH, and web clone links.

  • List and filter branches.

  • List repository commits by branch, tag, commit, date range, or author.

Example prompts:

List repositories in the default project.
Show branches in the hpower repository.
List commits on the develop branch from the last seven days.

Pull request investigation and review

  • List and filter pull requests by repository, status, source/target branch, creator, or reviewer.

  • Retrieve a pull request by project/repository/ID or parse an Azure DevOps PR URL directly.

  • Read PR commits, reviewers and votes, iterations, threads, comments, and linked work items.

  • Inspect changed files and aggregate additions/deletions.

  • Generate bounded unified diffs locally for the whole PR or one file.

  • Build a single review-context bundle containing PR metadata, diff, commits, threads, reviewers, and work items.

  • Validate an inline-comment target against the latest iteration and Azure DevOps changeTrackingId before writing.

Example prompts:

Review this Azure DevOps pull request URL.
Show changed files and diff statistics for PR 123.
Get the complete review context for PR 123 in repository hpower.
Validate line 42 in src/app.ts as an inline-comment target.

Guarded pull request writes

When write tools are explicitly enabled, the server can:

  • Create top-level PR comments.

  • Create validated inline comments.

  • Reply to an existing discussion thread.

  • Update a thread to active, fixed, won't-fix, closed, by-design, or pending.

  • Approve, approve with suggestions, clear a vote, wait for author, or reject.

  • Request pull request changes through the wait-for-author vote.

Every write requires both AZURE_DEVOPS_ENABLE_WRITE_TOOLS=true and confirm=true. Inline comments require an additional target-validation pass.

Tool groups

Group

Count

Coverage

Core and repositories

6

Auth, projects, repositories, clone links, branches

Azure Boards

3

Work item details, WIQL queries, comments

Pull requests and history

10

PR metadata, commits, threads, work items, iterations, reviewers

Review and diff

6

Changed files, stats, unified diffs, inline validation, review context

Guarded writes

6

Comments, replies, thread state, votes, request changes

Total

31

Related MCP server: Azure DevOps MCP Server

Requirements

  • Node.js 20+

  • npm

  • An Azure DevOps Services organization

  • One of:

    • an Azure DevOps Personal Access Token (PAT)

    • Azure CLI signed in 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
npm run setup
npm run build
npm run doctor

Start the server directly:

npm start

Development mode:

npm run dev

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

Authentication

PAT

Set:

AZURE_DEVOPS_AUTH_MODE=pat
AZURE_DEVOPS_PAT=your-token

Recommended PAT permissions:

  • Code: Read for read-only repository and PR tools

  • Work Items: Read for work item details, WIQL queries, and comments

  • Code: Read & write when comment, thread, or vote tools are enabled

Keep write tools disabled unless needed.

Azure CLI

az login

Then configure:

AZURE_DEVOPS_AUTH_MODE=azcli
AZURE_DEVOPS_PAT=

The server requests an Azure DevOps token through AzureCliCredential and refreshes it before expiry.

See authentication documentation.

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

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 retryable reads

AZURE_DEVOPS_MAX_DIFF_FILE_BYTES

No

1048576

Per-side file size limit for local diff generation

AZURE_DEVOPS_MAX_DIFF_LINES

No

5000

Maximum diff lines returned by a tool call

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

Codex configuration

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

You can also register it from a terminal:

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

The project-scoped configuration uses default_tools_approval_mode = "writes", so mutation tools receive an additional Codex approval boundary. The server itself still independently requires AZURE_DEVOPS_ENABLE_WRITE_TOOLS=true and confirm=true.

For VS Code, .vscode/mcp.json is included.

Safety model

Every mutation is protected twice:

  1. AZURE_DEVOPS_ENABLE_WRITE_TOOLS=true must be set at server startup.

  2. The individual MCP call must contain confirm: true.

Inline comments add a third check: the path, side, line range, latest iteration, and Azure DevOps changeTrackingId are validated before the POST request.

PATs, bearer tokens, and authorization headers are never included in tool or doctor output.

Diff behavior

Azure DevOps exposes PR iteration changes rather than a complete unified patch. This server:

  1. resolves the latest PR iteration and common/source commits;

  2. retrieves the changed-file list and changeTrackingId values;

  3. downloads each file at the base and source commits;

  4. generates unified patches locally;

  5. applies file-size, binary, file-count, and output-line limits.

Diff bundles are cached in memory for two minutes. Binary and oversized files remain visible in file summaries but do not return patch text.

Tools

The server exposes 31 focused MCP tools. See tool documentation.

Validation

npm run typecheck
npm run typecheck:tests
npm test
npm run build
npm run doctor

doctor makes live read-only calls and prints identity/project/repository access information without printing credentials.

Packaging

The package is configured for public publication under the MIT license:

npm pack --dry-run
npm publish

The npm package name is azure-devops-pr-mcp.

License

MIT © 2026 Hasan Özcan. See LICENSE.

Scope

Not included in the first release:

  • Azure Boards mutations, saved-query management, backlogs, or sprint administration

  • pipelines, builds, wikis, test plans, or Advanced Security

  • repository, branch, or PR creation

  • PR completion, abandonment, or merge

  • Azure DevOps Server/on-premises

Use Microsoft's official Azure DevOps MCP server when those broader domains are required.

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.

  • A MCP server built for developers enabling Git based project management with project and personal…

  • Go MCP server for GitLab: 2 dynamic tools reach 1000+ REST/GraphQL actions. Free/CE, no paid tier.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hasanozcan/azure-devops-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server