Azure DevOps MCP Server
Click on "Deploy 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 MCP Server show me the open pull requests in the Contoso project"
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 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
Related MCP server: Azure DevOps MCP Server
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:
npx -y @billg118/mcp-server-azure-devopsRunning locally (from source)
From a checkout of this repository:
npm ci
cp .env.example .env # then edit values
npm run build
npm start # runs: node dist/index.jsFor iterative development (auto-reload):
npm run dev # runs src/index.ts via tsx watchUsage 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:
{
"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
{
"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:
{
"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
Personal Access Token (PAT) - Simple token-based authentication
Azure Identity (DefaultAzureCredential) - Flexible authentication using the Azure Identity SDK
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:
Variable | Description | Required | Default |
| Authentication method ( | No |
|
| Full URL to your Azure DevOps organization or Server collection (e.g., | Yes | - |
| Personal Access Token (for PAT auth) | Only with PAT auth | - |
| Default project if none specified | No | - |
| REST api-version for the tools that call the REST API directly (per-release values) | No |
|
| Azure AD tenant ID (for service principals) | Only with service principals | - |
| Azure AD application ID (for service principals) | Only with service principals | - |
| Azure AD client secret (for service principals) | Only with service principals | - |
| Logging level (debug, info, warn, error) | No | info |
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 organizationget_project: Get details of a specific projectget_project_details: Get comprehensive details of a project including process, work item types, and teams
Repository Tools
list_repositories: List all repositories in a projectget_repository: Get details of a specific repositoryget_repository_details: Get detailed information about a repository including statistics and refsget_file_content: Get content of a file or directory from a repositoryget_repository_tree: List a repository's file tree from any path and depthcreate_branch: Create a new branch from an existing onecreate_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 IDcreate_work_item: Create a new work itemupdate_work_item: Update an existing work itemlist_work_items: List work items in a projectmanage_work_item_link: Add, remove, or update links between work itemscreate_work_item_attachment: Upload and attach a file to a work itemget_work_item_attachment: Download an attachment from a work itemdelete_work_item_attachment: Delete an attachment from a work item
Search Tools
search_code: Search for code across repositories in a projectsearch_wiki: Search for content across wiki pages in a projectsearch_work_items: Search for work items across projects in Azure DevOps
Pipelines Tools
list_pipelines: List pipelines in a projectget_pipeline: Get details of a specific pipelinelist_pipeline_runs: List recent runs for a pipeline with optional filtersget_pipeline_run: Get detailed run information and artifact summariesdownload_pipeline_artifact: Download a single artifact file as textpipeline_timeline: Retrieve the stage and job timeline for a runget_pipeline_log: Retrieve raw or JSON-formatted log contenttrigger_pipeline: Trigger a pipeline run with customizable parameters
Wiki Tools
get_wikis: List all wikis in a projectget_wiki_page: Get content of a specific wiki page as plain text
Pull Request Tools
create_pull_request- Create a new pull requestget_pull_request- Get a pull request by IDlist_pull_requests- List pull requests in a repositoryadd_pull_request_comment- Add a comment to a pull requestget_pull_request_comments- Get comments from a pull requestupdate_pull_request- Update an existing pull request (title, description, status, draft state, reviewers, work items)get_pull_request_changes- List changes in a pull request and policy evaluation statusget_pull_request_checks- Summarize status checks, policy evaluations, and their related pipelines
For comprehensive documentation on all tools, see the Tools Documentation.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for contribution guidelines.
Star History
License
MIT
Available Tools
49 toolsadd_pull_request_commentC
Add a comment to a pull request (repositoryId optional; derived from pullRequestId when omitted)
Inputs: content (required), pullRequestId (required), status, filePath, +6 more.
create_branchC
Create a new branch from an existing one
Inputs: newBranch (required), repositoryId (required), sourceBranch (required), projectId, +1 more.
create_commitA
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:
{
"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/filepathand+++ /dev/nullFor additions:
--- /dev/nulland+++ b/filepath
Example unified diff:
{
"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"
}]
}Inputs: changes (required), branchName (required), repositoryId (required), commitMessage (required), +2 more.
create_pull_requestC
Create a new pull request, including reviewers, linked work items, and optional tags
Inputs: title (required), repositoryId (required), sourceRefName (required), targetRefName (required), +8 more.
create_wikiC
Create a new wiki in the project
Inputs: name (required), type (required), mappedPath (required), projectId, +2 more.
create_wiki_pageA
Create a new page in a wiki. If the page already exists at the specified path, it will be updated.
Inputs: wikiId (required), content (required), pagePath (required), comment, +2 more.
create_work_itemC
Create a new work item
Inputs: title (required), workItemType (required), tags, areaPath, +8 more.
create_work_item_attachmentA
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.
Inputs: filePath (required), workItemId (required), comment, fileName.
delete_work_item_attachmentA
Delete an attachment from a work item. The attachment ID can be obtained from the work item relations.
Inputs: workItemId (required), attachmentId (required).
download_pipeline_artifactA
Download a file from a pipeline run artifact and return its textual content
Inputs: runId (required), artifactPath (required), projectId, pipelineId.
get_all_repositories_treeA
Displays a hierarchical tree view of files and directories across multiple Azure DevOps repositories within a project, based on their default branches
Inputs: depth (required), pattern, projectId, organizationId, +1 more.
get_file_contentC
Get content of a file or directory from a repository
Inputs: path (required), repositoryId (required), version, projectId, +2 more.
get_meA
Get details of the authenticated user (id, displayName, email)
Inputs: no named parameters.
get_pipelineC
Get details of a specific pipeline
Inputs: pipelineId (required), projectId, pipelineVersion.
get_pipeline_logC
Retrieve a specific pipeline log using the timeline log identifier
Inputs: logId (required), runId (required), format, endLine, +3 more.
get_pipeline_runC
Get details for a specific pipeline run
Inputs: runId (required), projectId, pipelineId.
get_projectC
Get details of a specific project
Inputs: projectId, organizationId.
get_project_detailsB
Get comprehensive details of a project including process, work item types, and teams
Inputs: includeTeams (required), includeFields (required), includeProcess (required), expandTeamIdentity (required), +3 more.
get_pull_requestB
Get a pull request by ID (no repositoryId required; best for Azure DevOps Server where PR IDs are project-scoped)
Inputs: projectId (required), pullRequestId (required), organizationId.
get_pull_request_changesA
Get the files changed in a pull request, their unified diffs, source/target branch names, and the status of policy evaluations
Inputs: repositoryId (required), pullRequestId (required), projectId, organizationId.
get_pull_request_checksA
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.
Inputs: repositoryId (required), pullRequestId (required), projectId, organizationId.
get_pull_request_commentsC
Get comments from a specific pull request
Inputs: repositoryId (required), pullRequestId (required), top, threadId, +3 more.
get_repositoryC
Get details of a specific repository
Inputs: repositoryId (required), projectId, organizationId.
get_repository_detailsC
Get detailed information about a repository including statistics and refs
Inputs: includeRefs (required), repositoryId (required), includeStatistics (required), projectId, +3 more.
get_repository_treeB
Displays a hierarchical tree view of files and directories within a single repository starting from an optional path
Inputs: path (required), depth (required), repositoryId (required), projectId, +1 more.
get_wiki_pageC
Get the content of a wiki page
Inputs: wikiId (required), pagePath (required), projectId, organizationId.
get_wikisC
Get details of wikis in a project
Inputs: projectId, organizationId.
get_work_itemC
Get details of a specific work item
Inputs: workItemId (required), expand.
get_work_item_attachmentB
Download an attachment from Azure DevOps and save it to the local filesystem. The attachment ID can be obtained from the work item relations.
Inputs: outputPath (required), attachmentId (required).
get_work_item_commentsC
Get comments and discussion history for a specific work item
Inputs: order (required), expand (required), workItemId (required), top, +3 more.
list_commitsB
List recent commits on a branch including file-level diff content for each commit
Inputs: branchName (required), repositoryId (required), top, skip, +2 more.
list_organizationsA
List all Azure DevOps organizations accessible to the current authentication
Inputs: no named parameters.
list_pipeline_runsC
List recent runs for a pipeline
Inputs: top (required), orderBy (required), pipelineId (required), state, +6 more.
list_pipelinesC
List pipelines in a project
Inputs: top, orderBy, projectId.
list_projectsC
List all projects in an organization
Inputs: top, skip, stateFilter, organizationId, +1 more.
list_pull_requestsC
List pull requests in a repository
Inputs: top (required), repositoryId (required), skip, status, +6 more.
list_repositoriesC
List repositories in a project
Inputs: projectId, includeLinks, organizationId.
list_wiki_pagesC
List pages within an Azure DevOps wiki
Inputs: wikiId (required), projectId, organizationId.
list_work_itemsC
List work items in a project
Inputs: top, skip, wiql, fields, +4 more.
manage_work_item_linkC
Add or remove links between work items
Inputs: operation (required), relationType (required), sourceWorkItemId (required), targetWorkItemId (required), +4 more.
pipeline_timelineB
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
Inputs: runId (required), state, result, projectId, +2 more.
search_codeC
Search for code across repositories in a project
Inputs: top (required), skip (required), searchText (required), includeContent (required), +4 more.
search_wikiC
Search for content across wiki pages in a project
Inputs: top (required), skip (required), searchText (required), includeFacets (required), +3 more.
search_work_itemsC
Search for work items across projects in Azure DevOps
Inputs: top (required), skip (required), searchText (required), includeFacets (required), +4 more.
trigger_pipelineC
Trigger a pipeline run
Inputs: pipelineId (required), branch, projectId, variables, +2 more.
update_pull_requestB
Update an existing pull request with new properties, manage reviewers and work items, and add or remove tags
Inputs: repositoryId (required), pullRequestId (required), title, status, +11 more.
update_pull_request_thread_statusC
Update the status of a comment thread in a pull request (repositoryId optional; derived from pullRequestId when omitted)
Inputs: status (required), threadId (required), pullRequestId (required), projectId, +2 more.
update_wiki_pageC
Update content of a wiki page
Inputs: wikiId (required), content (required), pagePath (required), comment, +2 more.
update_work_itemC
Update an existing work item
Inputs: workItemId (required), tags, state, title, +8 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 49 tools
Several near-duplicate pairs create real ambiguity: get_project vs get_project_details, get_repository vs get_repository_details, get_repository_tree vs get_all_repositories_tree, and get_pull_request_checks vs get_pull_request_changes. Descriptions do distinguish them (e.g. 'comprehensive details' vs basic), but an agent must read carefully to pick correctly. The bulk of the remaining tools (work items, pipelines, wikis) are cleanly separated by resource.
Almost everything follows a verb_noun snake_case pattern (list_*, get_*, create_*, update_*, search_*, manage_*). Minor deviations exist: get_me uses a pronoun object, get_all_repositories_tree adds an extra qualifier, and pipeline_timeline drops the verb entirely in favor of noun-first naming. These are readable but break the otherwise predictable convention.
49 tools is well beyond a manageable surface for one server, spanning six distinct domains (orgs/projects, repos/git, work items, search, pull requests, pipelines, wikis). The volume plus the redundant *_details siblings suggests the surface could be consolidated substantially. Agents will struggle to route reliably across this many options.
Read/create/update coverage is broad and genuinely deep (work item attachments and links, PR threads and checks, pipeline logs and timelines, wiki pages). However, delete operations are notably missing across most domains: no delete_work_item, delete_branch, delete_repository, delete_pull_request, or delete_wiki_page — only attachments have a delete tool. These gaps will force agents to declare dead ends on common lifecycle tasks.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
Crie épicos, features, histórias e tasks no Azure DevOps a partir de uma conversa.
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Azure DevOps to manage work items, Git repositories, branches, commits, and projects through natural language commands.5MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Azure DevOps entities like projects, repositories, work items, pull requests, and pipelines.17MIT
- AlicenseBqualityCmaintenanceEnables AI assistants to interact with Azure DevOps, providing tools for managing work items, repositories, pipelines, and more through the Model Context Protocol.100MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Azure DevOps projects, including work items, test results, Git repositories, and dependency analysis via the Model Context Protocol.-