MCP Jenkins 服务器
提供 Jenkins 集成工具的模型上下文协议 (MCP) 服务器。
特征
获取 Jenkins 服务器信息
列出并检查 Jenkins 作业
获取最近的构建及其摘要
获取构建信息和控制台输出
管理 Jenkins 视图
使用参数触发作业构建
Related MCP server: Jenkins Server MCP
要求
Python 3.10+
具有 API 访问权限的 Jenkins 服务器
用于身份验证的 Jenkins API 令牌
安装
克隆此存储库
安装依赖项:
pip install -r requirements.txt
配置
使用您的 Jenkins 凭证创建一个.env文件:
JENKINS_URL=https://your-jenkins-server
JENKINS_USER=your-username
JENKINS_TOKEN=your-api-tokenCLI 配置
要将此 MCP 服务器添加到您的 CLI,请使用以下配置:将“Support/Claude/claude_desktop_config.json”文件内容更改为:
{
"mcpServers": {
"mcp-jenkins-server": {
"command": "/Users/username/.local/bin/uv -> //uv full path",
"args": [
"--directory",
"/Users/username/Desktop/mcp-jenkins-server -> //project path ",
"run",
"server.py"
],
"env": {
"JENKINS_URL": "http://localhost:8080",
"JENKINS_USERNAME": "xx",
"JENKINS_PASSWORD": "xx"
},
"disabled": false,
"autoApprove": []
}
}
}可用工具
该 MCP 服务器提供以下工具:
get_jenkins_info
获取 Jenkins 服务器信息
list_jobs
列出所有 Jenkins 作业
get_job_info
获取有关特定作业的信息
参数:
job_name:要检查的作业的名称
get_last_builds
获取某项工作的最新构建摘要
参数:
job_name:作业的名称count(可选):要检索的最近构建的数量(默认值:3)
get_build_info
获取有关特定构建的详细信息
参数:
job_name:作业的名称build_number:要检查的版本号
get_build_console_output
获取特定构建的控制台输出
参数:
job_name:作业的名称build_number:要检查的版本号
get_views
列出所有 Jenkins 视图
trigger_job_build
使用可选参数触发 Jenkins 作业构建
参数:
job_name:作业的名称parameters(可选):传递给作业的参数字典
演示视频:
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.