MCP Azure DevOps Server
一个模型上下文协议服务器,使 AI 助手能够与 Azure DevOps 服务交互,允许用户查询工作项,并计划支持创建/更新项、管理管道、处理拉取请求以及管理冲刺和分支策略。
Tools
query_work_items
Query work items using WIQL. Args: query: The WIQL query string top: Maximum number of results to return (default: 30) Returns: Formatted string containing work item details
get_work_item_basic
Get basic information about a work item. Args: id: The work item ID Returns: Formatted string containing basic work item information
get_work_item_details
Get detailed information about a work item. Args: id: The work item ID Returns: Formatted string containing comprehensive work item information
get_work_item_comments
Get all comments for a work item. Args: id: The work item ID project: Optional project name. If not provided, will be determined from the work item. Returns: Formatted string containing all comments on the work item
get_projects
Get all projects in the organization that the authenticated user has access to. Args: state_filter: Filter on team projects in a specific state (e.g., "WellFormed", "Deleting") top: Maximum number of projects to return Returns: Formatted string containing project information
get_all_teams
Get a list of all teams in the organization. Args: user_is_member_of: If true, return only teams where the current user is a member. Otherwise return all teams the user has read access to. top: Maximum number of teams to return skip: Number of teams to skip Returns: Formatted string containing team information
get_team_members
Get a list of members for a specific team. Args: project_id: The name or ID (GUID) of the team project the team belongs to team_id: The name or ID (GUID) of the team top: Maximum number of members to return skip: Number of members to skip Returns: Formatted string containing team members information
get_team_area_paths
Get the area paths assigned to a team. Args: project_name_or_id: The name or ID of the team project team_name_or_id: The name or ID of the team Returns: Formatted string containing team area path information
get_team_iterations
Get the iterations assigned to a team. Args: project_name_or_id: The name or ID of the team project team_name_or_id: The name or ID of the team current: If True, return only the current iteration Returns: Formatted string containing team iteration information
README
MCP Azure DevOps Server
一个模型上下文协议 (MCP) 服务器,使 AI 助手能够与 Azure DevOps 服务交互。
概述
本项目实现了一个模型上下文协议 (MCP) 服务器,允许 AI 助手(如 Claude)与 Azure DevOps 交互,从而在自然语言交互和 Azure DevOps REST API 之间架起桥梁。
功能
当前已实现:
工作项管理
- 查询工作项: 使用 WIQL 查询搜索工作项
- 获取工作项详情: 查看完整的工作项信息
- 创建工作项: 添加新的任务、缺陷、用户故事和其他工作项类型
- 更新工作项: 修改现有工作项的字段和属性
- 添加评论: 在工作项上发布评论
- 查看评论: 检索工作项的评论历史记录
- 父子关系: 建立工作项之间的层级关系
项目管理
- 获取项目: 查看组织中所有可访问的项目
- 获取团队: 列出组织内的所有团队
- 团队成员: 查看团队成员信息
- 团队区域路径: 检索分配给团队的区域路径
- 团队迭代: 访问团队迭代/冲刺配置
计划中的功能:
- 管道操作: 查询管道状态并触发新的管道运行
- 拉取请求处理: 创建、更新和审查拉取请求
- 冲刺管理: 计划和管理冲刺和迭代
- 分支策略管理: 配置和管理分支策略
入门指南
前提条件
- Python 3.10+
- 具有适当权限的 Azure DevOps 帐户
- 具有 Azure DevOps API 访问所需范围的个人访问令牌 (PAT)
安装
# 克隆仓库
git clone https://github.com/Vortiago/mcp-azure-devops.git
cd mcp-azure-devops
# 以开发模式安装
uv pip install -e ".[dev]"
# 从 PyPi 安装
pip install mcp-azure-devops
配置
在项目根目录中创建一个 .env 文件,其中包含以下变量:
AZURE_DEVOPS_PAT=your_personal_access_token
AZURE_DEVOPS_ORGANIZATION_URL=https://your-organization.visualstudio.com 或 https://dev.azure.com/your-organisation
注意:请确保提供 Azure DevOps 组织的完整 URL。
运行服务器
# 使用 MCP Inspector 的开发模式
mcp dev src/mcp_azure_devops/server.py
# 在 Claude Desktop 中安装
mcp install src/mcp_azure_devops/server.py --name "Azure DevOps Assistant"
使用示例
查询工作项
显示当前冲刺中分配给我的所有活动缺陷
创建工作项
在 ProjectX 中创建一个标题为“Implement user authentication”的用户故事,并将其分配给 john.doe@example.com
更新工作项
将缺陷 #1234 的状态更改为“已解决”,并添加一条评论解释修复
团队管理
显示“ProjectX”项目中“Core Development”团队中的所有团队成员
查看项目结构
列出我组织中的所有项目,并显示 Development 团队的迭代
开发
该项目被组织成功能模块,每个模块实现特定的 Azure DevOps 功能:
features/work_items: 工作项管理功能features/projects: 项目管理功能features/teams: 团队管理功能utils: 通用实用程序和客户端初始化
有关开发的更多信息,请参见 CLAUDE.md 文件。
贡献
欢迎贡献!请随时提交拉取请求。
许可证
本项目根据 MIT 许可证授权 - 有关详细信息,请参见 LICENSE 文件。
致谢
- 使用 MCP Python SDK 构建
- 使用 Azure DevOps Python API
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。