$git clone https://github.com/Tiberriver256/mcp-server-azure-devopsA Model Context Protocol (MCP) server implementation for Azure DevOps, allowing AI assistants to interact with Azure DevOps APIs through a standardized protocol.
| 1 | # Azure DevOps MCP Server |
| 2 | |
| 3 | A Model Context Protocol (MCP) server implementation for Azure DevOps, allowing AI assistants to interact with Azure DevOps APIs through a standardized protocol. |
| 4 | |
| 5 | > **Looking for the official server?** Microsoft maintains a product-supported Azure DevOps MCP at [microsoft/azure-devops-mcp](https://github.com/microsoft/azure-devops-mcp). If you use Azure DevOps Services (cloud), start there. |
| 6 | > |
| 7 | > 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](https://github.com/Tiberriver256/mcp-server-azure-devops/discussions/237) for more context. |
| 8 | |
| 9 | ## Overview |
| 10 | |
| 11 | This 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: |
| 12 | |
| 13 | - Access and manage projects, work items, repositories, and more |
| 14 | - Create and update work items, branches, and pull requests |
| 15 | - Execute common DevOps workflows through natural language |
| 16 | - Access repository content via standardized resource URIs |
| 17 | - Safely authenticate and interact with Azure DevOps resources |
| 18 | |
| 19 | ## Server Structure |
| 20 | |
| 21 | 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: |
| 22 | |
| 23 | - Projects |
| 24 | - Work Items |
| 25 | - Repositories |
| 26 | - Pull Requests |
| 27 | - Branches |
| 28 | - Pipelines |
| 29 | |
| 30 | ### Core Components |
| 31 | |
| 32 | - **AzureDevOpsServer**: Main server class that initializes the MCP server and registers tools |
| 33 | - **Feature Modules**: Organized by feature area (work-items, projects, repositories, etc.) |
| 34 | - **Request Handlers**: Each feature module provides request identification and handling functions |
| 35 | - **Tool Handlers**: Modular functions for each Azure DevOps operation |
| 36 | - **Configuration**: Environment-based configuration for organization URL, PAT, etc. |
| 37 | |
| 38 | 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. |
| 39 | |
| 40 | ## Getting Started |
| 41 | |
| 42 | ### Prerequisites |
| 43 | |
| 44 | - Node.js (v16+) |
| 45 | - npm or yarn |
| 46 | - Azure DevOps account with appropriate access |
| 47 | - Authentication credentials (see [Authentication Guide](https://github.com/tiberriver256/mcp-server-azure-devops/blob/main/docs/authentication.md) for details): |
| 48 | - Personal Access Token (PAT), or |
| 49 | - Azure Identity credentials, or |
| 50 | - Azure CLI login |
| 51 | |
| 52 | ### Running from npm (npx) |
| 53 | |
| 54 | If you just want to run the **published** server package, you **do not** need to clone or build this repository: |
| 55 | |
| 56 | ```bash |
| 57 | npx -y @tiberriver256/mcp-server-azure-devops |
| 58 | ``` |
| 59 | |
| 60 | ### Running locally (from source) |
| 61 | |
| 62 | From a checkout of this repository: |
| 63 | |
| 64 | ```bash |
| 65 | npm ci |
| 66 | cp .env.example .env # then edit values |
| 67 | npm run build |
| 68 | npm start # runs: node dist/index.js |
| 69 | ``` |
| 70 | |
| 71 | For iterative development (auto-reload): |
| 72 | |
| 73 | ```bash |
| 74 | npm run dev # runs src/index.ts via ts-node-dev |
| 75 | ``` |
| 76 | |
| 77 | ### Usage with Claude Desktop/Cursor AI |
| 78 | |
| 79 | To integrate with Claude Desktop or Cursor AI, add one of the following configurations to your configuration file. |
| 80 | |
| 81 | #### Azure Identity Authentication |
| 82 | |
| 83 | Be sure you are logged in to Azure CLI with `az login` then add the following: |
| 84 | |
| 85 | ```json |
| 86 | { |
| 87 | "mcpServers": { |
| 88 | "azureDevOps": { |
| 89 | "command": "npx", |
| 90 | "args": ["-y", "@tiberriver256/mcp-server-azure-devops"], |
| 91 | "env": { |
| 92 | "AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/your-organization", |
| 93 | "AZURE_DEVOPS_AUTH_METHOD": "azure-identity", |
| 94 | "AZURE_DEVOPS_DEFAULT_PROJECT": "your-project-name" |
| 95 | } |
| 96 | } |
| 97 | } |
| 98 | } |
| 99 | ``` |
| 100 | |
| 101 | #### Personal Access Token (PAT) Authentication |
| 102 | |
| 103 | ```json |
| 104 | { |
| 105 | "mcpServers": { |
| 106 | "azureDevOps": { |
| 107 | "command": "npx", |