Azure DevOps

io.github.billg118由 GitHub 帳號 billg118 發布v0.1.54更新於 Nov 5, 2026

Azure DevOps MCP server: projects, repos, work items, pull requests, pipelines, and wikis.

概覽

AI 產生的概覽

社群版 MCP 伺服器,讓 AI 助理讀取並修改 Azure DevOps 的專案、程式碼儲存庫、工作項目、提取要求、管線與 Wiki。

可以做什麼
  • 瀏覽組織、專案、儲存庫、檔案樹與檔案內容
  • 跨專案搜尋程式碼、Wiki 頁面與工作項目
  • 建立與更新工作項目、連結、留言與附件
  • 建立分支與提交,建立、留言或更新提取要求
  • 檢視管線、執行記錄、時間軸、日誌與成品,並可觸發執行
  • 讀取 Wiki 頁面,查看提取要求的狀態檢查與原則評估
適用情境
適合希望助理直接在 Azure DevOps 中作業的情境:處理與更新工作項目、審閱提取要求及其檢查、搜尋程式碼或 Wiki、排查管線失敗。README 將其定位為適合 Azure DevOps Server(地端部署)及較舊版本,並建議雲端使用者優先選用微軟官方伺服器。
執行需求
透過 npx 在本機執行,需要 Node.js 16+ 與 npm。需要具備相應權限的 Azure DevOps 帳戶、AZURE_DEVOPS_ORG_URL 變數,以及下列之一:AZURE_DEVOPS_PAT 中的 PAT、Azure Identity 認證或 Azure CLI 登入。AZURE_DEVOPS_AUTH_METHOD 與 AZURE_DEVOPS_DEFAULT_PROJECT 為選用;服務主體另需 AZURE_TENANT_ID、AZURE_CLIENT_ID 與 AZURE_CLIENT_SECRET。地端伺服器僅支援 PAT。
安裝前請注意
AZURE_DEVOPS_PAT 中的 PAT 與 AZURE_CLIENT_SECRET 屬於機密,應盡量縮小權杖權限範圍。許多工具會寫入 Azure DevOps:建立與更新工作項目、分支、提交、提取要求、留言與連結,刪除附件,以及觸發管線執行,可能消耗建置分鐘數或觸發部署。附件工具會讀寫本機檔案系統。資料會傳送到你所設定的 Azure DevOps 位址。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Azure DevOps,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Azure DevOps MCP Server

A Model Context Protocol (MCP) server implementation for Azure DevOps, allowing AI assistants to interact with Azure DevOps APIs through a standardized protocol.

Looking for the official server? Microsoft maintains a product-supported Azure DevOps MCP at microsoft/azure-devops-mcp. If you use Azure DevOps Services (cloud), start there.

This community server remains a good fit when you need Azure DevOps Server (on-premises) support — especially older versions that may not work with Microsoft's MCP — or features not yet available in the official server. See Discussion #237 for more context. See ROADMAP.md for where this server differentiates and what is planned.

Overview

This server implements the Model Context Protocol (MCP) for Azure DevOps, enabling AI assistants like Claude to interact with Azure DevOps resources securely. The server acts as a bridge between AI models and Azure DevOps APIs, providing a standardized way to:

  • Access and manage projects, work items, repositories, and more
  • Create and update work items, branches, and pull requests
  • Execute common DevOps workflows through natural language
  • Access repository content via standardized resource URIs
  • Safely authenticate and interact with Azure DevOps resources

Server Structure

The server is structured around the Model Context Protocol (MCP) for communicating with AI assistants. It provides tools for interacting with Azure DevOps resources including:

  • Projects
  • Work Items
  • Repositories
  • Pull Requests
  • Branches
  • Pipelines

Core Components

  • AzureDevOpsServer: Main server class that initializes the MCP server and registers tools
  • Feature Modules: Organized by feature area (work-items, projects, repositories, etc.)
  • Request Handlers: Each feature module provides request identification and handling functions
  • Tool Handlers: Modular functions for each Azure DevOps operation
  • Configuration: Environment-based configuration for organization URL, PAT, etc.

