A custom Model Context Protocol (MCP) server built with NestJS, enabling AI agents (like Claude Desktop) to securely query Azure DevOps data such as work items, projects, and ticket statistics.
This project exposes Azure DevOps data through a standards-based MCP server, allowing any MCP-compatible AI agent to perform real-time queries such as:
- π List all projects in the organization
- π Get count of created / active / closed work items
- π§© Fetch ticket details
- π Query backlog items or sprints
- ποΈ Extend Azure DevOps automation through AI
It supports two modes:
Tested locally using the MCP Inspector (not using a direct Claude Desktop STDIO client).
Allows remote access using MCP-over-HTTP.
NestJS Application
β
βββ MCP Module
β βββ Tool Definitions
β βββ STDIO Transport
β βββ HTTP Transport
β
βββ Azure DevOps Service
β βββ Work Item API
β βββ Project API
β
βββ Utilities
βββ MCP Message Handlers
βββ Logger
Tools exposed to MCP clients:
| Tool Name | Description |
|---|---|
list_projects |
Returns all Azure DevOps projects |
count_tickets |
Returns summary of created/active/resolved tickets |
get_workitem |
Fetch details of a single work item |
search_workitems |
Query work items based on filters |
This project was tested locally using the MCP Inspector, which acts as an MCP client that connects over STDIO to your server.
Run the server so the inspector can connect over STDIO:
node dist/main.jsStart the inspector with:
npx @modelcontextprotocol/inspectorWhen prompted in the inspector, choose the STDIO connection and point it at the running process (the inspector will spawn or attach to the process as configured).
Start server:
npm run start:prodYou can POST MCP-style requests:
POST http://localhost:3000/mcpgit clone https://github.com/saktheeswar/Azure_Devops_MCP_Server.git
cd azure-devops-mcp
npm install
npm run buildCreate .env:
BASE_URL=url
AUSER_NAME=your-personal-access-token
ADO_PAT=your-default-project
node dist/main.jsnpm run start:prod(You will explain this with screenshots in your blog.)
npx @modelcontextprotocol/inspectorThen connect using STDIO:
node dist/main.js
const server = new Server({
name: "azure-devops-mcp",
version: "1.0.0",
tools: {
list_projects: { ... },
count_tickets: { ... }
}
});async getProjects() {
const url = `${this.baseUrl}/projects?api-version=7.0`;
return this.http.get(url, this.headers);
}bootstrapStdio(server);@Post('/mcp')
handleMcp(@Body() body) {
return this.mcpHttpService.process(body);
}{
"method": "tools/list_projects",
"params": {}
}Response:
{
"projects": [
{ "name": "Frontend" },
{ "name": "Backend" },
{ "name": "Infrastructure" }
]
}- Query Azure DevOps without opening the UI
- Get ticket summaries instantly
- Automate repetitive DevOps activities
- Smart sprint planning
- Ticket prioritization
- Automated status reporting
- Faster decision making
- AI-powered insights
- Create/Update work items using AI
- Integration with Release Pipelines
- Sprint burndown insights
- PR and Repository analytics
- Claude Desktop working
- MCP Inspector connected
- Tool response logs
π GitHub Repository: (https://github.com/saktheeswar/Azure_Devops_MCP_Server)