Purpose
Azure DevOps MCP Server is a Model Context Protocol (MCP) server implementation for Azure DevOps. It enables AI assistants (such as Claude) to securely interact with the Azure DevOps API through a standardized protocol, acting as a bridge between AI models and the Azure DevOps API to achieve, in a standardized way: accessing and managing projects, work items, code repositories, and more; creating and updating work items, branches, and pull requests; executing common DevOps workflows through natural language; accessing repository content through standardized resource URIs; and securely authenticating and operating on Azure DevOps resources.
Official and Community Version Notes
Microsoft maintains a product-supported Azure DevOps MCP (located at microsoft/azure-devops-mcp). If you are using Azure DevOps Services (cloud), it is recommended to start with the official version. This community server is still suitable for the following scenarios: when Azure DevOps Server (on-premises) support is needed, especially older versions that may be incompatible with Microsoft's MCP, or for features not yet provided by the official server. Related materials mention that Discussion #237 and ROADMAP.md contain more context and differentiation plans.
Server Structure
The server communicates with AI assistants around the Model Context Protocol (MCP) and provides tools for interacting with Azure DevOps resources. Core components include:
- AzureDevOpsServer: the main server class, which initializes the MCP server and registers tools.
- Feature Modules: organized by functional 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-variable-based configuration, such as organization URL, PAT, etc.
The server adopts a feature-based architecture, with each functional area (such as work items, projects, repositories) encapsulated in an independent module, making it easy to maintain and extend with new features.
Getting Started
Prerequisites (as listed in the source material):
- An Azure DevOps account with appropriate access permissions.
- Authentication credentials (see the Authentication Guide for details): a Personal Access Token (PAT), or Azure Identity credentials, or Azure CLI login.
Personal Access Token (PAT), or
Azure Identity credentials, or
Azure CLI login
Running from npm (npx): if you only want to run the published server package, there is no need to clone or build this repository.
Running locally (from source): run from a checkout of this repository. There is also a corresponding approach for iterative development (auto-reload).
Using with Claude Desktop / Cursor AI: add one of the following configurations to the configuration file. You must first log in to the Azure CLI using az login. Azure DevOps Server (on-premises) requires PAT authentication. For detailed configuration instructions and more authentication options, see the Authentication Guide.
Authentication Methods
The server supports multiple authentication methods for connecting to the Azure DevOps API. For detailed setup, configuration examples, and troubleshooting tips, see the Authentication Guide.
Supported authentication methods:
- Personal Access Token (PAT): simple token-based authentication.
- Azure Identity (DefaultAzureCredential): flexible authentication using the Azure Identity SDK.
- Azure CLI: authentication using Azure CLI login.
Example configuration files for each authentication method are located in the examples directory. Azure DevOps Server (on-premises) only supports PAT authentication; Azure Identity and Azure CLI are for Azure DevOps Services.
Environment variables: for the complete list and descriptions, see the Authentication Guide. Key environment variables include the organization URL, PAT, and others.
Authentication troubleshooting: see the Authentication Guide for details. Common issues include: invalid or expired credentials, insufficient permissions, network connection problems, and configuration errors.
Authentication implementation details: for technical details, see the Authentication Guide and the source code in the src/auth directory.
Available Tools
The server provides multiple tools for interacting with Azure DevOps resources; for detailed documentation, please refer to the corresponding documentation.
get_me: retrieves detailed information about the authenticated user (id, displayName, email) (Azure DevOps Services only).
Organization Tools
- list_organizations: lists all accessible organizations (Azure DevOps Services only).
- list_projects: lists all projects in the organization.
- get_project: retrieves detailed information about a specific project.
- get_project_details: retrieves comprehensive detailed information about a project, including processes, work item types, and teams.
Repository Tools
- list_repositories: lists all repositories in the project.
- get_repository: retrieves detailed information about a specific repository.
- get_repository_details: retrieves repository details, including statistics and refs.
- get_file_content: retrieves the content of a file or directory in a repository.
- get_repository_tree: lists the repository file tree from any path and depth.
- create_branch: creates a new branch from an existing branch.
- create_commit: commits multiple file changes to a branch using unified diffs or find/replace instructions.
Work Item Tools
- get_work_item: retrieves a work item by ID.
- create_work_item: creates a new work item.
- update_work_item: updates an existing work item.
- list_work_items: lists work items in the project.
- manage_work_item_link: adds, removes, or updates links between work items.
- create_work_item_attachment: uploads a file and attaches it to a work item.
- get_work_item_attachment: downloads an attachment from a work item.
- delete_work_item_attachment: deletes an attachment from a work item.
- search_code: Search for code in the project's repositories.
- search_wiki: Search for content in the project's wiki pages.
- search_work_items: Search for work items across multiple projects in Azure DevOps.
Pipeline Tools
- list_pipelines: List the pipelines in a project.
- get_pipeline: Get detailed information about a specific pipeline.
- list_pipeline_runs: List the recent runs of a pipeline, with optional filters.
- get_pipeline_run: Get detailed run information and an artifact summary.
- download_pipeline_artifact: Download a single artifact file as text.
- pipeline_timeline: Get the stage and job timeline of a run.
- get_pipeline_log: Get log content in raw or JSON format.
- trigger_pipeline: Trigger a pipeline run with customizable parameters.
- get_wikis: List all wikis in a project.
- get_wiki_page: Get the content of a specific wiki page as plain text.
Pull Request Tools
- create_pull_request: Create a new pull request.
- get_pull_request: Get a pull request by ID.
- list_pull_requests: List the pull requests in a repository.
- add_pull_request_comment: Add a comment to a pull request.
- get_pull_request_comments: Get the comments of a pull request.
- update_pull_request: Update an existing pull request (title, description, status, draft status, reviewers, work items).
- get_pull_request_changes: List the changes in a pull request and the policy evaluation status.
- get_pull_request_checks: Summarize status checks, policy evaluations, and their related pipelines.
Full documentation for all tools is available in Tools Documentation.
Contributing
Contributions are welcome; see CONTRIBUTING.md for the contribution guidelines.