KM

kud/mcp-jenkins

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

19 stars 12 forks 质量 80 趋势 42MIT

从克洛德驱动Jenkins——触发器建造,监视管道,管理CI/CD工作与节点

概览

- 覆盖 Jenkins API 的 ~ 95%: 工作、 构建、 节点、 视图、 队列、 插件和系统操作 - 支持经典 API 令牌和现代无记名令牌认证 - 连接到几个 Jenkins 服务器,同时使用逗号分隔的 env vars 连接 - 逐个阶段的管道状态, 控制台日志, 测试结果, 以及建立手工艺品 - - - - - 列表代理, 切换节点在线/下线, 检查系统信息而不离开您的 AI 客户端 - - - 直接通过 npx-yes@kud/mcp-jenkins@latt 运行,不需要本地设置 或者不通过npx安装而使用(见下文使用法). 将服务器添加到您的 MCP 客户端配置 。 建议的方法使用环境变量: 对于无记名符号认证,将嵌入块替换为: 服务器提出的每一项请求都有一个期限, 默认为 。 大型或繁忙的詹金斯可以花更长的时间接一个电话.

概述(AI 翻译)

** Jenkins MCP服务器,无记名证书认证支持**

网站 文献

□ 特性

  • ** 38个工具** — 覆盖 Jenkins API 的~95%:任务、构建、节点、视图、队列、插件和系统操作
  • Bearer sorders auth — 既支持经典API sident,也支持现代无记名sident认证
  • ** 多种实例** — 使用逗号分隔的env vars同时连接几个Jenkins服务器
  • ** 提高对管道的认识**——逐级检索管道状况、控制台记录、测试结果和建造手工艺品
  • 节点管理——列表代理,切换上线/下线节点,检查系统信息而不离开你的AI客户端
  • 零安装使用——直接通过npx --yes @kud/mcp-jenkins@latest运行,不需要本地设置

□ 安装

或不通过npx安装而使用(见下文使用)。

□ 使用量

将服务器添加到您的 MCP 客户端配置 。 建议的方法使用环境变量:

对于无记名符号认证,将嵌入块替换为:

缓慢实例

服务器提出的每一项请求都以一个最后期限为界,30秒 默认. 大型或繁忙的詹金斯可以花更长的时间接一个电话.

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Features

  • 38 tools — covers ~95% of the Jenkins API: jobs, builds, nodes, views, queue, plugins, and system operations
  • Bearer token auth — supports both classic API token and modern bearer token authentication
  • Multiple instances — connect to several Jenkins servers simultaneously using comma-separated env vars
  • Pipeline awareness — retrieve stage-by-stage pipeline status, console logs, test results, and build artefacts
  • Node management — list agents, toggle nodes online/offline, and inspect system info without leaving your AI client
  • Zero-install usage — run directly via npx --yes @kud/mcp-jenkins@latest with no local setup required

Install

npm install -g @kud/mcp-jenkins

Or use without installing via npx (see Usage below).

Usage

Add the server to your MCP client config. The recommended approach uses environment variables:

{
  "mcpServers": {
    "jenkins": {
      "command": "npx",
      "args": ["--yes", "@kud/mcp-jenkins@latest"],
      "env": {
        "MCP_JENKINS_URL": "https://pipeline.yourcompany.com",
        "MCP_JENKINS_USER": "your_username",
        "MCP_JENKINS_API_TOKEN": "your_api_token"
      }
    }
  }
}

For bearer token authentication, replace the env block with:

"env": {
  "MCP_JENKINS_URL": "https://pipeline.yourcompany.com",
  "MCP_JENKINS_BEARER_TOKEN": "your_bearer_token"
}

Slow instances

Every request this server makes is bounded by one deadline, 30 seconds by default. A large or busy Jenkins can spend even longer answering a single call. When that happens, the error you see (Jenkins request timed out) comes from this server giving up, not from Jenkins refusing anything.

Raise it with MCP_JENKINS_TIMEOUT_MS:

"env": {
  "MCP_JENKINS_URL": "https://pipeline.yourcompany.com",
  "MCP_JENKINS_BEARER_TOKEN": "your_bearer_token",
  "MCP_JENKINS_TIMEOUT_MS": "60000"
}

Or on the command line:

mcp-jenkins --url https://pipeline.yourcompany.com --bearer-token abc123 --timeout-ms 60000

One value applies to every configured instance. To find out what your instance actually needs, time the call the server makes:

time curl -u user:token 'https://pipeline.yourcompany.com/job/my-job/api/json'

Environment variables

在 GitHub 查看完整 README

安装

npx --yes @kud/mcp-jenkins@latest
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "jenkins": { "command": "npx", "args": ["--yes", "@kud/mcp-jenkins@latest"], "env": { "MCP_JENKINS_URL": "https://pipeline.yourcompany.com", "MCP_JENKINS_USER": "your_username", "MCP_JENKINS_API_TOKEN": "your_api_token" } } } }