A production-ready Model Context Protocol (MCP) server providing comprehensive Azure DevOps API integration with enterprise-grade architecture.
- Complete Azure DevOps API Coverage: Projects, work items, builds, repositories, pull requests, test plans, and artifacts
- Eagle Scripting Integration: Execute Eagle/Tcl scripts with security sandboxing and interpreter pooling
- Email Integration: Send templated emails via AWS SES with Razor template engine
- Multi-Protocol Support: SSE (Server-Sent Events), Standard I/O, and HTTP streaming
- Enterprise Security: PAT, OAuth 2.0, and Azure AD authentication
- Real-time Updates: Webhook support for live status updates
- Clean Architecture: Domain-driven design with CQRS pattern
- Production Ready: Docker, Kubernetes, monitoring, and comprehensive testing
DevOpsMcp/
├── src/
│ ├── DevOpsMcp.Domain/ # Domain entities, value objects, interfaces
│ ├── DevOpsMcp.Application/ # Use cases, commands, queries, handlers
│ ├── DevOpsMcp.Infrastructure/ # Azure DevOps API clients, persistence
│ ├── DevOpsMcp.Server/ # MCP server implementation, protocols
│ └── DevOpsMcp.Contracts/ # DTOs, API contracts, external interfaces
└── tests/ # Comprehensive test suite
- .NET 8.0 SDK
- Azure DevOps account with Personal Access Token
- AWS account with SES access (for email features)
- Docker (optional)
- Kubernetes cluster (optional)
- Clone the repository:
git clone https://github.com/devops-mcp/devops-mcp.git
cd devops-mcp
- Configure settings:
cp src/DevOpsMcp.Server/appsettings.json src/DevOpsMcp.Server/appsettings.Development.json
# Edit appsettings.Development.json with your Azure DevOps credentials
- Run the server:
dotnet run --project src/DevOpsMcp.Server
docker build -t devops-mcp .
docker run -e AzureDevOps__PersonalAccessToken=YOUR_PAT \
-e AzureDevOps__OrganizationUrl=https://dev.azure.com/YOUR_ORG \
-e [email protected] \
-e AWS_ACCESS_KEY_ID=YOUR_AWS_KEY \
-e AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET \
-e AWS_REGION=us-east-2 \
-p 8080:8080 devops-mcp
- Copy the example environment file:
cp .env.example .env
- Edit
.env
with your Azure DevOps and AWS credentials:
# Azure DevOps Configuration
AZURE_DEVOPS_ORG_URL=https://dev.azure.com/your-organization
AZURE_DEVOPS_PAT=your-personal-access-token-here
# AWS Configuration (for email)
AWS_ACCESS_KEY_ID=your-aws-access-key
AWS_SECRET_ACCESS_KEY=your-aws-secret-key
AWS_REGION=us-east-2
# Email Configuration
[email protected]
AWS__SES__FromName=DevOps MCP
AWS__SES__Region=us-east-2
- Start the services:
docker-compose up -d
- AWS account with SES access
- Verified email addresses in SES (for sandbox mode)
- AWS access keys with SES permissions
-
Verify Email Addresses:
- Go to AWS Console → Simple Email Service
- Select your region (e.g., US East Ohio for us-east-2)
- Navigate to "Verified identities"
- Add and verify your sender email address
- In sandbox mode, also verify recipient addresses
-
Create IAM User:
- Create an IAM user with
AmazonSESFullAccess
policy - Generate access keys for programmatic access
- Create an IAM user with
-
Configure Environment:
AWS_ACCESS_KEY_ID=your-access-key AWS_SECRET_ACCESS_KEY=your-secret-key [email protected] AWS__SES__Region=us-east-2
-
Request Production Access (optional):
- For sending to unverified addresses
- Go to SES Console → Account dashboard
- Request production access
Templates are stored in EmailTemplates/
directory using Razor syntax:
@model dynamic
@{
ViewBag.Subject = "Welcome to DevOps MCP!";
}
<!DOCTYPE html>
<html>
<body>
<h1>Hello @Model.Name!</h1>
<p>Welcome to our service.</p>
</body>
</html>
- Navigate to https://dev.azure.com/{your-organization}/_usersSettings/tokens
- Click "New Token"
- Configure the token:
- Name: DevOps MCP Server
- Expiration: Set as needed (recommend 90 days)
- Scopes: Select the following:
- Work Items (Read & Write)
- Code (Read)
- Build (Read)
- Release (Read)
- Project and Team (Read)
- Click "Create" and copy the token immediately
The server accepts environment variables in two formats:
For Docker/Docker Compose (.env file):
AZURE_DEVOPS_ORG_URL=https://dev.azure.com/your-organization
AZURE_DEVOPS_PAT=your-pat-token
For ASP.NET Core (appsettings.json or environment):
AzureDevOps__OrganizationUrl=https://dev.azure.com/your-organization
AzureDevOps__PersonalAccessToken=your-pat-token
Use the included test script to verify your authentication:
./test-auth.sh
Or access the diagnostics endpoint:
curl http://localhost:8080/debug/auth | jq
Variable | Description | Default |
---|---|---|
MCP__Protocol |
Protocol mode: stdio , sse , http |
stdio |
AzureDevOps__OrganizationUrl |
Your Azure DevOps organization URL | Required |
AzureDevOps__PersonalAccessToken |
Personal Access Token | Required |
AzureDevOps__AuthMethod |
Authentication method | PersonalAccessToken |
AzureDevOps__EnableCaching |
Enable response caching | true |
Eagle__MaxConcurrentExecutions |
Max concurrent Eagle script executions | 10 |
Eagle__MinPoolSize |
Minimum Eagle interpreter pool size | 2 |
Eagle__MaxPoolSize |
Maximum Eagle interpreter pool size | 10 |
Eagle__SecurityPolicy__DefaultLevel |
Default security level for scripts | Standard |
AWS__SES__FromAddress |
Verified sender email address | Required for email |
AWS__SES__FromName |
Display name for emails | DevOps MCP |
AWS__SES__Region |
AWS region for SES | us-east-2 |
AWS__SES__ConfigurationSet |
SES configuration set name | Optional |
Email__TemplatesPath |
Path to email templates | EmailTemplates |
-
Personal Access Token (PAT)
- Create a PAT in Azure DevOps with appropriate scopes
- Set
AzureDevOps__PersonalAccessToken
environment variable
-
Azure AD
- Register an app in Azure AD
- Configure client ID, secret, and tenant ID
- Set
AzureDevOps__AuthMethod
toAzureAD
list_projects
- Get all accessible projectsget_project_details
- Detailed project informationcreate_project
- Create new projectupdate_project_settings
- Modify project configuration
create_work_item
- Create new work itemsupdate_work_item
- Modify existing work itemsget_work_item
- Retrieve work item detailsquery_work_items
- WIQL query supportlink_work_items
- Manage relationshipsadd_work_item_comment
- Add comments
trigger_build
- Start new buildsget_build_status
- Real-time build monitoringget_build_logs
- Retrieve build logscreate_release
- Deploy to environmentsapprove_release
- Approval workflowget_deployment_status
- Track deployments
list_repositories
- Get all repositoriescreate_pull_request
- Create PRs with work item linkingreview_pull_request
- Add comments and approvemerge_pull_request
- Complete PR with policiesget_commit_history
- Repository change tracking
execute_eagle_script
- Execute Eagle/Tcl scripts in a secure sandbox- Phase 1 (Complete): Rich context injection, structured output, security sandboxing, session persistence
- Configurable security levels (Minimal, Standard, Elevated, Maximum)
- Interpreter pooling for performance
- Variable injection support
- Execution metrics and timeout enforcement
- MCP context commands (mcp::context, mcp::session, mcp::call_tool)
- Structured output formats (JSON, XML, YAML, Table, CSV, Markdown)
- See Eagle Transformation Blueprint for the revolutionary roadmap
send_email
- Send templated emails via AWS SES- Razor template engine for rich HTML emails
- Automatic CSS inlining for email clients
- Plain text version generation
- Resilience patterns (retry, circuit breaker)
preview_email
- Preview email templates without sending- Test template rendering with sample data
- View both HTML and text versions
- Template validation
dotnet build
dotnet test
dotnet publish -c Release
# Unit tests
dotnet test tests/DevOpsMcp.Domain.Tests
dotnet test tests/DevOpsMcp.Application.Tests
# Integration tests
dotnet test tests/DevOpsMcp.Integration.Tests
# All tests with coverage
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
# Run code analysis
dotnet format --verify-no-changes
# Security scanning
dotnet list package --vulnerable
# Apply base configuration
kubectl apply -k k8s/base
# Apply production overlay
kubectl apply -k k8s/overlays/prod
# Check deployment status
kubectl -n devops-mcp get pods
# Deploy to Azure Container Apps
az containerapp create \
--name devops-mcp \
--resource-group rg-devops-mcp \
--environment devops-mcp-env \
--image devops-mcp:latest \
--target-port 8080 \
--ingress 'external' \
--min-replicas 1 \
--max-replicas 10
- Liveness:
GET /health
- Readiness:
GET /health/ready
- Prometheus endpoint:
GET /metrics
- Application Insights integration
- Custom metrics for Azure DevOps operations
- Structured logging with Serilog
- Log levels: Debug, Information, Warning, Error
- Correlation IDs for request tracking
- Input Validation: All inputs sanitized and validated
- Authentication: Multiple auth methods supported
- Authorization: Per-operation permission checks
- Secrets Management: Azure Key Vault integration
- Rate Limiting: Configurable per-user limits
- Audit Logging: All operations tracked
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT License - see LICENSE for details
- GitHub Issues: github.com/devops-mcp/devops-mcp/issues
- Documentation: docs.devops-mcp.io
- Discord: discord.gg/devops-mcp