azure-devops-cli-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@azure-devops-cli-mcplist my active pull requests"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
azure-devops-cli-mcp
本地 MCP server,把 Claude Desktop / Cowork 橋接到本機的 Azure DevOps CLI。
Claude 可透過它完整使用 az devops、az repos、az boards、az pipelines、az artifacts。
前置需求
Node.js >= 20
Azure CLI(含 azure-devops extension):
az extension add --name azure-devops已完成
az login不需要
az devops configure --defaults:server 會自動帶入預設 organization / project / repository(見下方「啟動參數」)。
Related MCP server: Azure DevOps MCP Server
安裝(團隊成員)
npm install -g git+https://github.com/A016098Tony/azure-devops-cli-mcp.git安裝時會自動編譯(prepare script),不需另外執行 build。
更新版本時重跑同一行命令即可。
Claude Desktop 設定
開啟 claude_desktop_config.json(Windows 完整路徑:
C:\Users\<你的帳號>\AppData\Roaming\Claude\claude_desktop_config.json;也可從
Claude Desktop → Settings → Developer → Edit Config 開啟),在 mcpServers 加入:
{
"mcpServers": {
"azure-devops-cli": {
"command": "npx",
"args": ["azure-devops-cli-mcp", "--project", "MS", "--repository", "MS-Web"]
}
}
}此設定檔 Claude Desktop(含 Cowork)與 Claude Code 共用同一格式。 claude.ai 網頁版不支援本機 stdio MCP server。
啟動參數
三個參數皆選填,未指定時使用內建預設值:
參數 | 預設值 | 說明 |
|
| 可只給短名(如 |
|
| 預設專案 |
|
| 只套用在 |
命令未指定 --org / --project(repos pr 未指定 --repository)時,
server 會自動補上這些預設值;命令中明確指定時以命令為準。
若某個 az 子命令不接受被補上的參數,server 會自動移除該參數重試一次。
Windows + nvm 注意:桌面應用(GUI 程序)繼承的 PATH 可能與終端機不同, 若出現「找不到 npx」,把
command改成npx.cmd的絕對路徑 (用(Get-Command npx.cmd).Source查出,例如C:\nvm4w\nodejs\npx.cmd),args不變。
務必完整結束並重新啟動 Claude Desktop(關閉分頁不夠,要整個結束再開)才會載入。
啟動後可在對話框左下角的「+」→ Connectors 看到 azure-devops-cli 及其工具。
工具
工具 | 用途 |
| 執行任意 DevOps 家族命令,例如 |
| 查詢命令語法,等同 |
| 上傳本機檔案為 work item 附件並建立連結(文字與 binary 皆可,上限 100MB)。例如把 code review 報告或錯誤截圖附到 work item。 |
| 取得 PR 完整資訊(REST),含 source/target branch 與狀態。 |
| 取得 PR 異動檔案清單(REST iterations/changes),自動使用最新 iteration。 |
| 取得 PR 關聯的 work item 清單(REST)。 |
| 取得 work item 含 relations(REST,$expand=relations),可檢查附件重名。 |
| 在 PR 建立討論串留言或回覆既有討論串(REST)。 |
| 更新 work item 欄位/寫入 Discussion(REST json-patch,僅允許 /fields/*)。 |
| 通用 Azure DevOps REST 呼叫(GET/POST/PATCH),供未涵蓋的端點使用。 |
| 在主機端對本機 repo 執行 |
| 在主機端查詢遠端 refs( |
REST 工具的認證與 az_workitem_attach 相同:優先使用 AZURE_DEVOPS_EXT_PAT
環境變數,否則使用 az login 的憑證。所有 REST URL 鎖定在預設 organization,
無法對其他主機發送請求。
僅允許 devops、repos、boards、pipelines、artifacts 五個命令群組;
其餘 az 命令(如 vm、account)一律拒絕。認證依賴本機的 az login
(az_workitem_attach 會內部執行 az account get-access-token 取 token;
若設定了 AZURE_DEVOPS_EXT_PAT 環境變數則優先使用該 PAT),
server 不儲存任何憑證。
安全防護
命令經由 shell 執行,因此雙引號外含有 shell 控制字元(& | ; < > ( ) \ ^或換行) 或有未配對雙引號的命令會被拒絕,以免repos list & <任意命令>之類的串接繞過群組 限制而執行任意本機命令。含特殊字元的參數值(例如 WIQL 或--query的 JMESPath 運算式) 用雙引號包起來即可正常執行,例如:boards query --wiql "SELECT [System.Id] FROM WorkItems WHERE [System.State] <> 'Closed'"`。
Git 工具
az_git_fetch / az_git_ls_remote 在主機端執行 git 的唯讀網路操作,
repoPath 必須是主機端的絕對路徑。參數經嚴格驗證:remote 只接受名稱
(不接受 URL)、refspec/pattern 不可以 - 開頭(擋 --upload-pack 等
危險選項)。不提供 push、pull 或任何寫入操作。認證使用主機端的
git credential(如 Git Credential Manager)。
開發
git clone https://github.com/A016098Tony/azure-devops-cli-mcp.git
npm install
npm test # vitest 單元 + 整合測試(不需要 az)
node scripts/smoke.mjs # 實機煙霧測試(需要 az login)Maintenance
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
- Alicense-qualityDmaintenanceEnables interaction with Azure DevOps services including work items, repositories, pipelines, wikis, and test plans through a local MCP server that provides direct access to Azure DevOps REST APIs from your code editor.103,700MIT
- AlicenseBqualityDmaintenanceA read-only MCP server connecting AI assistants to Azure DevOps Server (on-premises) for browsing projects, repos, builds, work items, releases, pipelines, and test results.399041MIT
- AlicenseAqualityCmaintenanceAn MCP server that exposes 41 Azure DevOps tools to AI assistants, enabling management of pipelines, repositories, pull requests, releases, work items, test management, and wikis through natural language.41MIT
- AlicenseBqualityDmaintenanceAzure DevOps MCP tools for Claude Code and Codex CLI, enabling interaction with boards, work items, repos, and pull requests via natural language.13MIT
Related MCP Connectors
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/A016098Tony/azure-devops-cli-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server