The server uses a feature-based architecture where each feature area (like work-items, projects, repositories) is encapsulated in its own module. This makes the codebase more maintainable and easier to extend with new features.

Getting Started

Prerequisites

  • Node.js (v16+)
  • npm or yarn
  • Azure DevOps account with appropriate access
  • Authentication credentials (see Authentication Guide for details):
    • Personal Access Token (PAT), or
    • Azure Identity credentials, or
    • Azure CLI login

Running from npm (npx)

If you just want to run the published server package, you do not need to clone or build this repository:

bash
npx -y @billg118/mcp-server-azure-devops

Running locally (from source)

From a checkout of this repository:

bash
npm cicp .env.example .env   # then edit valuesnpm run buildnpm start              # runs: node dist/index.js

For iterative development (auto-reload):

bash
npm run dev            # runs src/index.ts via tsx watch

Usage with Claude Desktop/Cursor AI

To integrate with Claude Desktop or Cursor AI, add one of the following configurations to your configuration file.

Azure Identity Authentication

Be sure you are logged in to Azure CLI with az login then add the following:

json
{  "mcpServers": {    "azureDevOps": {      "command": "npx",      "args": ["-y", "@billg118/mcp-server-azure-devops"],      "env": {        "AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/your-organization",        "AZURE_DEVOPS_AUTH_METHOD": "azure-identity",        "AZURE_DEVOPS_DEFAULT_PROJECT": "your-project-name"      }    }  }}
Personal Access Token (PAT) Authentication
json
{  "mcpServers": {    "azureDevOps": {      "command": "npx",      "args": ["-y", "@billg118/mcp-server-azure-devops"],      "env": {        "AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/your-organization",        "AZURE_DEVOPS_AUTH_METHOD": "pat",        "AZURE_DEVOPS_PAT": "<YOUR_PAT>",        "AZURE_DEVOPS_DEFAULT_PROJECT": "your-project-name"      }    }  }}

Azure DevOps Server (on-prem) requires PAT authentication. Example:

json
{  "mcpServers": {    "azureDevOps": {      "command": "npx",      "args": ["-y", "@billg118/mcp-server-azure-devops"],      "env": {        "AZURE_DEVOPS_ORG_URL": "https://server:8080/tfs/DefaultCollection",        "AZURE_DEVOPS_AUTH_METHOD": "pat",        "AZURE_DEVOPS_PAT": "<YOUR_PAT>",        "AZURE_DEVOPS_DEFAULT_PROJECT": "your-project-name"      }    }  }}

For detailed configuration instructions and more authentication options, see the Authentication Guide.

Authentication Methods

This server supports multiple authentication methods for connecting to Azure DevOps APIs. For detailed setup instructions, configuration examples, and troubleshooting tips, see the Authentication Guide.

Supported Authentication Methods

  1. Personal Access Token (PAT) - Simple token-based authentication
  2. Azure Identity (DefaultAzureCredential) - Flexible authentication using the Azure Identity SDK
  3. Azure CLI - Authentication using your Azure CLI login

Example configuration files for each authentication method are available in the examples directory.

Azure DevOps Server (on-prem) supports PAT authentication only. Azure Identity and Azure CLI are supported for Azure DevOps Services.

Environment Variables

For a complete list of environment variables and their descriptions, see the Authentication Guide.

Key environment variables include:

