Azure DevOps MCP Server

Below is a comprehensive project plan for building an Azure DevOps MCP (Model Context Protocol) server. This plan outlines the features, tasks, and key considerations to ensure the successful development and deployment of a server that integrates with Azure DevOps, supports a broad set of functionalities, and enables an AI-driven workflow from user story to pull request. --- ## Project Plan: Building an Azure DevOps MCP Server ### Objective Develop a reference server for the Model Context Protocol (MCP) that integrates with Azure DevOps. The server will mirror the functionality of the GitHub MCP server, tailored for Azure DevOps, using Typescript and the MCP SDK, and support an end-to-end AI-driven workflow from user story creation to pull request merging. ### Scope - **Functionalities**: Implement tools in six key areas: - Core Functionality (e.g., listing organizations, projects, repositories) - Repository Operations (e.g., creating/updating files, pushing changes) - Work Item Management (e.g., creating/updating work items) - Branch and Pull Request Management (e.g., managing branches and pull requests) - Pipeline Interactions (e.g., triggering and monitoring pipelines) - Search and Query (e.g., searching code, work items, wikis) - **Authentication**: Support Personal Access Tokens (PAT) and Azure Active Directory (AAD) tokens. - **Security**: Follow best practices for credential storage, permission scoping, error handling, and logging. - **Documentation**: Provide setup instructions, tool descriptions, usage examples, and troubleshooting guidance. ### Success Criteria - The server passes all unit and integration tests. - It supports the end-to-end use case (user story to pull request). - It is secure, performant, and adheres to best practices. - It is well-documented and easy to set up and use. --- ## Project Features and Tasks ### 1. Planning and Setup - **Tasks**: - Define project scope, requirements, and success criteria. - Set up Azure Boards for task tracking. - Create a Git repository for version control. - Configure a build pipeline for automated testing (CI/CD). - Set up the development environment (e.g., VS Code, Node.js, Typescript). - Install dependencies (e.g., MCP Typescript SDK, `azure-devops-node-api`). - Choose and apply an open-source license (e.g., MIT). - **Deliverables**: - Initialized Git repository with CI/CD pipeline. - Task tracking configured in Azure Boards. - Development environment ready with dependencies installed. ### 2. Research and Design - **Tasks**: - Finalize the list of tools to implement, including inputs and outputs. - Design the server architecture (e.g., tool organization, API integration). - Plan authentication implementation (PAT and AAD). - **Deliverables**: - Comprehensive tool list. - Server architecture diagram. - Authentication design document. ### 3. Development The development focuses on implementing the tools, organized by functional area. Each area includes implementation and unit testing. - **Core Functionality** - Tools: `list_organizations`, `list_projects`, `list_repositories`, etc. - Objective: Enable basic navigation within Azure DevOps. - **Work Item Management** - Tools: `create_work_item`, `update_work_item`, `list_work_items`, etc. - Objective: Support user story and task management. - **Repository Operations** - Tools: `create_or_update_file`, `push_changes`, `get_file_contents`, etc. - Objective: Allow code reading and writing. - **Branch and Pull Request Management** - Tools: `create_branch`, `create_pull_request`, `merge_pull_request`, etc. - Objective: Manage branches and pull requests. - **Pipeline Interactions** - Tools: `trigger_pipeline`, `get_pipeline_status`, `list_pipelines`, etc. - Objective: Integrate with CI/CD pipelines. - **Search and Query** - Tools: `search_code`, `search_work_items`, `search_wiki`, etc. - Objective: Enable search across Azure DevOps entities. - **Deliverables**: - Implemented tools with unit tests. - Updated tool documentation. ### 4. Integration and Testing - **Tasks**: - Integrate all tools into a cohesive server. - Conduct integration testing for the end-to-end use case. - Test authentication methods (PAT and AAD). - Perform security testing (e.g., credential handling, error scenarios). - **Deliverables**: - Fully integrated server. - Passing integration and security test suites. - Bug fixes and optimizations. ### 5. Documentation and Release - **Tasks**: - Write setup and usage documentation (e.g., README.md). - Create usage examples and tutorials (e.g., integration with MCP clients). - Develop a troubleshooting guide. - Release the server with installation instructions (e.g., GitHub releases or npm). - **Deliverables**: - Complete documentation suite. - Released server (version 0.1.0). --- ## Key Considerations ### Risks and Mitigation - **Risk**: Delays due to unfamiliarity with MCP or Azure DevOps APIs. - *Mitigation*: Allocate research time and provide team training. - **Risk**: Authentication complexities (e.g., AAD integration). - *Mitigation*: Prioritize PAT support, implement AAD as a secondary goal. - **Risk**: Security vulnerabilities. - *Mitigation*: Use secure credential storage, minimal permissions, and thorough testing. - **Risk**: Performance issues with large datasets. - *Mitigation*: Implement pagination and optimize API calls. ### Team and Resources - **Team**: 2-3 developers familiar with Typescript and REST APIs. - **Tools**: - Development: VS Code, Node.js, Typescript. - Libraries: MCP SDK, `azure-devops-node-api`. - Testing: Access to an Azure DevOps organization and project. - **Access**: Azure DevOps instance for development and testing. ### Version Control and CI/CD - **Git**: Host the repository on GitHub or Azure DevOps. - **CI/CD**: Use Azure DevOps Pipelines for automated builds and testing. ### Documentation - **Content**: - Installation and configuration instructions. - Authentication setup (PAT and AAD). - Tool list with descriptions and parameters. - Usage examples with MCP clients (e.g., Claude Desktop). - Troubleshooting tips. - **Format**: README.md in the repository, supplemented by examples folder. ### Release - **Versioning**: Use semantic versioning (start at 0.1.0). - **Distribution**: Publish via GitHub releases or npm. --- ## Milestones and Deliverables - **Planning and Setup**: Repository, CI/CD pipeline, and environment ready. - **Research and Design**: Tool list, architecture, and authentication plan finalized. - **Development**: Functional tools with unit tests. - **Integration and Testing**: Integrated server with passing tests. - **Documentation and Release**: Released server with full documentation. --- This project plan provides a clear, structured approach to building the Azure DevOps MCP server. By following these phases and addressing the outlined considerations, the team can deliver a secure, functional, and well-documented server.