0.1.1 • Published 1 year ago

@mmruesch/azure-devops-mcp v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

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:

npm install -g @mmruesch/azure-devops-mcp

Or run directly with npx:

npx @mmruesch/azure-devops-mcp

Option 2: Clone the Repository

  1. Clone the repository:
git clone <repository-url>
cd azure-devops-mcp
  1. Install dependencies:
npm install
  1. Configure environment variables:
    • Copy .env.example to .env
    • Fill in the required environment variables:
cp .env.example .env

Usage

Running from NPM installation

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

azure-devops-mcp

Or with custom port/host:

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:

{
  "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

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

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:
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