@adhamhelmy/azure-devops-mcp
v1.1.0
Published
Read-only MCP server for Azure DevOps Services (dev.azure.com) — work items, PRs, and comments
Maintainers
Readme
Azure DevOps MCP Server
A local MCP (Model Context Protocol) server that connects Claude Code to Azure DevOps — letting you query work items, pull requests, and comments directly from your AI assistant without leaving your editor.
What it does
Once set up, you can ask Claude things like:
- "List my active tasks in project MyProject"
- "Show open PRs in MyProject"
- "Get the details of work item 1234"
- "What comments are on PR 56 in the MyProject repo?"
Tools available
| Tool | Description |
|---|---|
| list_work_items | List work items with optional filters (state, type, assignee) |
| get_work_item | Full detail of a work item by ID |
| list_work_item_comments | Discussion comments on a work item |
| list_pull_requests | List PRs (project-wide or per-repo, filter by status/creator) |
| get_pull_request | Full PR detail including reviewers and commit count |
| list_pr_threads | Comment threads on a pull request |
Prerequisites
- Node.js v18 or later
- Claude Code installed
- An Azure DevOps account with access to your organization
Setup
1. Install the server
Option A — via npm (recommended, no cloning needed):
The package is published at @adhamhelmy/azure-devops-mcp. No install step required — npx fetches it automatically when Claude Code starts the server.
Option B — clone and build:
git clone <your-repo-url>
cd azure-devops-mcp
npm install
npm run build2. Create a Personal Access Token (PAT)
You need a PAT with Work Items (Read) and Code (Read) scopes.
Go to: https://dev.azure.com/{your-org}/_usersSettings/tokens
Required scopes:
- ✅ Work Items → Read
- ✅ Code → Read
Copy the token — you won't be able to see it again after leaving the page.
3. Add to Claude Code
Open Claude Code and paste this prompt — replace YOUR_PAT_HERE with your actual PAT:
If using npm (Option A):
Add an Azure DevOps MCP server to my Claude Code setup.
Create or update ~/.claude/.mcp.json to include:
{
"mcpServers": {
"azure-devops": {
"command": "npx",
"args": ["-y", "@adhamhelmy/azure-devops-mcp"],
"env": {
"ADO_ORG": "your-org-name",
"ADO_PAT": "YOUR_PAT_HERE"
}
}
}
}
If ~/.claude/.mcp.json already exists and has other servers, merge this entry in without removing them.If using cloned repo (Option B):
Add an Azure DevOps MCP server to my Claude Code setup.
Create or update ~/.claude/.mcp.json to include:
{
"mcpServers": {
"azure-devops": {
"command": "node",
"args": ["/absolute/path/to/azure-devops-mcp/dist/index.js"],
"env": {
"ADO_ORG": "your-org-name",
"ADO_PAT": "YOUR_PAT_HERE"
}
}
}
}
Replace /absolute/path/to/azure-devops-mcp with the full path to where I cloned the repo.
If ~/.claude/.mcp.json already exists and has other servers, merge this entry in without removing them.4. Restart Claude Code
Start a new Claude Code session. The azure-devops MCP server will connect automatically.
You can verify it's connected by running /mcp in Claude Code — you should see azure-devops listed with 6 tools.
Usage examples
List my active tasks in project MyProject
Show all open PRs in project MyProject
Get work item 1234
Show comments on work item 567 in project MyProject
List completed PRs in the MyRepo repo created by John Smith
Show PR threads on PR 89 in repo MyRepo in project MyProjectThe project field is always required. For PRs, repository is optional — omit it to search across all repos in the project.
Agent system prompt
If you're setting up a Claude agent (or configuring a teammate) to work with Azure DevOps, add this to its system prompt:
You have access to an Azure DevOps MCP server for your organization.
Tools available:
- list_work_items(project, assignedTo?, state?, type?) — list work items with optional filters
- get_work_item(id) — get full details of a work item
- list_work_item_comments(project, id) — get discussion comments on a work item
- list_pull_requests(project, repository?, status?, createdBy?) — list pull requests
- get_pull_request(project, repository, pullRequestId) — get full PR details
- list_pr_threads(project, repository, pullRequestId) — get comment threads on a PR
If a default project is configured for your setup, use it unless the user specifies another project.
When the user asks about tasks, tickets, issues, or work items — use the work item tools.
When the user asks about PRs, reviews, or code changes — use the pull request tools.
When fetching comments or discussion, use list_work_item_comments or list_pr_threads as appropriate.Troubleshooting
Server not showing up in /mcp
- Restart Claude Code fully (not just a new session)
- If using the cloned repo, make sure you ran
npm run buildand the path in~/.claude/.mcp.jsonpoints to the actualdist/index.js - If using npx, make sure Node.js v18+ is installed
Auth failed error
- Your PAT may have expired or have insufficient scopes
- Regenerate a PAT with Work Items (Read) + Code (Read) at
https://dev.azure.com/{your-org}/_usersSettings/tokens - Update
ADO_PATin~/.claude/.mcp.jsonand restart Claude Code
Not found error
- Double-check the project name — it's case-sensitive
- Make sure your PAT has access to that project
Results seem incomplete
list_pull_requestsreturns up to 200 results — userepositoryorstatusfilters to narrowlist_work_itemsreturns up to 50 results — usestateortypefilters to narrow
