Jenkins MCP Server
Provides read-only access to Jenkins CI/CD servers, enabling querying of jobs, builds, build parameters, logs, artifacts, and queue status, as well as generating verification reports for Loop boards.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Jenkins MCP ServerFind the latest build for branch feature/demo in project/test-build"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Jenkins MCP 服务
这是一个只读的 Jenkins MCP 服务,用于 AI Loop 验证。它可以让 AI Agent 安全读取 Jenkins 信息,并把构建证据整理成适合写回本地 Loop 看板的验证报告。
范围
第一版刻意保持只读。
已支持:
检查 Jenkins 连接和当前账号权限。
查询和搜索 Job。
查询构建状态和构建参数。
按分支、环境、渠道或提交号匹配构建。
读取日志尾部、搜索关键字,并隐藏敏感信息。
列出构建产物。
查看队列。
生成适合 Loop 看板使用的验证报告。
第一版不支持:
触发构建。
发布生产环境。
修改 Jenkins Job 配置。
创建、删除、禁用或自动重试 Job。
在仓库里保存 Jenkins Token。
Related MCP server: Jenkins MCP Server
主要用途
Maker Agent 可以确认当前分支是否已有可用 Jenkins 构建。
Checker Agent 可以独立检查 CI 证据,而不是只相信前一步的口头结论。
Merge Agent 可以在合并后读取验证结果,再决定任务能否完成。
最终输出包含结论、构建链接、关键参数、失败日志、产物地址和下一步建议。
环境要求
Node.js 22 或更高版本。
pnpm。
一个具备 Job、构建、日志、产物和队列读取权限的 Jenkins 账号。
Jenkins API Token 存在本地
.env或 shell 环境变量中。
安装
安装依赖:
pnpm install把 .env.example 复制为 .env,并填入本机配置。不要提交 .env。
JENKINS_BASE_URL=<your-jenkins-base-url>
JENKINS_USER=<your-jenkins-user>
JENKINS_API_TOKEN=<your-jenkins-api-token>这些值只是占位符。真实 Jenkins 地址、用户名和 Token 只放在本机 .env 里。
运行检查:
pnpm test
pnpm check本地启动 MCP 服务:
pnpm devCodex MCP 配置
本机 Codex 配置示例:
[mcp_servers.jenkins]
command = "pnpm"
args = ["--dir", "/path/to/jk-mcp-server", "dev"]
startup_timeout_sec = 10账号和 Token 放在本项目的 .env 文件或 shell 环境变量里,不要写进 Codex 配置。
常见用法
检查 Jenkins 访问:
jenkins.healthCheck读取 Job:
{
"jobPath": "project/test-build"
}按分支和环境查找构建:
{
"jobPath": "project/test-build",
"branch": "feature/demo",
"env": "test"
}生成 Loop 看板可用的验证报告:
{
"jobPath": "project/test-build",
"branch": "feature/demo",
"env": "test",
"channel": "standard",
"logKeyword": "ERROR"
}工具列表
jenkins.healthCheckjenkins.listJobsjenkins.searchJobsjenkins.getJobjenkins.getBuildjenkins.listBuildsjenkins.findBuildByParamsjenkins.getBuildLogjenkins.getBuildLogTailjenkins.searchBuildLogjenkins.listArtifactsjenkins.getArtifactInfojenkins.listQueuejenkins.getQueueItemjenkins.createVerificationReport
Job 路径
使用斜杠分隔 Jenkins 文件夹路径:
project/test-build服务内部会把它转换成 Jenkins 文件夹 URL。
验证报告
jenkins.createVerificationReport 会返回适合写入这些 Loop 字段的数据:
verificationselfTestpostMergeVerificationdecisionLogstatusHistory
报告包含验证结论、Job、构建、关键参数、失败摘要、日志片段、产物地址、是否阻塞和下一步建议。
安全说明
构建日志返回前会隐藏敏感内容。
大日志默认会截断。
产物工具只返回地址,不会自动下载文件。
Jenkins 不可访问时会返回明确的阻塞原因,不会伪造通过结果。
生产发布自动化不在第一版范围内。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/ooooshino/jk-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server