A Model Context Protocol (MCP) server implementation for Azure DevOps, allowing AI assistants to interact with Azure DevOps APIs through a standardized protocol. 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
Add this skill
npx mdskills install Tiberriver256/mcp-server-azure-devopsComprehensive MCP server with 40+ tools spanning projects, repos, work items, pipelines, and PRs
1# Azure DevOps MCP Server23A Model Context Protocol (MCP) server implementation for Azure DevOps, allowing AI assistants to interact with Azure DevOps APIs through a standardized protocol.45## Overview67This server implements the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) 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:89- Access and manage projects, work items, repositories, and more10- Create and update work items, branches, and pull requests11- Execute common DevOps workflows through natural language12- Access repository content via standardized resource URIs13- Safely authenticate and interact with Azure DevOps resources1415## Server Structure1617The server is structured around the Model Context Protocol (MCP) for communicating with AI assistants. It provides tools for interacting with Azure DevOps resources including:1819- Projects20- Work Items21- Repositories22- Pull Requests23- Branches24- Pipelines2526### Core Components2728- **AzureDevOpsServer**: Main server class that initializes the MCP server and registers tools29- **Feature Modules**: Organized by feature area (work-items, projects, repositories, etc.)30- **Request Handlers**: Each feature module provides request identification and handling functions31- **Tool Handlers**: Modular functions for each Azure DevOps operation32- **Configuration**: Environment-based configuration for organization URL, PAT, etc.3334The 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.3536## Getting Started3738### Prerequisites3940- Node.js (v16+)41- npm or yarn42- Azure DevOps account with appropriate access43- Authentication credentials (see [Authentication Guide](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/docs/authentication.md) for details):44 - Personal Access Token (PAT), or45 - Azure Identity credentials, or46 - Azure CLI login4748### Running from npm (npx)4950If you just want to run the **published** server package, you **do not** need to clone or build this repository:5152```bash53npx -y @tiberriver256/mcp-server-azure-devops54```5556### Running locally (from source)5758From a checkout of this repository:5960```bash61npm ci62cp .env.example .env # then edit values63npm run build64npm start # runs: node dist/index.js65```6667For iterative development (auto-reload):6869```bash70npm run dev # runs src/index.ts via ts-node-dev71```7273### Usage with Claude Desktop/Cursor AI7475To integrate with Claude Desktop or Cursor AI, add one of the following configurations to your configuration file.7677#### Azure Identity Authentication7879Be sure you are logged in to Azure CLI with `az login` then add the following:8081```json82{83 "mcpServers": {84 "azureDevOps": {85 "command": "npx",86 "args": ["-y", "@tiberriver256/mcp-server-azure-devops"],87 "env": {88 "AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/your-organization",89 "AZURE_DEVOPS_AUTH_METHOD": "azure-identity",90 "AZURE_DEVOPS_DEFAULT_PROJECT": "your-project-name"91 }92 }93 }94}95```9697#### Personal Access Token (PAT) Authentication9899```json100{101 "mcpServers": {102 "azureDevOps": {103 "command": "npx",104 "args": ["-y", "@tiberriver256/mcp-server-azure-devops"],105 "env": {106 "AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/your-organization",107 "AZURE_DEVOPS_AUTH_METHOD": "pat",108 "AZURE_DEVOPS_PAT": "<YOUR_PAT>",109 "AZURE_DEVOPS_DEFAULT_PROJECT": "your-project-name"110 }111 }112 }113}114```115116Azure DevOps Server (on-prem) requires PAT authentication. Example:117118```json119{120 "mcpServers": {121 "azureDevOps": {122 "command": "npx",123 "args": ["-y", "@tiberriver256/mcp-server-azure-devops"],124 "env": {125 "AZURE_DEVOPS_ORG_URL": "https://server:8080/tfs/DefaultCollection",126 "AZURE_DEVOPS_AUTH_METHOD": "pat",127 "AZURE_DEVOPS_PAT": "<YOUR_PAT>",128 "AZURE_DEVOPS_DEFAULT_PROJECT": "your-project-name"129 }130 }131 }132}133```134135For detailed configuration instructions and more authentication options, see the [Authentication Guide](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/docs/authentication.md).136137## Authentication Methods138139This server supports multiple authentication methods for connecting to Azure DevOps APIs. For detailed setup instructions, configuration examples, and troubleshooting tips, see the [Authentication Guide](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/docs/authentication.md).140141### Supported Authentication Methods1421431. **Personal Access Token (PAT)** - Simple token-based authentication1442. **Azure Identity (DefaultAzureCredential)** - Flexible authentication using the Azure Identity SDK1453. **Azure CLI** - Authentication using your Azure CLI login146147Example configuration files for each authentication method are available in the [examples directory](https://github.com/tiberriver256/mcp-server-azure-devops/tree/main/docs/examples).148149Azure DevOps Server (on-prem) supports PAT authentication only. Azure Identity and Azure CLI are supported for Azure DevOps Services.150151## Environment Variables152153For a complete list of environment variables and their descriptions, see the [Authentication Guide](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/docs/authentication.md#configuration-reference).154155Key environment variables include:156157| Variable | Description | Required | Default |158| ------------------------------ | ---------------------------------------------------------------------------------- | ---------------------------- | ---------------- |159| `AZURE_DEVOPS_AUTH_METHOD` | Authentication method (`pat`, `azure-identity`, or `azure-cli`) - case-insensitive | No | `azure-identity` |160| `AZURE_DEVOPS_ORG_URL` | Full URL to your Azure DevOps organization or Server collection (e.g., `https://server:8080/tfs/DefaultCollection`) | Yes | - |161| `AZURE_DEVOPS_PAT` | Personal Access Token (for PAT auth) | Only with PAT auth | - |162| `AZURE_DEVOPS_DEFAULT_PROJECT` | Default project if none specified | No | - |163| `AZURE_DEVOPS_API_VERSION` | API version to use | No | Latest |164| `AZURE_TENANT_ID` | Azure AD tenant ID (for service principals) | Only with service principals | - |165| `AZURE_CLIENT_ID` | Azure AD application ID (for service principals) | Only with service principals | - |166| `AZURE_CLIENT_SECRET` | Azure AD client secret (for service principals) | Only with service principals | - |167| `LOG_LEVEL` | Logging level (debug, info, warn, error) | No | info |168169## Troubleshooting Authentication170171For detailed troubleshooting information for each authentication method, see the [Authentication Guide](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/docs/authentication.md#troubleshooting-authentication-issues).172173Common issues include:174175- Invalid or expired credentials176- Insufficient permissions177- Network connectivity problems178- Configuration errors179180## Authentication Implementation Details181182For technical details about how authentication is implemented in the Azure DevOps MCP server, see the [Authentication Guide](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/docs/authentication.md) and the source code in the `src/auth` directory.183184## Available Tools185186The 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.187188### User Tools189190- `get_me`: Get details of the authenticated user (id, displayName, email) (Azure DevOps Services only)191192### Organization Tools193194- `list_organizations`: List all accessible organizations (Azure DevOps Services only)195196### Project Tools197198- `list_projects`: List all projects in an organization199- `get_project`: Get details of a specific project200- `get_project_details`: Get comprehensive details of a project including process, work item types, and teams201202### Repository Tools203204- `list_repositories`: List all repositories in a project205- `get_repository`: Get details of a specific repository206- `get_repository_details`: Get detailed information about a repository including statistics and refs207- `get_file_content`: Get content of a file or directory from a repository208- `get_repository_tree`: List a repository's file tree from any path and depth209- `create_branch`: Create a new branch from an existing one210- `create_commit`: Commit multiple file changes to a branch using unified diffs or search/replace instructions211212### Work Item Tools213214- `get_work_item`: Retrieve a work item by ID215- `create_work_item`: Create a new work item216- `update_work_item`: Update an existing work item217- `list_work_items`: List work items in a project218- `manage_work_item_link`: Add, remove, or update links between work items219220### Search Tools221222- `search_code`: Search for code across repositories in a project223- `search_wiki`: Search for content across wiki pages in a project224- `search_work_items`: Search for work items across projects in Azure DevOps225226### Pipelines Tools227228- `list_pipelines`: List pipelines in a project229- `get_pipeline`: Get details of a specific pipeline230- `list_pipeline_runs`: List recent runs for a pipeline with optional filters231- `get_pipeline_run`: Get detailed run information and artifact summaries232- `download_pipeline_artifact`: Download a single artifact file as text233- `pipeline_timeline`: Retrieve the stage and job timeline for a run234- `get_pipeline_log`: Retrieve raw or JSON-formatted log content235- `trigger_pipeline`: Trigger a pipeline run with customizable parameters236237### Wiki Tools238239- `get_wikis`: List all wikis in a project240- `get_wiki_page`: Get content of a specific wiki page as plain text241242### Pull Request Tools243244- [`create_pull_request`](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/docs/tools/pull-requests.md#create_pull_request) - Create a new pull request245- [`get_pull_request`](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/docs/tools/pull-requests.md#get_pull_request) - Get a pull request by ID246- [`list_pull_requests`](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/docs/tools/pull-requests.md#list_pull_requests) - List pull requests in a repository247- [`add_pull_request_comment`](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/docs/tools/pull-requests.md#add_pull_request_comment) - Add a comment to a pull request248- [`get_pull_request_comments`](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/docs/tools/pull-requests.md#get_pull_request_comments) - Get comments from a pull request249- [`update_pull_request`](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/docs/tools/pull-requests.md#update_pull_request) - Update an existing pull request (title, description, status, draft state, reviewers, work items)250- [`get_pull_request_changes`](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/docs/tools/pull-requests.md#get_pull_request_changes) - List changes in a pull request and policy evaluation status251- [`get_pull_request_checks`](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/docs/tools/pull-requests.md#get_pull_request_checks) - Summarize status checks, policy evaluations, and their related pipelines252253For comprehensive documentation on all tools, see the [Tools Documentation](https://github.com/tiberriver256/mcp-server-azure-devops/tree/main/docs/tools).254255## Contributing256257Contributions are welcome! Please see [CONTRIBUTING.md](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/CONTRIBUTING.md) for contribution guidelines.258259## Star History260261[](https://www.star-history.com/#tiberriver256/mcp-server-azure-devops&Date)262263## License264265MIT266
Full transparency — inspect the skill content before installing.