AA

aaronsb/ado-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

17 stars 8 forks 质量 57 趋势 21MIT

Azure DevOps MCP Server

概览

This MCP (Model Context Protocol) server provides tools for interacting with Azure DevOps services through AI assistants. The server follows an entity-based architecture that groups operations by resource type rather than exposing many atomic tools. This approach provides several benefits: 1. : Tools are organized by the entities they operate on (projects, repositories, work items, etc.) 2. : Instead of dozens of individual tools, we have a handful of entity tools with multiple operations 3. : All entity tools follow the same pattern for operations and parameters 4. : Each entity tool can handle errors specific to its domain 5. : Users can easily discover available operations for each entity - : Each tool represents a major Azure DevOps entity (projects, repositories, work items, etc.) and provides multiple operations (list, get, create, etc.

README

以下为原文 README 节选,完整内容请查看原文。

Azure DevOps MCP Server

This MCP (Model Context Protocol) server provides tools for interacting with Azure DevOps services through AI assistants.

Architecture

The server follows an entity-based architecture that groups operations by resource type rather than exposing many atomic tools. This approach provides several benefits:

  1. Intuitive organization: Tools are organized by the entities they operate on (projects, repositories, work items, etc.)
  2. Reduced tool count: Instead of dozens of individual tools, we have a handful of entity tools with multiple operations
  3. Consistent interface: All entity tools follow the same pattern for operations and parameters
  4. Better error handling: Each entity tool can handle errors specific to its domain
  5. Easier discovery: Users can easily discover available operations for each entity

Architecture Diagram

flowchart TB
    Client[AI Assistant] -->|MCP Request| Server[MCP Server]
    Server -->|MCP Response| Client
    
    subgraph "Azure DevOps MCP Server"
        Server --> RequestHandler[Request Handler]
        RequestHandler --> ToolRegistry[Tool Registry]
        ToolRegistry --> EntityTools[Entity Tools]
        EntityTools --> ApiClient[API Client]
        ApiClient --> ErrorUtils[Error Utilities]
        ApiClient --> PaginationUtils[Pagination Utilities]
        ApiClient -->|HTTP Request| AzureDevOps[Azure DevOps API]
        AzureDevOps -->|HTTP Response| ApiClient
        ConfigManager[Configuration Manager] --> ApiClient
    end
    
    classDef primary fill:#4285F4,stroke:#0D47A1,color:white
    classDef secondary fill:#34A853,stroke:#0D652D,color:white
    classDef utility fill:#FBBC05,stroke:#866A00,color:white
    classDef external fill:#EA4335,stroke:#980905,color:white
    
    class Server,RequestHandler primary
    class ToolRegistry,EntityTools,ApiClient secondary
    class ErrorUtils,PaginationUtils,ConfigManager utility
    class Client,AzureDevOps external

Component Structure

classDiagram
    class EntityTool {
        +name: string
        +description: string
        +operations: Record~string, Function~
        +schemas: Record~string, ZodSchema~
        +getDefinition(): ToolDefinition
        +execute(args: unknown): Promise~any~
        #registerOperation(operation, handler, schema, description)
    }
    
    class ADOApiClient {
        +config: ADOApiConfig
        +connection: WebApi
        +getCoreApi()
        +getWorkItemTrackingApi()
        +getGitApi()
        +getPipelineApi()
        +handleError(error, context)
    }
    
    class ToolRegistry {
        +registerTool(tool: Tool)
        +getTool(name: string): Tool
        +getToolDefinitions(): ToolDefinition[]
    }
    
    class ErrorUtils {
        +createError(code, message, context)
        +handleApiError(error, source, operation)
在 GitHub 查看完整 README

安装

docker run -i --rm -e ADO_ORGANIZATION=your-org -e ADO_PAT=your-pat azure-devops-mcp:local
新手?先看 mcpskill.org 教程 →