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
Provider
Ryan Cardin
Release date
Mar 07, 2025
Language
TypeScript
Stats
39 stars

The Azure DevOps MCP Integration server provides seamless access to Azure DevOps services through the Model Context Protocol (MCP), enabling AI assistants and tools to manage work items, code repositories, boards, sprints, and more through a standardized interface.

Installation

Using Smithery

The easiest way to install the Azure DevOps MCP server for Claude Desktop is via Smithery:

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

Manual Installation

Prerequisites

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

Setup Steps

  1. Clone the repository:

    git clone <repository-url>
    cd AzureDevOps
    
  2. Install dependencies:

    npm install
    
  3. Configure environment variables by creating a .env file with the following settings:

    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
    
    # Choose one authentication method:
    
    # PAT authentication:
    AZURE_DEVOPS_AUTH_TYPE=pat
    AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN=your-personal-access-token
    
    # NTLM authentication:
    AZURE_DEVOPS_AUTH_TYPE=ntlm
    AZURE_DEVOPS_USERNAME=your-username
    AZURE_DEVOPS_PASSWORD=your-password
    AZURE_DEVOPS_DOMAIN=your-domain
    
    # Basic authentication:
    AZURE_DEVOPS_AUTH_TYPE=basic
    AZURE_DEVOPS_USERNAME=your-username
    AZURE_DEVOPS_PASSWORD=your-password
    
  4. Build the project:

    npm run build
    

    If you encounter TypeScript errors but want to proceed:

    npm run build:ignore-errors
    
  5. Start the server:

    npm run start
    

Configuration

Personal Access Token (PAT)

For Azure DevOps Services (cloud), create a Personal Access Token with these permissions:

  • Work Items: Read & Write
  • Code: Read & Write
  • Project and Team: Read & Write
  • Build: Read
  • Release: Read

To create a PAT:

  1. Go to your Azure DevOps organization
  2. Click your profile icon → "Personal access tokens"
  3. Click "New Token"
  4. Set a name and select appropriate scopes

Entra ID Authentication

If using Entra ID authentication:

  1. Ensure you have Azure CLI installed and authenticated
  2. Set AZURE_DEVOPS_AUTH_TYPE=entra in your environment variables

Environment Variables

Variable Description Required Default
AZURE_DEVOPS_ORG_URL Azure DevOps organization/server URL 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 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 Tool methods to enable (comma-separated) No All tools

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

Tool Filtering

You can restrict which tools are available using the ALLOWED_TOOLS environment variable:

ALLOWED_TOOLS=listWorkItems,getWorkItemById,searchWorkItems,createWorkItem

Usage

Once the server is running, you can interact with it using the MCP protocol. Here are some examples:

Working with Work Items

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]"
  }
}

Working with Repositories

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

  • Verify your Personal Access Token is valid with correct permissions
  • Ensure the organization URL is correct

TypeScript Build Errors

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

Runtime Errors

  • Confirm the specified Azure DevOps project exists and is accessible
  • Verify network connectivity to your Azure DevOps instance

How to add this MCP server to 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 > MCP and click "Add new global MCP server".

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

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

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