Jenkins Server MCP
Jenkins 服务器 MCP
模型上下文协议 (MCP) 服务器提供与 Jenkins CI/CD 服务器交互的工具。该服务器使 AI 助手能够通过标准化接口检查构建状态、触发构建以及检索构建日志。
安装
克隆此存储库:
git clone https://github.com/yourusername/jenkins-server-mcp.git
cd jenkins-server-mcp安装依赖项:
npm install构建项目:
npm run buildRelated MCP server: Jenkins MCP Server
配置
服务器需要以下环境变量:
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文件。
Available Tools
3 toolsget_build_logC
Get the console output of a Jenkins build
Inputs: buildNumber (required), jobPath (required).
get_build_statusB
Get the status of a Jenkins build
Inputs: jobPath (required), buildNumber.
trigger_buildB
Trigger a new Jenkins build
Inputs: jobPath (required), parameters (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: get_build_log retrieves console output, get_build_status checks build status, and trigger_build initiates new builds. There is no overlap or ambiguity between these functions.
All tools follow a consistent verb_noun pattern (get_build_log, get_build_status, trigger_build) with clear, descriptive names. The naming convention is uniform and predictable throughout the set.
With only 3 tools, the server feels thin for a Jenkins integration, which typically involves more operations like managing jobs, viewing queue status, or canceling builds. While the tools cover basic build interactions, the scope is limited.
The toolset is severely incomplete for Jenkins functionality. It lacks core operations such as listing jobs, viewing build history, managing job configurations, or handling Jenkins system information. Agents will face significant gaps in performing typical Jenkins tasks.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The Buildkite MCP server exposes Buildkite product data (pipelines, builds, jobs, and test data) to AI tools, editors, and agents through the Model Context Protocol. It provides capabilities including pipeline creation and management, build monitoring with specialized tools like 'wait_for_build', efficient log querying using Apache Parquet conversion and caching, and OAuth-based authentication for both read-write and read-only access to Buildkite's REST API.
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceA Model Context Protocol (MCP) server that enables AI tools like chatbots to interact with and control Jenkins, allowing users to trigger jobs, check build statuses, and perform other Jenkins operations through natural language.MIT
- AlicenseNot gradedqualityCmaintenanceProvides Jenkins CI/CD integration for AI assistants through the Model Context Protocol, enabling job management, build control, and system administration via natural language commands.855 PyPI1MIT
- AlicenseAqualityDmaintenanceMCP server that connects AI agents to Jenkins, supporting stdio and HTTP transports with tools for jobs, builds, logs, and queue management.9177 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to securely interact with Jenkins through the Model Context Protocol, allowing inspection and management of jobs, builds, nodes, queues, plugins, artifacts, and pipelines.-