# Azure DevOps MCP Server This tutorial and navigation hub serves local Model Context Protocol (MCP) users (`USER`), self-hosting operators (`OPS`), contributors (`CONTRIB`), and AI agents (`AGENT-REPO`, `AGENT-MCP`). The server connects AI assistants to Azure DevOps Services and Azure DevOps Server over stdio or Streamable HTTP. It exposes 77 tools, `ado://` resource URIs, and MCP events. > **Official server versus community server:** Microsoft maintains the official Azure DevOps MCP server at [microsoft/azure-devops-mcp](https://github.com/microsoft/azure-devops-mcp). If you only target Azure DevOps Services in the cloud, start with Microsoft's server. Use this community server when you need **Azure DevOps Server (on-premises)** compatibility (Server 2019, 2020, and 2022). It also adds Streamable HTTP with Microsoft Entra ID on-behalf-of (`entra-obo`), Open Data Protocol (OData) Analytics, and MCP event streams. Read [Discussion #237](https://github.com/Tiberriver256/mcp-server-azure-devops/discussions/237) and [ROADMAP.md](./ROADMAP.md) for context and planned work. ## Audience Routing Select your role to open the canonical guide in one click. | Audience | Primary Goal | Canonical Documentation | | --- | --- | --- | | `USER` | Run locally over stdio, sign in, and filter tools | [Authentication Guide](./docs/authentication.md), [Configuration Reference](./docs/configuration.md), [Environment Examples](./docs/examples/README.md) | | `OPS` | Self-host Streamable HTTP, Docker, proxies, webhooks, and `entra-obo` | [HTTP and Docker Runbook](./docs/deployment/http-and-docker.md), [Configuration Reference](./docs/configuration.md) | | `CONTRIB` | Build from source, add tools, run tests, and follow repository standards | [Contributing Guide](./CONTRIBUTING.md), [Testing Guide](./docs/testing/README.md), [Technical Writing Standards](./docs/standards/technical-writing-standards.md), [Roadmap](./ROADMAP.md) | | `AGENT-REPO` | Load build commands, test rules, and REST API invariants fast | [AGENTS.md](./AGENTS.md), [llms.txt](./llms.txt), [Technical Writing Standards](./docs/standards/technical-writing-standards.md) | | `AGENT-MCP` | Pick tools, pass valid arguments, and read resource URIs | [Tools Reference](./docs/tools/README.md), [Resource URIs](./docs/tools/resources.md) | ## Prerequisites - **Node.js:** `>=24.0.0` (required by `package.json`). - **npm package:** `@tiberriver256/mcp-server-azure-devops` (run directly with `npx`, with no clone needed). - **Azure DevOps access:** An Azure DevOps Services organization or an Azure DevOps Server collection. ## Quickstart Choose your deployment platform before you configure your MCP client. ### Option A: Azure DevOps Services (Cloud) 1. Sign in with Azure CLI by running `az login`, or create a Personal Access Token (PAT). 2. Add the MCP server entry to your client configuration using `npx -y @tiberriver256/mcp-server-azure-devops`. 3. Set `AZURE_DEVOPS_ORG_URL` to `https://dev.azure.com/` and `AZURE_DEVOPS_AUTH_METHOD` to `azure-identity` or `pat`. 4. If you choose `pat`, also set `AZURE_DEVOPS_PAT` to ``. 5. Restart your MCP client and run the verification step below. ### Option B: Azure DevOps Server (On-Premises) 1. Create a PAT in your Azure DevOps Server collection because on-premises servers support `pat` authentication only. 2. Add the MCP server entry to your client configuration using `npx -y @tiberriver256/mcp-server-azure-devops`. 3. Set `AZURE_DEVOPS_ORG_URL` to your collection URL, such as `https://ado.corp:8080/tfs/DefaultCollection`. 4. Set `AZURE_DEVOPS_AUTH_METHOD` to `pat` and `AZURE_DEVOPS_PAT` to ``. 5. Set `AZURE_DEVOPS_API_VERSION` to match your release (`7.0` for Server 2022, `6.0` for 2020, or `5.0` for 2019). 6. Restart your MCP client and run the verification step below. ### Client Configurations (Claude Desktop, Cursor, and VS Code) **Claude Desktop** (`claude_desktop_config.json`) for Azure DevOps Services with Azure Identity: ```json { "mcpServers": { "azureDevOps": { "command": "npx", "args": ["-y", "@tiberriver256/mcp-server-azure-devops"], "env": { "AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/", "AZURE_DEVOPS_AUTH_METHOD": "azure-identity", "AZURE_DEVOPS_DEFAULT_PROJECT": "" } } } } ``` **Cursor** (`.cursor/mcp.json`) for Azure DevOps Server (on-premises) with PAT: ```json { "mcpServers": { "azureDevOps": { "command": "npx", "args": ["-y", "@tiberriver256/mcp-server-azure-devops"], "env": { "AZURE_DEVOPS_ORG_URL": "https://ado.corp:8080/tfs/DefaultCollection", "AZURE_DEVOPS_AUTH_METHOD": "pat", "AZURE_DEVOPS_PAT": "", "AZURE_DEVOPS_API_VERSION": "7.0", "AZURE_DEVOPS_DEFAULT_PROJECT": "" } } } } ``` **VS Code** (`.vscode/mcp.json`) for Azure DevOps Services with PAT: ```json { "servers": { "azureDevOps": { "type": "stdio", "command": "npx", "args": ["-y", "@tiberriver256/mcp-server-azure-devops"], "env": { "AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/", "AZURE_DEVOPS_AUTH_METHOD": "pat", "AZURE_DEVOPS_PAT": "", "AZURE_DEVOPS_DEFAULT_PROJECT": "" } } } } ``` ### Verify Your Connection 1. Open your MCP client and ask it to call `list_projects` (works on Cloud and On-Premises) or `get_me` (Cloud only). 2. Confirm the response returns your project list or user profile wrapped in a Spotlighting nonce header. ## Authentication Methods See the [Authentication Guide](./docs/authentication.md) for full setup steps, least-privilege PAT scopes, and troubleshooting. Ready-to-copy templates live in [Environment Examples](./docs/examples/README.md). | Method | Value | Cloud (Services) | On-Premises (Server) | Best Fit | | --- | --- | --- | --- | --- | | Personal Access Token | `pat` | Supported | Supported | On-premises Server and quick local setup | | Azure Identity | `azure-identity` | Supported | Not supported | Default for Cloud local dev, Continuous Integration (CI), and Managed Identity | | Azure CLI | `azure-cli` | Supported | Not supported | Local Cloud development using `az login` | | Microsoft Entra ID On-Behalf-Of | `entra-obo` | Supported | Not supported | Multi-user stateless Streamable HTTP deployments | ## Toolsets and Filtering The server exposes **77 tools across 13 toolsets**. See the [Tools Reference](./docs/tools/README.md) for the complete index, parameter tables, and JSON examples. | Toolset | Tools | Read-Only / Write | Reference | | --- | --- | --- | --- | | `users` | 1 | 1 / 0 | [User Tools](./docs/tools/user-tools.md) | | `organizations` | 1 | 1 / 0 | [Organizations](./docs/tools/organizations.md) | | `projects` | 4 | 4 / 0 | [Projects](./docs/tools/projects.md) | | `repositories` | 10 | 8 / 2 | [Repositories](./docs/tools/repositories.md) | | `work-items` | 11 | 4 / 7 | [Work Items](./docs/tools/work-items.md) | | `search` | 3 | 3 / 0 | [Search](./docs/tools/search.md) | | `pull-requests` | 12 | 5 / 7 | [Pull Requests](./docs/tools/pull-requests.md) | | `pipelines` | 10 | 8 / 2 | [Pipelines](./docs/tools/pipelines.md) | | `wikis` | 6 | 3 / 3 | [Wikis](./docs/tools/wiki.md) | | `test-plans` | 10 | 5 / 5 | [Test Plans](./docs/tools/test-plans.md) | | `work` | 4 | 4 / 0 | [Work and Sprints](./docs/tools/work.md) | | `analytics` | 3 | 3 / 0 | [Analytics](./docs/tools/analytics.md) | | `events` | 2 | 2 / 0 | [Events](./docs/tools/events.md) | ### Filtering, Presets, and Security Defaults Scope the active tool surface with CLI flags or environment variables. CLI flags override environment variables, which override `.env`, which override code defaults. ```bash npx -y @tiberriver256/mcp-server-azure-devops --toolsets pr-review --read-only ``` - **Evaluation order:** The server applies `toolsets` first, intersects with `enabled-tools`, subtracts `disabled-tools`, and then applies `read-only`. - **Named presets:** `pr-review`, `ci-debug`, `boards`, and `core`. See [Configuration Reference](./docs/configuration.md) for expanded toolsets, aliases, and all 21 CLI flags. - **Read-only warning:** `--read-only` (`AZURE_DEVOPS_READ_ONLY=true`) is fail-closed and blocks `get_work_item_attachment` because that tool writes downloaded files to local disk. - **Prompt-injection Spotlighting:** Enabled by default (`AZURE_DEVOPS_SPOTLIGHTING=true`) to wrap tool output with per-call 128-bit nonces. Pass `--no-spotlighting` to opt out. - **Self-hosting over HTTP or Docker:** Follow the [HTTP and Docker Runbook](./docs/deployment/http-and-docker.md) for Streamable HTTP, reverse-proxy Classless Inter-Domain Routing (CIDR) ranges, rate limits, and webhooks. ## Contributing and License Read [CONTRIBUTING.md](./CONTRIBUTING.md) to build from source, run offline and live test suites, or submit a pull request. Licensed under MIT.