Thank you for your interest in contributing to the Azure DevOps MCP Server! We welcome contributions from the community and are grateful for your help in making this project better.
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/decriptor/AzureDevOps.MCP.git cd AzureDevOps.MCP - Create a topic branch for your contribution:
git checkout -b feature/your-feature-name
The easiest way to get started is using development containers:
VS Code + Dev Containers:
- Install VS Code and the Dev Containers extension
- Open the repository in VS Code
- Click "Reopen in Container" when prompted
- Everything is automatically configured!
GitHub Codespaces:
- Go to the repository on GitHub
- Click "Code" β "Codespaces" β "Create codespace on main"
- Start coding immediately in your browser
-
Setup Development Environment
# Manual setup (any platform) dotnet restore dotnet build dotnet test
-
Configure for Development
- Copy
.env.exampleto.env.development - Add your Azure DevOps organization URL and PAT
- Enable any write operations you want to test
- Copy
# Run all tests
dotnet test
# Run tests with detailed output
dotnet test --verbosity normal
# Run specific test category
dotnet test --filter Category=Unit
dotnet test --filter Category=Integration
# Test coverage is handled by CI/CD pipeline- Unit Tests: Test individual components in isolation
- Integration Tests: Test interactions between components
- Performance Tests: Validate performance characteristics
- Use MSTest framework with FluentAssertions
- Mock external dependencies using Moq
- Test both success and failure scenarios
- Include performance-critical path testing
src/AzureDevOps.MCP/
βββ Configuration/ # Configuration models
βββ Services/ # Business logic and Azure DevOps integration
βββ Tools/ # MCP tool implementations
βββ Program.cs # Application entry point
tests/AzureDevOps.MCP.Tests/
βββ Services/ # Service layer tests
βββ Tools/ # Tool layer tests
-
Services Layer
IAzureDevOpsService: Core Azure DevOps operationsCachedAzureDevOpsService: Performance-optimized wrapperICacheService: Caching abstractionIPerformanceService: Performance trackingIAuditService: Write operation auditing
-
Tools Layer
AzureDevOpsTools: Read-only MCP toolsSafeWriteTools: Opt-in write operationsBatchTools: Batch/parallel operationsPerformanceTools: Performance monitoring
-
Configuration
AzureDevOpsConfiguration: Main configuration modelSafeWriteOperations: Available write operations
- Use tabs for indentation (configured in .editorconfig)
- Follow C# naming conventions
- Use file-scoped namespaces
- Prefer explicit types over
varfor clarity - Add XML documentation for public APIs
When adding new write operations:
-
Add to Configuration
public const string NewOperation = "NewOperation";
-
Implement in Service
Task<T> NewOperationAsync(parameters...);
-
Add MCP Tool
[McpServerTool(Name = "new_operation", ReadOnly = false)] public async Task<object> NewOperationAsync(parameters..., bool confirm = false)
-
Include Safety Features
- Operation enablement check
- Confirmation requirement
- Audit logging
- Cache invalidation
- Error handling
-
Write Tests
- Test confirmation workflow
- Test operation disabled scenario
- Test success and failure cases
- Test audit logging
- Use caching for frequently accessed data
- Implement batch operations for multiple items
- Track performance metrics
- Invalidate cache appropriately after writes
- Opt-in by default: All write operations must be explicitly enabled
- Confirmation required: Show preview and require confirmation
- Audit everything: Log all write attempts with details
- Minimize scope: Only implement "safe" write operations
- Never log sensitive data (PATs, passwords)
- Hash tokens for audit trails
- Use secure defaults in configuration
- Validate all inputs
- Cache frequently accessed, slowly changing data
- Use appropriate expiration times
- Invalidate cache after write operations
- Monitor cache hit rates
- Implement parallel processing for multiple items
- Handle partial failures gracefully
- Provide detailed results with error handling
- Limit batch sizes to prevent timeouts
- Track operation durations
- Monitor API call success rates
- Identify slow operations
- Provide performance metrics via MCP tools
- Ensure tests pass:
dotnet test AzureDevOps.MCP.slnx --configuration Release - Update documentation if needed
- Add/update tests for your changes
- Push your branch to your fork
- Create a pull request against the
mainbranch - Fill out the PR template completely
- Ensure CI passes (all checks must be green)
- Address review feedback promptly
- β All tests pass
- β Code follows project standards
- β Documentation is updated
- β No merge conflicts
- β Security scan passes
Include:
- Clear reproduction steps
- Expected vs actual behavior
- Environment details (.NET version, OS)
- Configuration (anonymized)
- Relevant logs or error messages
Include:
- Use case description
- Proposed API design
- Security considerations
- Performance impact
- Breaking change assessment
- Update Version: Update version in
Directory.Build.props - Update Changelog: Document changes and breaking changes
- Test: Run full test suite including performance tests
- Documentation: Update README.md and API documentation
- Docker: Test Docker build and deployment
- Tag: Create git tag with version number
- Tests added for new functionality
- Performance impact considered
- Security implications reviewed
- Documentation updated
- Breaking changes documented
- Error handling implemented
- Audit logging added (for write operations)
- Cache invalidation handled
- Code follows style guidelines
- Start Small: Begin with documentation improvements or small bug fixes
- Ask Questions: Use GitHub issues for design discussions
- Test Thoroughly: Write tests that cover edge cases
- Think Performance: Consider the impact of changes on responsiveness
- Document: Update documentation for any API changes
For security vulnerabilities, please see our Security Policy. Do not report security issues through public GitHub issues.
By contributing to this project, you agree that your contributions will be licensed under the MIT License.
Contributors are recognized in:
- Release notes
- GitHub contributor graphs
- Special thanks in documentation
Thank you for contributing to Azure DevOps MCP Server! π