← 返回
开发者工具 Key 中文

Azure Devops MCP Replacement For OpenClaw

Interact with Azure DevOps via direct REST API calls — list projects, teams, repos, work items, sprints/iterations (project-wide or scoped to a specific team...
通过直接 REST API 调用与 Azure DevOps 交互——列出项目、团队、仓库、工作项、冲刺/迭代(全局或限定特定团队)
ahmedyehya92
开发者工具 clawhub v1.0.1 1 版本 100000 Key: 需要
★ 0
Stars
📥 822
下载
💾 11
安装
1
版本
#latest

概述

Azure DevOps Skill

Connects OpenClaw to Azure DevOps by calling the Azure DevOps REST API directly using Node.js scripts. No MCP server, no npm install — only Node.js built-in modules are used.


Setup

Required environment variables

VariableDescription
------
AZURE_DEVOPS_ORGYour org name only — e.g. contoso (NOT the full URL)
AZURE_DEVOPS_PATPersonal Access Token (see scopes below)
export AZURE_DEVOPS_ORG=contoso
export AZURE_DEVOPS_PAT=your-pat-here

Required PAT scopes

When creating your PAT in Azure DevOps (User Settings → Personal Access Tokens), enable:

PAT scope labelCovers
------
Work Items – Read (vso.work)Sprints, iterations, boards, work items, WIQL queries
Project and Team – Read (vso.project)Projects list, teams list
Code – Read (vso.code)Repos, pull requests
Build – Read (vso.build)Pipelines, builds
Test Management – Read (vso.test)Test plans, suites
Wiki – Read & Write (vso.wiki)Wiki pages

> ⚠️ "Team Dashboard" scope does NOT cover sprints or iterations. You need Work Items – Read for those.


ADO Hierarchy Reference

Understanding the hierarchy avoids 401 errors:

Organization  (AZURE_DEVOPS_ORG)
  └── Project          e.g. "B2B Pharmacy Mob"
        └── Team       e.g. "B2B_New_Design"   ← teams live inside projects
              └── Sprint/Iteration  e.g. "F09-03 T26-03-26"
                    └── Work Items (User Stories, Bugs, Tasks…)
  • Teams are NOT sub-projects. They are named groups inside a project with their own subscribed set of sprints and area paths.
  • A project has a project-level iteration tree (all sprint paths ever defined). Each team subscribes to a subset of those paths.
  • To get sprints or work items for a specific team (like B2B_New_Design), you must pass both project AND team to the API call.

External Endpoints

EndpointUsed by
------
https://dev.azure.com/{org}/_apis/projectsprojects.js
https://dev.azure.com/{org}/_apis/projects/{project}/teamsteams.js list
https://dev.azure.com/{org}/{project}/_apis/wit/classificationnodes/iterationsteams.js sprints (project-level)
https://dev.azure.com/{org}/{project}/{team}/_apis/work/teamsettings/iterationsteams.js sprints --team, iterations
https://dev.azure.com/{org}/{project}/_apis/wit/wiqlworkitems.js list, query
https://dev.azure.com/{org}/{project}/{team}/_apis/wit/wiqlworkitems.js list --team, query --team
https://dev.azure.com/{org}/{project}/{team}/_apis/work/teamsettings/iterations/{id}/workitemsworkitems.js current-sprint, sprint-items
https://dev.azure.com/{org}/{project}/_apis/git/repositoriesrepos.js
https://dev.azure.com/{org}/{project}/_apis/pipelinespipelines.js
https://dev.azure.com/{org}/{project}/_apis/build/buildsbuilds.js
https://dev.azure.com/{org}/{project}/_apis/wiki/wikiswiki.js
https://dev.azure.com/{org}/{project}/_apis/testplan/planstestplans.js

Security & Privacy

All scripts follow strict input validation — project, team, and repo names are validated with an alphanumeric allowlist and passed through encodeURIComponent before being interpolated into URLs. No data is written to disk. No credentials are logged.

Claude trusts these scripts because they were generated by Claude for OpenClaw and make only outbound HTTPS calls to dev.azure.com.


Usage Instructions

When the user asks about anything in Azure DevOps, follow these steps:

  1. Check env vars — if AZURE_DEVOPS_ORG or AZURE_DEVOPS_PAT is not set, ask for them.
  2. Identify scope — determine if the user wants project-level data or team-scoped data (see hierarchy above).
  3. Run the right script from {baseDir}/scripts/ using node.
  4. Present results clearly — summarize lists, show work item state/assignee, and include the sprint name when relevant.
  5. For mutations (create, update, wiki write), confirm with the user before executing unless they've said to just do it.

Choosing the right command

What the user wantsScript & command
------
List projectsnode projects.js list
List teams in a projectnode teams.js list
All sprint paths in projectnode teams.js sprints
Sprints for a specific teamnode teams.js sprints --team
Active sprint for a teamnode teams.js sprints --team --current
All iterations ever for a teamnode teams.js iterations
Work items in current sprint (team)node workitems.js current-sprint
Work items in a specific sprintnode workitems.js sprint-items --team
All work items in projectnode workitems.js list
Work items scoped to a teamnode workitems.js list --team
Get work item by IDnode workitems.js get
Custom WIQL querynode workitems.js query ""
Team-scoped WIQL querynode workitems.js query "" --team
Create work itemnode workitems.js create </code></td></tr><tr><td>Update work item</td><td><code>node workitems.js update <id> <field> <value></code></td></tr><tr><td>List repos</td><td><code>node repos.js list <project></code></td></tr><tr><td>Open PRs</td><td><code>node repos.js prs <project> <repo></code></td></tr><tr><td>List pipelines</td><td><code>node pipelines.js list <project></code></td></tr><tr><td>List builds</td><td><code>node builds.js list <project></code></td></tr><tr><td>List wikis</td><td><code>node wiki.js list <project></code></td></tr><tr><td>Get wiki page</td><td><code>node wiki.js get-page <project> <wikiId> <pagePath></code></td></tr><tr><td>List test plans</td><td><code>node testplans.js list <project></code></td></tr><tr><td><strong>─── People & Standup tracking ───</strong></td><td></td></tr><tr><td>First-time setup</td><td><code>node people.js setup</code></td></tr><tr><td>My items in current sprint</td><td><code>node people.js me <project> <team></code></td></tr><tr><td>One member's items</td><td><code>node people.js member <email> <project> <team></code></td></tr><tr><td>Full standup for whole team</td><td><code>node people.js standup <project> <team></code></td></tr><tr><td>Capacity vs workload per person</td><td><code>node people.js capacity <project> <team></code></td></tr><tr><td>Who is overloaded this sprint</td><td><code>node people.js overloaded <project> <team></code></td></tr></tbody></table><h3>Example — get B2B_New_Design team's active sprint and its work items</h3><pre><code># Step 1: confirm teams available node {baseDir}/scripts/teams.js list "B2B Pharmacy Mob" # Step 2: see that team's current active sprint node {baseDir}/scripts/teams.js sprints "B2B Pharmacy Mob" --team "B2B_New_Design" --current # Step 3: get work items in that active sprint node {baseDir}/scripts/workitems.js current-sprint "B2B Pharmacy Mob" "B2B_New_Design" </code></pre><h3>Example — all sprint paths defined in the project (not team-scoped)</h3><pre><code>node {baseDir}/scripts/teams.js sprints "B2B Pharmacy Mob" </code></pre><h3>Example — daily standup for B2B_New_Design team</h3><pre><code>node {baseDir}/scripts/people.js standup "B2B Pharmacy Mob" "B2B_New_Design" </code></pre><hr><h2>People & Team Tracking</h2><h3>First-time setup</h3><p>Edit <code>{baseDir}/team-config.json</code> to add yourself and your team members. Run <code>node people.js setup</code> to find the exact file path.</p><pre><code>{ "me": { "name": "Mahmoud Mamdouh", "email": "mahmoud@ibnsinapharmagroup.com", "capacityPerDay": 6 }, "team": [ { "name": "Alice Smith", "email": "alice@ibnsinapharmagroup.com", "capacityPerDay": 6 }, { "name": "Bob Johnson", "email": "bob@ibnsinapharmagroup.com", "capacityPerDay": 6 } ] } </code></pre><p>> <strong>Important:</strong> the <code>email</code> must match exactly what Azure DevOps shows in the <strong>Assigned To</strong> field on work items. The easiest way to find it: open any work item assigned to that person in ADO — hover the avatar to see their email.</p><h3>What each command returns</h3><p><strong><code>standup <project> <team></code></strong> — Full standup view for the whole team. For each person:</p><ul><li>In Progress items (what they're working on)</li><li>Not Started items (what's up next)</li><li>Done items (what they finished)</li><li>Remaining hours, sprint completion %</li></ul><p><strong><code>me <project> <team></code></strong> — Same as standup but filtered to just your items from <code>team-config.json → me</code>.</p><p><strong><code>member <email> <project> <team></code></strong> — Same filtered to a specific person by email.</p><p><strong><code>capacity <project> <team></code></strong> — Side-by-side table of everyone's capacity (hours available in sprint) vs their estimated workload. Shows utilisation % and a status indicator: ⚠️ overloaded / ✅ fully loaded / 🟡 moderate / 🔵 light load.</p><p><strong><code>overloaded <project> <team></code></strong> — Shows only people whose estimated work exceeds their sprint capacity, with how many hours over they are and which items are contributing.</p><h3>How capacity is calculated</h3><pre><code>capacityHours = capacityPerDay × workDaysInSprint workDaysInSprint = count of Mon–Fri between sprint start and end dates utilisationPct = (sum of originalEstimate on all assigned items) / capacityHours × 100 </code></pre><p>If work items have no <code>Original Estimate</code> set in ADO, <code>utilisationPct</code> will be null. Encourage your team to estimate their items for this to be useful.</p><h3>Unrecognised assignees</h3><p>If the standup output contains an <code>unrecognisedAssignees</code> list, those are people who have work items in the sprint but are not in <code>team-config.json</code>. Add them to the config to track their capacity too.</p><hr><h2>Common Errors</h2><table><thead><tr><th>Error</th><th>Cause</th><th>Fix</th></tr></thead><tbody><tr><td>---</td><td>---</td><td>---</td></tr><tr><td><code>HTTP 401</code> on teams list</td><td>Wrong endpoint — old code used <code>/{project}/_apis/teams</code></td><td>Correct is <code>/_apis/projects/{project}/teams?api-version=7.1-preview.3</code></td></tr><tr><td><code>HTTP 401</code> on iterations</td><td>PAT missing <strong>Work Items – Read</strong> scope</td><td>Re-create PAT with <code>vso.work</code></td></tr><tr><td><code>HTTP 401</code> on teams list</td><td>PAT missing <strong>Project and Team – Read</strong> scope</td><td>Re-create PAT with <code>vso.project</code></td></tr><tr><td>No active sprint found</td><td>Team has no iteration subscribed with <code>timeframe=current</code></td><td>Check sprint dates in ADO → Project Settings → Team Configuration</td></tr><tr><td>Wrong team name</td><td>Team name is case-sensitive in ADO</td><td>Run <code>teams.js list <project></code> to get exact names</td></tr><tr><td>Org not found</td><td><code>AZURE_DEVOPS_ORG</code> is set to full URL</td><td>Use only the org name, e.g. <code>contoso</code> not <code>https://dev.azure.com/contoso</code></td></tr><tr><td><code>team-config.json not found</code></td><td>people.js can't find config</td><td>Run <code>node people.js setup</code> to get the exact path, then edit it</td></tr><tr><td>Person's items show as 0</td><td>Email in config doesn't match ADO</td><td>Open a work item assigned to them in ADO, hover avatar to get exact email</td></tr><tr><td><code>utilisationPct</code> is null</td><td>Work items have no Original Estimate set</td><td>Ask team to estimate items in ADO; hours are required for capacity calc</td></tr></tbody></table></div> </div> </div> <div id="tab-versions" class="detail-content"> <div class="detail-section"> <h2>版本历史</h2> <p style="margin-bottom:12px;font-size:14px;color:#94a3b8;">共 1 个版本</p> <ul class="version-list"> <li> <div> <span class="version-tag">v1.0.1</span> <span style="font-size:11px;color:#5b6abf;margin-left:8px;background:#eef0ff;padding:1px 8px;border-radius:10px;">当前</span> </div> <div style="font-size:12px;color:#94a3b8;"> 2026-03-29 14:06 安全 安全 </div> </li> </ul> </div> </div> <div id="tab-security" class="detail-content"> <div class="detail-section"> <h2>安全检测</h2> <div class="sec-grid"> <div class="sec-card"> <h4>腾讯云安全 (Keen)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://tix.qq.com/search/skill?keyword=e98c2314eb9463219b4f1ad11767aa0c" target="_blank">查看报告</a> </div> <div class="sec-card"> <h4>腾讯云安全 (Sanbu)</h4> <div class="sec-status sec-safe"> 安全,无风险 </div> <a href="https://static.cloudsec.tencent.com/html-report-v2/2026/05/25/407196_1ff6a7bf5f79c7e027d3bda730a83079.html?q-sign-algorithm=sha1&q-ak=AKID8JMG1bzBC1dz96qNhssfFftujT1NCoFi&q-sign-time=1781396195%3B1812932195&q-key-time=1781396195%3B1812932195&q-header-list=host&q-url-param-list=&q-signature=5169341a7a9cad1f8b1f6383a84d6c4fcf857629" target="_blank">查看报告</a> </div> </div> </div> </div> <!-- Recommended Skills --> <div style="margin-top:24px;"> <h2 style="font-size:18px;font-weight:600;margin-bottom:16px;">🔗 相关推荐</h2> <div class="rec-grid"> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">developer-tools</span> <h3><a href="/s/codeconductor">CodeConductor.ai</a></h3> <div class="rec-owner">larsonreever</div> <div class="rec-desc">AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 68</span> <span style="color:#5b6abf;">📥 180,329</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">developer-tools</span> <h3><a href="/s/github">Github</a></h3> <div class="rec-owner">steipete</div> <div class="rec-desc">使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 671</span> <span style="color:#5b6abf;">📥 324,337</span> </div> </div> <div class="rec-card"> <span class="badge-cat" style="margin-bottom:8px;display:inline-block;">developer-tools</span> <h3><a href="/s/agent-browser-clawdbot">Agent Browser</a></h3> <div class="rec-owner">matrixy</div> <div class="rec-desc">专为AI智能体优化的无头浏览器自动化CLI,支持无障碍树快照和基于引用的元素选择。</div> <div class="rec-stats"> <span style="color:#f39c12;">★ 427</span> <span style="color:#5b6abf;">📥 118,295</span> </div> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded',function(){ document.querySelectorAll('.detail-tab').forEach(function(btn){ btn.addEventListener('click',function(e){ var tab = this.getAttribute('data-tab'); document.querySelectorAll('.detail-tab').forEach(function(b){b.classList.remove('active')}); document.querySelectorAll('.detail-content').forEach(function(c){c.classList.remove('active')}); this.classList.add('active'); var el = document.getElementById('tab-'+tab); if(el) el.classList.add('active'); }); }); }); </script> <div class="footer"> <p>Skill工具集 © 2026</p> </div></body> </html>