VariableDescriptionRequiredDefault
AZURE_DEVOPS_AUTH_METHODAuthentication method (pat, azure-identity, or azure-cli) - case-insensitiveNoazure-identity
AZURE_DEVOPS_ORG_URLFull URL to your Azure DevOps organization or Server collection (e.g., https://server:8080/tfs/DefaultCollection)Yes-
AZURE_DEVOPS_PATPersonal Access Token (for PAT auth)Only with PAT auth-
AZURE_DEVOPS_DEFAULT_PROJECTDefault project if none specifiedNo-
AZURE_DEVOPS_API_VERSIONREST api-version for the tools that call the REST API directly (per-release values)No7.1
AZURE_TENANT_IDAzure AD tenant ID (for service principals)Only with service principals-
AZURE_CLIENT_IDAzure AD application ID (for service principals)Only with service principals-
AZURE_CLIENT_SECRETAzure AD client secret (for service principals)Only with service principals-
LOG_LEVELLogging level (debug, info, warn, error)Noinfo

Troubleshooting Authentication

For detailed troubleshooting information for each authentication method, see the Authentication Guide.

Common issues include:

  • Invalid or expired credentials
  • Insufficient permissions
  • Network connectivity problems
  • Configuration errors

Authentication Implementation Details

For technical details about how authentication is implemented in the Azure DevOps MCP server, see the Authentication Guide and the source code in the src/auth directory.

Available Tools

The Azure DevOps MCP server provides a variety of tools for interacting with Azure DevOps resources. For detailed documentation on each tool, please refer to the corresponding documentation.

User Tools

  • get_me: Get details of the authenticated user (id, displayName, email) (Azure DevOps Services only)

Organization Tools

  • list_organizations: List all accessible organizations (Azure DevOps Services only)

Project Tools

  • list_projects: List all projects in an organization
  • get_project: Get details of a specific project
  • get_project_details: Get comprehensive details of a project including process, work item types, and teams

Repository Tools

  • list_repositories: List all repositories in a project
  • get_repository: Get details of a specific repository
  • get_repository_details: Get detailed information about a repository including statistics and refs
  • get_file_content: Get content of a file or directory from a repository
  • get_repository_tree: List a repository's file tree from any path and depth
  • create_branch: Create a new branch from an existing one
  • create_commit: Commit multiple file changes to a branch using unified diffs or search/replace instructions

Work Item Tools

  • get_work_item: Retrieve a work item by ID
  • create_work_item: Create a new work item
  • update_work_item: Update an existing work item
  • list_work_items: List work items in a project
  • manage_work_item_link: Add, remove, or update links between work items
  • create_work_item_attachment: Upload and attach a file to a work item
  • get_work_item_attachment: Download an attachment from a work item
  • delete_work_item_attachment: Delete an attachment from a work item

Search Tools

  • search_code: Search for code across repositories in a project
  • search_wiki: Search for content across wiki pages in a project
  • search_work_items: Search for work items across projects in Azure DevOps

Pipelines Tools

  • list_pipelines: List pipelines in a project
  • get_pipeline: Get details of a specific pipeline
  • list_pipeline_runs: List recent runs for a pipeline with optional filters
  • get_pipeline_run: Get detailed run information and artifact summaries
  • download_pipeline_artifact: Download a single artifact file as text
  • pipeline_timeline: Retrieve the stage and job timeline for a run
  • get_pipeline_log: Retrieve raw or JSON-formatted log content
  • trigger_pipeline: Trigger a pipeline run with customizable parameters

Wiki Tools

  • get_wikis: List all wikis in a project
  • get_wiki_page: Get content of a specific wiki page as plain text

Pull Request Tools

For comprehensive documentation on all tools, see the Tools Documentation.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for contribution guidelines.

Star History

[Star History Chart]

License

MIT

來源:README.md,提交 d5e8305

工具

49

get_me

Get details of the authenticated user (id, displayName, email)

無需輸入參數。

list_organizations

List all Azure DevOps organizations accessible to the current authentication

無需輸入參數。

list_projects

List all projects in an organization

輸入參數topskipstateFilterorganizationIdcontinuationToken

get_project

Get details of a specific project

輸入參數projectIdorganizationId

get_project_details

Get comprehensive details of a project including process, work item types, and teams

輸入參數projectIdincludeTeams必填includeFields必填includeProcess必填organizationIdexpandTeamIdentity必填includeWorkItemTypes必填

get_repository

Get details of a specific repository

輸入參數projectIdrepositoryId必填organizationId

get_repository_details

Get detailed information about a repository including statistics and refs

輸入參數projectIdrefFilterbranchNameincludeRefs必填repositoryId必填organizationIdincludeStatistics必填

list_repositories

List repositories in a project

輸入參數projectIdincludeLinksorganizationId

get_file_content

Get content of a file or directory from a repository

輸入參數path必填versionprojectIdversionTyperepositoryId必填organizationId

get_all_repositories_tree

Displays a hierarchical tree view of files and directories across multiple Azure DevOps repositories within a project, based on their default branches

輸入參數depth必填patternprojectIdorganizationIdrepositoryPattern

get_repository_tree

Displays a hierarchical tree view of files and directories within a single repository starting from an optional path

輸入參數path必填depth必填projectIdrepositoryId必填organizationId

create_branch

Create a new branch from an existing one

輸入參數newBranch必填projectIdrepositoryId必填sourceBranch必填organizationId

create_commit

Create a commit on an existing branch using file changes. - Provide plain branch names (no "refs/heads/"). - ⚠️ Each file path may appear only once per commit request—combine all edits to a file into a single change entry. - Prefer multiple commits when you have sparse or unrelated edits; smaller focused commits keep review context clear. 🎯 RECOMMENDED: Use the SEARCH/REPLACE format (much easier, no line counting!). **Option 1: SEARCH/REPLACE format (EASIEST)** Simply provide the exact text to find and replace: ```json { "changes": [{ "path": "src/api/services/function-call.ts", "search": "return axios.post(apiUrl, payload, requestConfig);", "replace": "return axios.post(apiUrl, payload, requestConfig).then(r => { processResponse(r); return r; });" }] } ``` The server fetches the file, performs the replacement, and generates the diff automatically. No line counting, no hunk headers, no context lines needed! **Option 2: UNIFIED DIFF format (Advanced)** If you prefer full control, provide complete unified diffs: - Each patch MUST have complete hunk headers: @@ -oldStart,oldLines +newStart,newLines @@ - CRITICAL: Every @@ marker MUST include line numbers. Do NOT use @@ without line ranges. - Include 3-5 context lines before and after changes. - For deletions: `--- a/filepath` and `+++ /dev/null` - For additions: `--- /dev/null` and `+++ b/filepath` Example unified diff: ```json { "changes": [{ "patch": "diff --git a/file.yaml b/file.yaml\n--- a/file.yaml\n+++ b/file.yaml\n@@ -4,7 +4,7 @@ spec:\n spec:\n type: ClusterIP\n ports:\n- - port: 8080\n+ - port: 9090\n targetPort: http\n" }] } ```

輸入參數changes必填projectIdbranchName必填repositoryId必填commitMessage必填organizationId

list_commits

List recent commits on a branch including file-level diff content for each commit

輸入參數topskipprojectIdbranchName必填repositoryId必填organizationId

list_work_items

List work items in a project

輸入參數topskipwiqlfieldsteamIdqueryIdprojectIdorganizationId

get_work_item

Get details of a specific work item

輸入參數expandworkItemId必填

create_work_item

Create a new work item

輸入參數tagstitle必填areaPathparentIdpriorityprojectIdassignedTodescriptionworkItemType必填iterationPathorganizationIdadditionalFields

update_work_item

Update an existing work item

輸入參數tagsstatetitleareaPathprioritytagsToAddassignedToworkItemId必填descriptiontagsToRemoveiterationPathadditionalFields

get_work_item_comments

Get comments and discussion history for a specific work item

輸入參數toporder必填expand必填projectIdworkItemId必填includeDeletedcontinuationToken

create_work_item_attachment

Upload a file and attach it to a work item. The file is read from the local filesystem, uploaded to Azure DevOps, and linked to the specified work item.

輸入參數commentfileNamefilePath必填workItemId必填

get_work_item_attachment

Download an attachment from Azure DevOps and save it to the local filesystem. The attachment ID can be obtained from the work item relations.

輸入參數outputPath必填attachmentId必填

delete_work_item_attachment

Delete an attachment from a work item. The attachment ID can be obtained from the work item relations.

輸入參數workItemId必填attachmentId必填

search_code

Search for code across repositories in a project

輸入參數top必填skip必填filtersprojectIdsearchText必填includeContent必填includeSnippet必填organizationId

search_wiki

Search for content across wiki pages in a project

輸入參數top必填skip必填filtersprojectIdsearchText必填includeFacets必填organizationId

search_work_items

Search for work items across projects in Azure DevOps

輸入參數top必填skip必填filtersorderByprojectIdsearchText必填includeFacets必填organizationId

create_pull_request

Create a new pull request, including reviewers, linked work items, and optional tags

輸入參數tagstitle必填isDraftprojectIdreviewersdescriptionrepositoryId必填workItemRefssourceRefName必填targetRefName必填organizationIdadditionalProperties

get_pull_request

Get a pull request by ID (no repositoryId required; best for Azure DevOps Server where PR IDs are project-scoped)

輸入參數projectId必填pullRequestId必填organizationId

list_pull_requests

List pull requests in a repository

輸入參數top必填skipstatuscreatorIdprojectIdreviewerIdrepositoryId必填sourceRefNametargetRefNameorganizationId

get_pull_request_comments

Get comments from a specific pull request

輸入參數topthreadIdprojectIdrepositoryId必填pullRequestId必填includeDeletedorganizationId

add_pull_request_comment

Add a comment to a pull request (repositoryId optional; derived from pullRequestId when omitted)

輸入參數statuscontent必填filePaththreadIdprojectIdlineNumberrepositoryIdpullRequestId必填organizationIdparentCommentId

update_pull_request

Update an existing pull request with new properties, manage reviewers and work items, and add or remove tags

輸入參數titlestatusaddTagsisDraftprojectIdremoveTagsdescriptionaddReviewersrepositoryId必填pullRequestId必填addWorkItemIdsorganizationId另有 3 個

get_pull_request_changes

Get the files changed in a pull request, their unified diffs, source/target branch names, and the status of policy evaluations

輸入參數projectIdrepositoryId必填pullRequestId必填organizationId

get_pull_request_checks

Summarize the latest status checks and policy evaluations for a pull request. - Surfaces pipeline and run identifiers so you can jump straight to the blocking validation. - Pair with pipeline tools (e.g., get_pipeline_run, pipeline_timeline) to inspect failures in depth.

輸入參數projectIdrepositoryId必填pullRequestId必填organizationId

update_pull_request_thread_status

Update the status of a comment thread in a pull request (repositoryId optional; derived from pullRequestId when omitted)

輸入參數status必填threadId必填projectIdrepositoryIdpullRequestId必填organizationId

list_pipelines

List pipelines in a project

輸入參數toporderByprojectId

get_pipeline

Get details of a specific pipeline

輸入參數projectIdpipelineId必填pipelineVersion

list_pipeline_runs

List recent runs for a pipeline

輸入參數top必填statebranchresultorderBy必填createdToprojectIdpipelineId必填createdFromcontinuationToken

get_pipeline_run

Get details for a specific pipeline run

輸入參數runId必填projectIdpipelineId

download_pipeline_artifact

Download a file from a pipeline run artifact and return its textual content

輸入參數runId必填projectIdpipelineIdartifactPath必填

pipeline_timeline

Retrieve the timeline of stages and jobs for a pipeline run, to reduce the amount of data returned, you can filter by state and result

輸入參數runId必填stateresultprojectIdpipelineIdtimelineId

get_pipeline_log

Retrieve a specific pipeline log using the timeline log identifier

輸入參數logId必填runId必填formatendLineprojectIdstartLinepipelineId

trigger_pipeline

Trigger a pipeline run

輸入參數branchprojectIdvariablespipelineId必填stagesToSkiptemplateParameters

get_wikis

Get details of wikis in a project

輸入參數projectIdorganizationId

get_wiki_page

Get the content of a wiki page

輸入參數wikiId必填pagePath必填projectIdorganizationId

create_wiki

Create a new wiki in the project

輸入參數name必填type必填projectIdmappedPath必填repositoryIdorganizationId

update_wiki_page

Update content of a wiki page

輸入參數wikiId必填commentcontent必填pagePath必填projectIdorganizationId

list_wiki_pages

List pages within an Azure DevOps wiki

輸入參數wikiId必填projectIdorganizationId

create_wiki_page

Create a new page in a wiki. If the page already exists at the specified path, it will be updated.

輸入參數wikiId必填commentcontent必填pagePath必填projectIdorganizationId

版本歷史

1
  1. v0.1.54最新Nov 5, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分