@adhamhelmy/azure-devops-mcp
v1.0.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 Karo"
- "Show open PRs in Karo"
- "Get the details of work item 1234"
- "What comments are on PR 56 in the Karo 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 the
devTeamBgorganization
Setup
1. Clone the repo
git clone <repo-url>
cd azure-devops-mcp2. Install dependencies and build
npm install
npm run build3. Create a Personal Access Token (PAT)
You need a PAT with Work Items (Read) and Code (Read) scopes.
Go to: https://dev.azure.com/devTeamBg/_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.
4. Add to Claude Code
Open Claude Code and paste this prompt (replace YOUR_PAT_HERE with your actual PAT and update the path to where you cloned the repo):
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": "devTeamBg",
"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.5. 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 Karo
Show all open PRs in project Karo
Get work item 1234
Show comments on work item 567 in project Karo
List completed PRs in the Karo repo created by John Smith
Show PR threads on PR 89 in repo Karo in project KaroThe 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 the devTeamBg 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
The default project is Karo. Always use this 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
- Check that the path in
~/.claude/.mcp.jsonpoints to the actualdist/index.jsfile - Make sure you ran
npm run buildafter cloning - Restart Claude Code fully (not just a new session)
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/devTeamBg/_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
