Azure DevOps MCP server

Integrates with Azure DevOps services to manage work items, code repositories, boards, sprints, and projects using TypeScript and the Model Context Protocol SDK.
Back to servers
Setup instructions
Provider
Ryan Cardin
Release date
Mar 07, 2025
Language
TypeScript
Stats
46 stars

The Azure DevOps MCP server provides seamless integration with Azure DevOps services through the Model Context Protocol, allowing you to interact with work items, repositories, projects, boards, and sprints programmatically. This tool makes it easy for AI assistants and other applications to manage Azure DevOps resources through a standardized interface.

Installation Options

Quick Start with NPX (Recommended)

The simplest way to get started is using NPX:

npx @ryancardin/azuredevops-mcp-server@latest

Global NPM Installation

For regular use, you can install the package globally:

npm install -g @ryancardin/azuredevops-mcp-server
azuredevops-mcp-server

Using with Claude Desktop

npx -y @smithery/cli install @RyanCardin15/azuredevops-mcp --client claude

Local Development Setup

git clone https://github.com/RyanCardin15/AzureDevOps-MCP.git
cd AzureDevOps-MCP
npm install
npm run build
npm start

Configuration

Prerequisites

  • Node.js (v16 or later)
  • Azure DevOps account with appropriate credentials

Environment Variables

Set these variables in your shell, .env file, or MCP client configuration:

For Azure DevOps Services (Cloud)

AZURE_DEVOPS_ORG_URL=https://dev.azure.com/your-organization
AZURE_DEVOPS_PROJECT=your-default-project
AZURE_DEVOPS_IS_ON_PREMISES=false
AZURE_DEVOPS_AUTH_TYPE=pat
AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN=your-personal-access-token

For Azure DevOps Server (On-Premises)

AZURE_DEVOPS_ORG_URL=https://your-server/tfs
AZURE_DEVOPS_PROJECT=your-default-project
AZURE_DEVOPS_IS_ON_PREMISES=true
AZURE_DEVOPS_COLLECTION=your-collection
AZURE_DEVOPS_API_VERSION=6.0
AZURE_DEVOPS_AUTH_TYPE=pat
AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN=your-personal-access-token

Client Configuration Examples

Cursor Configuration

{
  "mcpServers": {
    "azure-devops": {
      "command": "npx",
      "args": ["@ryancardin/azuredevops-mcp-server@latest"],
      "env": {
        "AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/your-organization",
        "AZURE_DEVOPS_PROJECT": "your-project",
        "AZURE_DEVOPS_IS_ON_PREMISES": "false",
        "AZURE_DEVOPS_AUTH_TYPE": "pat",
        "AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN": "your-personal-access-token"
      }
    }
  }
}

Claude Desktop Configuration

{
  "mcpServers": {
    "azure-devops": {
      "command": "npx",
      "args": ["@ryancardin/azuredevops-mcp-server@latest"],
      "env": {
        "AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/your-organization",
        "AZURE_DEVOPS_PROJECT": "your-project",
        "AZURE_DEVOPS_IS_ON_PREMISES": "false",
        "AZURE_DEVOPS_AUTH_TYPE": "pat",
        "AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN": "your-personal-access-token"
      }
    }
  }
}

Creating a Personal Access Token (PAT)

  1. Go to your Azure DevOps organization
  2. Click your profile icon → Personal access tokens
  3. Click "New Token"
  4. Select the appropriate scopes:
    • Work Items: Read & Write
    • Code: Read & Write
    • Project and Team: Read & Write
    • Build: Read
    • Release: Read

Environment Variables Reference

Variable Description Required Default
AZURE_DEVOPS_ORG_URL URL of your Azure DevOps organization or server Yes -
AZURE_DEVOPS_PROJECT Default project to use Yes -
AZURE_DEVOPS_IS_ON_PREMISES Whether using Azure DevOps Server No false
AZURE_DEVOPS_COLLECTION Collection name for on-premises No* -
AZURE_DEVOPS_API_VERSION API version for on-premises No -
AZURE_DEVOPS_AUTH_TYPE Authentication type (pat/ntlm/basic/entra) No pat
AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN Personal access token (for 'pat' auth) No** -
AZURE_DEVOPS_USERNAME Username for NTLM/Basic auth No** -
AZURE_DEVOPS_PASSWORD Password for NTLM/Basic auth No** -
AZURE_DEVOPS_DOMAIN Domain for NTLM auth No -
ALLOWED_TOOLS Comma-separated list of tool methods to enable No All tools

* Required if AZURE_DEVOPS_IS_ON_PREMISES=true
** Required based on chosen authentication type

Usage Examples

List Work Items

{
  "tool": "listWorkItems",
  "params": {
    "query": "SELECT [System.Id], [System.Title], [System.State] FROM WorkItems WHERE [System.State] = 'Active' ORDER BY [System.CreatedDate] DESC"
  }
}

Create a Work Item

{
  "tool": "createWorkItem",
  "params": {
    "workItemType": "User Story",
    "title": "Implement new feature",
    "description": "As a user, I want to be able to export reports to PDF.",
    "assignedTo": "[email protected]"
  }
}

List Repositories

{
  "tool": "listRepositories",
  "params": {
    "projectId": "MyProject"
  }
}

Create a Pull Request

{
  "tool": "createPullRequest",
  "params": {
    "repositoryId": "repo-guid",
    "sourceRefName": "refs/heads/feature-branch",
    "targetRefName": "refs/heads/main",
    "title": "Add new feature",
    "description": "This PR adds the export to PDF feature"
  }
}

Troubleshooting

Common Issues

Authentication Errors

  • Ensure your Personal Access Token is valid and has the required permissions
  • Check that the organization URL is correct

TypeScript Errors During Build

  • Use npm run build:ignore-errors to bypass TypeScript errors
  • Check for missing or incorrect type definitions

Runtime Errors

  • Verify that the Azure DevOps project specified exists and is accessible

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "azuredevops-mcp" '{"command":"npx","args":["-y","@smithery/cli","run","@RyanCardin15/azuredevops-mcp"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "azuredevops-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@smithery/cli",
                "run",
                "@RyanCardin15/azuredevops-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "azuredevops-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@smithery/cli",
                "run",
                "@RyanCardin15/azuredevops-mcp"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later