DevOps-MCP

DevOps-MCP

Dynamic MCP server for Azure DevOps that auto-switches authentication by directory.

6
Stars
2
Forks
0
Releases

Overview

Azure DevOps MCP is a dynamic MCP (Model Context Protocol) server that automatically switches the Azure DevOps authentication context based on the current working directory, enabling seamless access to multiple Azure DevOps organizations and projects from a single MCP server. It relies on per-repository local configuration files named .azure-devops.json, which specify organizationUrl, project, a PAT token, and tool settings (workItems, repositories, builds, pullRequests, pipelines) along with metadata. PAT tokens are stored locally per repository and are excluded fromGit. The server supports unlimited projects with isolated authentication, providing comprehensive Azure DevOps integration (work items, repositories, builds, pipelines, and more). Key capabilities include local configuration files, zero-configuration switching, dynamic environment/context detection, and robust error handling with graceful fallbacks to environment variables. Directory detection supports exact matches, nested directories, longest-match priority, parent-directory search, and a fallback to a default configuration. The MCP exposes commands for managing Azure DevOps operations (get-work-items, create-work-item, get-repositories, get-pull-requests, get-builds, trigger-pipeline, get-pipeline-status) and integrates with Claude Code for automatic context switching and secure contextual authentication. Security considerations cover HTTPS, per-request token handling, and avoidance of token caching.

Details

Owner
wangkanai
Language
TypeScript
License
MIT License
Updated
2025-12-07

Features

Local Configuration Files

Each repository contains a .azure-devops.json configuration enabling per-repo authentication and project context.

Dynamic Environment Switching

Automatically detects the current Azure DevOps project context based on the working directory to switch authentication.

Multiple Project Support

Supports unlimited projects with separate authentication contexts, enabling multi-organization/multi-project access from one MCP server.

Comprehensive Azure DevOps Integration

Provides access to work items, repositories, builds, pull requests, pipelines, and related Azure DevOps features.

Zero Configuration Switching

Seamless switching between projects using only local configuration files without global setup.

Secure Token Storage

PAT tokens are stored locally per repository and excluded from git for security.

Error Handling & Fallback

Robust error handling with graceful degradation to environment variables when needed.

Directory Detection Logic

Includes exact, nested, longest-match, and parent-directory search with fallback to ensure correct context.

Audience

DevelopersSwitch authentication and context automatically across Azure DevOps projects from a single MCP server.
DevOps engineersManage work items, repositories, builds, pipelines across organizations without reconfiguring.
Claude Code usersIntegrates with Claude Code for contextual Azure DevOps operations.

Tags

Azure DevOpsMCPDirectory-based authenticationPATWork itemsRepositoriesBuildsPipelinesMulti-projectClaude CodeLocal configuration