A focused, read-only MCP server for Azure DevOps repositories, providing secure access to repository data without write operations.
This TypeScript project provides a local MCP server specifically focused on Azure DevOps repositories, enabling you to read repository data, pull requests, branches, and commits directly from your code editor.
π Read-Only Focus: This version only includes read operations for security and simplicity. Perfect for code review, repository analysis, and development workflows without modification capabilities.
- πΊ Overview
- π Expectations
- βοΈ Supported Tools
- π Installation & Getting Started
- π Using Domains
- π Troubleshooting
- π© Examples & Best Practices
- πββοΈ Frequently Asked Questions
- π Contributing
The Azure DevOps MCP Server - Repositories Edition brings repository context to your agents. Try prompts like:
- "List all repositories in project 'Contoso'"
- "Show pull requests in the 'api-service' repository"
- "Get details about pull request #123 including comment locations"
- "List branches in repository 'web-frontend'"
- "Show my branches across all repositories"
- "Search for commits containing 'bug fix' in the last month"
- "Get PR threads with file context for pull request #456"
- "List commits by author in the main branch"
- "Show pull request comments with line numbers for PR #789"
- "Find pull requests associated with specific commits"
The Azure DevOps MCP Server is built from tools that are concise, simple, focused, and easy to useβeach designed for a specific scenario. We intentionally avoid complex tools that try to do too much. The goal is to provide a thin abstraction layer over the REST APIs, making data access straightforward and letting the language model handle complex reasoning.
Read-only access to Azure DevOps repositories:
Repository Information:
- repo_list_repos_by_project: Retrieve a list of repositories for a given project
- repo_get_repo_by_name_or_id: Get repository details by project and repository name or ID
Branch Operations:
- repo_list_branches_by_repo: Retrieve a list of branches for a given repository
- repo_list_my_branches_by_repo: Retrieve a list of your branches for a given repository ID
- repo_get_branch_by_name: Get a branch by its name
Pull Request Operations:
- repo_list_pull_requests_by_repo: Retrieve a list of pull requests for a given repository
- repo_list_pull_requests_by_project: Retrieve a list of pull requests for a given project ID or name
- repo_get_pull_request_by_id: Get a pull request by its ID
- repo_list_pull_requests_by_commits: List pull requests associated with commits
Pull Request Comments & Threads:
- repo_list_pull_request_threads: Retrieve comment threads for a pull request with file context β¨
- repo_list_pull_request_thread_comments: Retrieve comments in a pull request thread
Commit Operations:
- repo_search_commits: Search for commits in repositories
β¨ Enhanced Feature:
repo_list_pull_request_threadsnow includesthreadContextwith file paths and line information, making it easy to see exactly where comments apply in your code without needing verbose responses.
For the best experience, use Visual Studio Code and GitHub Copilot. See the getting started documentation to use our MCP Server with other tools such as Visual Studio 2022, Claude Code, and Cursor.
- Install VS Code or VS Code Insiders
- Install Node.js 20+
- Install Azure CLI
- Open VS Code in an empty folder
Ensure you are logged in to Azure DevOps via the Azure CLI:
az loginAfter installation, select GitHub Copilot Agent Mode and refresh the tools list. Learn more about Agent Mode in the VS Code Documentation.
This installation method is the easiest for all users of Visual Studio Code.
π₯ Watch this quick start video to get up and running in under two minutes!
In your project, add a .vscode\mcp.json file with the following content:
{
"inputs": [
{
"id": "ado_org",
"type": "promptString",
"description": "Azure DevOps organization name (e.g. 'contoso')"
}
],
"servers": {
"ado": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@azure-devops/mcp", "${input:ado_org}"]
}
}
}π₯ To stay up to date with the latest features, you can use our nightly builds. Simply update your mcp.json configuration to use @azure-devops/mcp@next. Here is an updated example:
{
"inputs": [
{
"id": "ado_org",
"type": "promptString",
"description": "Azure DevOps organization name (e.g. 'contoso')"
}
],
"servers": {
"ado": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@azure-devops/mcp@next", "${input:ado_org}"]
}
}
}Save the file, then click 'Start'.
In chat, switch to Agent Mode.
Click "Select Tools" and choose the available tools.
Open GitHub Copilot Chat and try a prompt like List ADO repositories in project 'Contoso'.
π₯ We strongly recommend creating a
.github\copilot-instructions.mdin your project. This will enhance your experience using the Azure DevOps MCP Server with GitHub Copilot Chat. To start, just include "This project uses Azure DevOps. Always check to see if the Azure DevOps MCP server has a tool relevant to the user's request" in your copilot instructions file.
See the getting started documentation to use our MCP Server with other tools such as Visual Studio 2022, Claude Code, and Cursor.
This repositories edition is focused and simplified - only the repositories domain is available. The domain system has been streamlined for this read-only version.
{
"inputs": [
{
"id": "ado_org",
"type": "promptString",
"description": "Azure DevOps organization name (e.g. 'contoso')"
}
],
"servers": {
"ado": {
"type": "stdio",
"command": "mcp-server-azuredevops",
"args": ["${input:ado_org}"]
}
}
}You can explicitly specify the repositories domain if desired:
{
"servers": {
"ado": {
"type": "stdio",
"command": "mcp-server-azuredevops",
"args": ["${input:ado_org}", "-d", "repositories"]
}
}
}π Available Domain: Only
repositoriesdomain is available in this focused edition
See the Troubleshooting guide for help with common issues and logging.
Explore example prompts in our Examples documentation.
For best practices and tips to enhance your experience with the MCP Server, refer to the How-To guide.
For answers to common questions about the Azure DevOps MCP Server, see the Frequently Asked Questions.
We welcome contributions! During preview, please file issues for bugs, enhancements, or documentation improvements.
See our Contributions Guide for:
- π οΈ Development setup
- β¨ Adding new tools
- π Code style & testing
- π Pull request process
This project follows the Microsoft Open Source Code of Conduct. For questions, see the FAQ or contact open@microsoft.com.
Thanks to all contributors who make this project awesome! β€οΈ
Generated with contrib.rocks
Licensed under the MIT License.
Trademarks: This project may include trademarks or logos for Microsoft or third parties. Use of Microsoft trademarks or logos must follow Microsoftβs Trademark & Brand Guidelines. Third-party trademarks are subject to their respective policies.