Azure DevOps 交互服务器

一个基于模型上下文协议(MCP)的服务器,使AI助手能够与Azure DevOps服务交互,提供自然语言与Azure DevOps REST API之间的桥梁。

  • by aadityasinghal7
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 aadityasinghal7/mcp

使用说明

MCP Azure DevOps服务器

模型上下文协议(MCP)服务器,使AI助手能够与Azure DevOps服务进行交互。

概述

该项目实现了一个模型上下文协议(MCP)服务器,该服务器允许人工智能助手(如Claude)与Azure DevOps交互,为自然语言交互和Azure DevOpsREST API之间提供了一座桥梁。

特性

目前实施:

工作项管理

  • 查询工作项:使用WIQL查询搜索工作项
  • 获取工作项详细信息:查看完整的工作项信息
  • 创建工作项:添加新任务、bug、用户故事和其他工作项类型
  • 更新工作项:修改现有工作项的字段和属性
  • 添加注释:对工作项发表评论
  • 查看评论:检索工作项的评论历史记录
  • 亲子关系:在工作项之间建立层次结构

项目管理

  • 获取项目:查看组织中所有可访问的项目
  • 组建团队:列出组织内的所有团队
  • 团队成员:查看团队成员信息
  • 团队区域路径:检索分配给团队的区域路径
  • 团队迭代:访问团队迭代/冲刺配置

计划功能:

  • 管道作业:查询管道状态并触发新的管道运行
  • 拉取请求处理:创建、更新和查看拉取请求
  • Sprint管理:计划和管理冲刺和迭代
  • 分行政策管理:配置和管理分支策略

入门指南

先决条件

  • Python 3.10+
  • 具有适当权限的Azure DevOps帐户
  • 具有Azure DevOps API访问所需作用域的个人访问令牌(PAT)

安装

# Clone the repository
git clone https://github.com/Vortiago/mcp-azure-devops.git
cd mcp-azure-devops

# Install in development mode
uv pip install -e ".[dev]"

# Install from PyPi
pip install mcp-azure-devops

配置

创建一个 .env 项目根目录中的文件,包含以下变量:

AZURE_DEVOPS_PAT=your_personal_access_token
AZURE_DEVOPS_ORGANIZATION_URL=https://your-organization.visualstudio.com or https://dev.azure.com/your-organisation

注意:请确保提供Azure DevOps组织的完整URL。

运行服务器

# Development mode with the MCP Inspector
mcp dev src/mcp_azure_devops/server.py

# Install in Claude Desktop
mcp install src/mcp_azure_devops/server.py --name "Azure DevOps Assistant"

使用示例

查询工作项

Show me all active bugs assigned to me in the current sprint

创建工作项

Create a user story in the ProjectX with the title "Implement user authentication" and assign it to john.doe@example.com

更新工作项

Change the status of bug #1234 to "Resolved" and add a comment explaining the fix

团队管理

Show me all the team members in the "Core Development" team in the "ProjectX" project

查看项目结构

List all projects in my organization and show me the iterations for the Development team

发展

该项目分为功能模块,每个模块都实现了特定的Azure DevOps功能:

  • features/work_items:工作项管理功能
  • features/projects:项目管理能力
  • features/teams:团队管理功能
  • utils:通用实用程序和客户端初始化

有关开发的更多信息,请参阅 CLAUDE.md 文件。

贡献

欢迎投稿!请随时提交拉取请求。

许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

致谢