npm package: @mmruesch/azure-devops-mcp
Description: Azure DevOps reference server for the Model Context Protocol (MCP)
Author: Matt Ruesch
Latest version: 0.1.1

# Azure DevOps MCP (Model Context Protocol)

This project serves as a reference server implementation for the Model Context Protocol (MCP) integrated with Azure DevOps. It enables AI assistants to interact with Azure DevOps resources and perform operations programmatically.

## Features

- Azure DevOps integration using official Node.js SDK
- Support for Model Context Protocol (MCP)
- Project management operations
- Work item management
- Repository operations
- Code search capabilities

## Prerequisites

- Node.js (v18 or higher recommended)
- Azure DevOps account with appropriate permissions
- Azure DevOps Personal Access Token (PAT)

## Installation

### Option 1: Install as NPM Package (Recommended)

Install the package globally:
```bash
npm install -g @mmruesch/azure-devops-mcp
```

Or run directly with npx:
```bash
npx @mmruesch/azure-devops-mcp
```

### Option 2: Clone the Repository

1. Clone the repository:
```bash
git clone <repository-url>
cd azure-devops-mcp
```

2. Install dependencies:
```bash
npm install
```

3. Configure environment variables:
   - Copy `.env.example` to `.env`
   - Fill in the required environment variables:
```bash
cp .env.example .env
```

## Usage

### Running from NPM installation

Create a `.env` file in your current directory with the required variables, then run:

```bash
azure-devops-mcp
```

Or with custom port/host:

```bash
azure-devops-mcp --port 4000 --host 0.0.0.0
```

### MCP Configuration with Windsurf/Cursor

Add the Azure DevOps MCP server to your `mcp_config.json` file:

```json
{
  "mcpServers": {
    "azure-devops": {
      "command": "npx",
      "args": [
        "@mmruesch/azure-devops-mcp"
      ],
      "env": {
        "AZURE_DEVOPS_ORG_URL": "https://dev.azure.com/your-organization",
        "AZURE_DEVOPS_PAT": "your-pat-token",
        "AZURE_DEVOPS_DEFAULT_PROJECT": "your-project",
        "AZURE_DEVOPS_DEFAULT_REPOSITORY": "your-repository"
      }
    }
  }
}
```

### Running from Repository

```bash
npm start
```

Then add to Cursor/Windsurf:

Make sure you use the path `http://localhost:3000/sse`. You can change ports by defining one in the env.

![Add to Cursor](add-to-cursor.png)

## Environment Configuration

The following environment variables need to be configured in your `.env` file or in the mcp_config.json:

- `AZURE_DEVOPS_ORG_URL`: Your Azure DevOps organization URL
- `AZURE_DEVOPS_PAT`: Personal Access Token for Azure DevOps
- `AZURE_DEVOPS_DEFAULT_PROJECT`: (Optional) Default project to use when not specified in API calls
- `AZURE_DEVOPS_DEFAULT_REPOSITORY`: (Optional) Default repository to use when not specified in API calls
- Additional configuration variables as specified in `.env.example`

## Publishing to NPM

If you've made changes to the package and want to publish a new version:

1. Update the version in package.json
2. Build and publish the package:

```bash
npm login
npm publish --access public
```

## Available Scripts

- `npm run build` - Build the TypeScript project
- `npm run dev` - Run the server in development mode with hot reload
- `npm start` - Run the production server

## License

MIT