
目前最先进的Jenkins MCP服务器——企业调试、多实例管理、AI驱动的故障分析、矢量搜索以及复杂CI/CD流水线的可配置诊断。
概览
Jenkins MCP 服务器,用于多实例路由、构建诊断和可选的矢量搜索。 一款为 Jenkins 设计的模型上下文协议(MCP)服务器,提供构建管理、日志检查、故障诊断和多实例配置。该仓库中维护的安装路径为源安装和 Docker/Compose。 - 同步或异步触发构建 - 在触发或检查作业前先查找 - 检查作业定义和源位置 - 检索日志并运行目标日志搜索工具 - 发现下游和子构建层级结构 - 检查特定构建的近期构建或窗口 - 通过可配置的建议诊断构建失败 - 根据jenkins_url将每个工具调用路由到正确的 Jenkins 实例 - 仅在启用矢量搜索时暴露semantic_search - 仅在启用服务器端作业编辑时暴露apply_job_edit - Python 3。
概述(AI 翻译)
Jenkins MCP 服务器,用于多实例路由、构建诊断和可选矢量搜索。
一款为 Jenkins 设计的模型上下文协议(MCP)服务器,提供构建管理、日志检查、故障诊断和多实例配置。该仓库中维护的安装路径为源安装和 Docker/Compose。
它的作用
- 触发器同步或异步构建
- 在触发或检查作业前找到它们
- 检查作业定义和源位置
- 检索日志并运行针对性的日志搜索工具
- 发现下游和子构建层级结构
- 检查近期构建或特定构建窗口
- 通过可配置的建议诊断构建失败
- 根据[[T0],将每个工具调用路由到正确的Jenkins实例
- 仅在启用向量搜索时暴露
semantic_search - 仅在启用服务器端作业编辑时暴露
apply_job_edit
快速启动
先决条件
- Python 3.10+
- Jenkins API 访问
- Jenkins 用户名和 API 令牌
- 如果你想要容器部署,可以使用 Docker 和 Docker Compose
- Qdrant 如果你想
semantic_search
从源码安装
理解两个配置层
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Jenkins MCP Server Enterprise
Jenkins MCP server for multi-instance routing, build diagnostics, and optional vector search.
A Model Context Protocol (MCP) server for Jenkins that provides build management, log inspection, failure diagnostics, and multi-instance configuration. The maintained setup paths in this repository are source install and Docker/Compose.
What It Does
- Trigger builds synchronously or asynchronously
- Find jobs before triggering or inspecting them
- Inspect job definitions and source locations
- Retrieve logs and run targeted log-search tools
- Discover downstream and sub-build hierarchies
- Inspect recent builds or a window around a specific build
- Diagnose build failures with configurable recommendations
- Route each tool call to the correct Jenkins instance based on
jenkins_url - Expose
semantic_searchonly when vector search is enabled - Expose
apply_job_editonly when server-side job editing is enabled
Quick Start
Prerequisites
- Python 3.10+
- Jenkins API access
- Jenkins username and API token
- Docker and Docker Compose if you want container deployment
- Qdrant if you want
semantic_search
Install from Source
git clone https://github.com/Jordan-Jarvis/jenkins-mcp-enterprise
cd jenkins-mcp-enterprise
python3 -m pip install -e .
Understand the Two Config Layers
The server uses two configuration layers:
- Primary server config:
config/mcp-config.yml - Diagnostic config: loaded from one of:
--diagnostic-config /path/to/file.ymlJENKINS_MCP_DIAGNOSTIC_CONFIG=/path/to/file.ymlconfig/diagnostic-parameters.yml- bundled defaults in
jenkins_mcp_enterprise/diagnostic_config/diagnostic-parameters.yml
You always need the primary server config. You only need a project-local diagnostic config file if you want to override the bundled diagnostic defaults.
Create the Primary Server Config
mkdir -p config
cp config/mcp-config.example.yml config/mcp-config.yml
Edit config/mcp-config.yml with your Jenkins URLs and credentials.
If you want the optional Jenkins-managed job edit workflow for non-SCM-backed jobs, also set:
settings:
enable_job_editing: true
job_edit_workspace_dir: "/tmp/mcp-jenkins/job-definitions"
Optional Project-Local Diagnostic Override
Create this only if you want to tune diagnose_build_failure:
cat > config/diagnostic-parameters.yml << 'ENDDIAG'
semantic_search:
min_diagnostic_score: 0.65
max_total_highlights: 4
recommendations:
max_recommendations: 5
ENDDIAG
If you want semantic search, start the local vector stack and set disable_vector_search: false with vector.host: "http://localhost:6333":
./scripts/start_dev_environment.sh
Docker and Compose
cp config/mcp-config.example.yml config/mcp-config.yml
./start-jenkins_mcp_enterprise.sh
See README-Docker.md for the container deployment flow.
Start the Server
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"jenkins": {
"command": "jenkins_mcp_enterprise",
"args": ["--config", "config/mcp-config.yml"]
}
}
}