Azure DevOps Multi-Organization MCP Server
Enables interaction with multiple Azure DevOps organizations simultaneously, providing access to pipelines, builds, repositories, and pull requests across different organizations without switching contexts or restarting the server.
README
Azure DevOps Multi-Organization MCP Server
This is a specialized Model Context Protocol (MCP) server for Azure DevOps, designed to overcome the limitations of single-organization bindings found in standard implementations.
🚀 Value Proposition & Comparison
The primary value of this implementation is Multi-Organization Support and Context Optimization.
| Feature | Standard / Official AzDO MCP | This Implementation | User Value |
|---|---|---|---|
| Scope | Single Organization (bound via AZURE_DEVOPS_ORG env var) |
Multi-Organization (Dynamic Routing) | Seamlessly work across org-1, org-2, and other orgs in a single chat session without restarting the server. |
| Authentication | Single PAT in .env |
Multiple PATs in config.json |
Securely manages distinct credentials for different organizations. |
| Context Usage | Returns raw, verbose API responses | LLM-Optimized Responses | Aggressively flattens and simplifies JSON output (e.g., removing huge log objects from list views) to prevent "Maximum Length" errors in Claude. |
| Tool Signature | (project, ...args) |
(organization, project, ...args) |
Explicit control over the target organization for every action. |
🛠 Architecture
1. The Connection Manager Pattern
Instead of initializing a single connection at startup, this server uses a ConnectionManager class.
- Lazy Loading: Connections to Azure DevOps are established only when a tool is requested.
- Caching: Authenticated connections are cached to ensure performance for subsequent requests.
- Routing: Every tool schema includes an
organizationargument. The manager uses this to look up the corresponding Personal Access Token (PAT) fromconfig.json.
2. Modular Tool Structure
Tools are organized into separate modules for maintainability:
tools/organizations.ts: Organization and project discovery toolstools/pipelines.ts: CI/CD pipeline operations (builds, definitions, runs, logs)tools/repositories.ts: Git repository and pull request managementtools/common.ts: Shared utilities for enum handling and type conversionstools/index.ts: Central registration orchestrator
3. Context Window Optimization
Standard Azure DevOps API responses are extremely verbose, often containing full orchestration plans, logs, and deep nesting. This implementation intercepts these responses in tools like pipelines_get_builds and pipelines_get_build_definitions to:
- Limit Results: Defaults to top 20/50 items instead of hundreds.
- Flatten Objects: Maps complex objects to simple key-value pairs (e.g.,
{ requestedFor: { displayName: "User" } }becomes just the display name). - Strip Noise: Removes unused URLs, large configuration blobs, and system metadata.
4. Dual Transport Support
- Stdio Transport: For local usage with Claude Desktop and VS Code (default)
- SSE Transport: For cloud deployment with HTTP endpoints (activated via
PORTenv var)
📦 Configuration
1. Prerequisites
- Node.js (v18 or higher)
- Azure DevOps Personal Access Tokens (PAT) with appropriate permissions:
- Code (Read): For repository and pull request operations
- Build (Read & Execute): For pipeline and build operations
- Project and Team (Read): For organization and project listing
2. Setup config.json
Create a config.json file in the root directory. This file maps your Organization names (as they appear in the URL, e.g., dev.azure.com/{org}) to their PATs.
{
"org-1": "your-pat-token-here",
"org-2": "another-pat-token-here"
}
3. Build & Run
npm install
npm run build
4. Claude Desktop Configuration (Local - Stdio)
Add the server to your claude_desktop_config.json for local usage:
{
"mcpServers": {
"azure-devops-multi": {
"command": "node",
"args": [
"/absolute/path/to/mcp-server-azure-devops-multi/dist/index.js"
]
}
}
}
5. VS Code Configuration (Local - Stdio)
Add the server to your VS Code settings for use with GitHub Copilot Chat:
- Open VS Code Settings (JSON)
- Add to
github.copilot.chat.mcp.servers:
{
"github.copilot.chat.mcp.servers": {
"Azure DevOps Multi": {
"command": "node",
"args": [
"/absolute/path/to/mcp-server-azure-devops-multi/dist/index.js"
]
}
}
}
6. Cloud Deployment (HTTP/SSE)
The server supports SSE (Server-Sent Events) transport for cloud deployment:
Docker Build & Run
docker build -t azdo-mcp-server .
docker run -p 3000:3000 -v /path/to/config.json:/app/config.json azdo-mcp-server
Azure Container Apps
az containerapp create \
--name azdo-mcp-server \
--resource-group <your-rg> \
--environment <your-env> \
--image <your-acr>.azurecr.io/azdo-mcp-server:latest \
--target-port 3000 \
--ingress external \
--env-vars PORT=3000
The server automatically switches to SSE transport when PORT environment variable is set, exposing:
GET /sse- SSE connection endpointPOST /messages- Message handling endpoint
🧰 Available Tools (18 Total)
Organization & Projects (2 Tools)
list_organizations: View all configured organizations inconfig.json.list_projects: List all projects within a specific organization.
Pipelines & Builds (13 Tools)
pipelines_get_builds: List recent builds with filtering options (optimized for context).pipelines_get_build_definitions: List build definitions with query options (optimized for context).pipelines_get_build_status: Get detailed report for a specific build.pipelines_get_build_log: Retrieve logs for a specific build.pipelines_get_build_timeline: Get timeline entries for a build.pipelines_run_pipeline: Trigger a new pipeline run with parameters and variables.pipelines_get_run: Get details for a specific pipeline run.pipelines_list_runs: List pipeline runs with filtering options.pipelines_get_run_stage: Get information about a specific stage in a pipeline run.pipelines_get_run_log: Get log content for a specific pipeline run.pipelines_update_build_stage: Update a stage in a build (placeholder - not yet implemented).pipelines_get_definition: Get a specific build definition by ID.pipelines_get_definition_yaml: Get the YAML content of a pipeline definition.
Git Repositories & Pull Requests (5 Tools)
git_list_repositories: List all Git repositories in a project.git_get_repository: Get details for a specific repository.git_get_pull_requests: Search and list pull requests with filtering options.git_create_pull_request: Create a new pull request with title, description, and reviewers.git_get_item: Get file or folder content from a repository with version control options.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。