Skip to main content
Glama

Jenkins Server MCP

by hekmon8

Jenkins 服务器 MCP

模型上下文协议 (MCP) 服务器提供与 Jenkins CI/CD 服务器交互的工具。该服务器使 AI 助手能够通过标准化接口检查构建状态、触发构建以及检索构建日志。

安装

  1. 克隆此存储库:
git clone https://github.com/yourusername/jenkins-server-mcp.git cd jenkins-server-mcp
  1. 安装依赖项:
npm install
  1. 构建项目:
npm run build

配置

服务器需要以下环境变量:

  • JENKINS_URL :你的 Jenkins 服务器的 URL(默认为“ http://sohoci.rd.tp-link.net/jenkins ”)
  • JENKINS_USER :用于身份验证的 Jenkins 用户名
  • JENKINS_TOKEN :用于身份验证的 Jenkins API 令牌

在您的 MCP 设置文件中配置这些:

对于克劳德桌面

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "jenkins-server": { "command": "node", "args": ["/path/to/jenkins-server-mcp/build/index.js"], "env": { "JENKINS_URL": "https://your-jenkins-server.com", "JENKINS_USER": "your-username", "JENKINS_TOKEN": "your-api-token" } } } }

工具和用法

1. 获取构建状态

获取 Jenkins 构建的状态:

// Example usage const result = await mcpClient.useTool("jenkins-server", "get_build_status", { jobPath: "view/xxx_debug", buildNumber: "lastBuild" // Optional, defaults to lastBuild });

输入模式:

{ "jobPath": "string", // Path to Jenkins job "buildNumber": "string" // Optional, build number or "lastBuild" }

2. 触发构建

使用参数触发新的 Jenkins 构建:

// Example usage const result = await mcpClient.useTool("jenkins-server", "trigger_build", { jobPath: "view/xxx_debug", parameters: { BRANCH: "main", BUILD_TYPE: "debug" } });

输入模式:

{ "jobPath": "string", // Path to Jenkins job "parameters": { // Build parameters as key-value pairs } }

3. 获取构建日志

检索 Jenkins 构建的控制台输出:

// Example usage const result = await mcpClient.useTool("jenkins-server", "get_build_log", { jobPath: "view/xxx_debug", buildNumber: "lastBuild" });

输入模式:

{ "jobPath": "string", // Path to Jenkins job "buildNumber": "string" // Build number or "lastBuild" }

发展

对于使用自动重建的开发:

npm run watch

调试

由于 MCP 服务器通过 stdio 进行通信,因此您可以使用 MCP Inspector 进行调试:

npm run inspector

这将提供一个 URL 来访问浏览器中的调试工具。

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

模型上下文协议服务器使 AI 助手能够与 Jenkins CI/CD 服务器交互,提供检查构建状态、触发构建和检索构建日志的工具。

  1. 安装
    1. 配置
      1. 对于克劳德桌面
    2. 工具和用法
      1. 获取构建状态
      2. 触发构建
      3. 获取构建日志
    3. 发展
      1. 调试
    4. 执照

      Related MCP Servers

      • -
        security
        F
        license
        -
        quality
        A Model Context Protocol server that enables AI assistants to build and test Xcode projects directly through a standardized interface, with capabilities for running tests, monitoring progress, and accessing logs in real-time.
        Last updated -
        29
        TypeScript
      • -
        security
        -
        license
        -
        quality
        A Model Context Protocol server implementation that enables AI assistants to interact with Linear project management systems, allowing them to create, retrieve, and modify data related to issues, projects, teams, and users.
        Last updated -
        20
        2
        TypeScript
      • -
        security
        F
        license
        -
        quality
        A comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.
        Last updated -
        16
        TypeScript
      • -
        security
        F
        license
        -
        quality
        An integration tool that allows interaction with Jenkins CI/CD servers through a Model Context Protocol interface, enabling users to view server info, manage jobs, inspect builds, and trigger builds with parameters.
        Last updated -
        Python

      View all related MCP servers

      MCP directory API

      We provide all the information about MCP servers via our MCP API.

      curl -X GET 'https://glama.ai/api/mcp/v1/servers/hekmon8/Jenkins-server-mcp'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server