health_checkLABSCO SUMMARY
Shaped around the questions you actually ask a failing build.
Most Jenkins integrations hand you the REST API and let the agent work it out. Here the hard questions are single calls: what changed between A and B, which tests flip between pass and fail, what commits landed since the last green. The disk cache matters more than it sounds — a multi-gigabyte console log gets fetched once and then grepped locally instead of re-streamed on every follow-up.
What it is
A single Go binary that talks to one Jenkins instance with one API token. The tools answer triage questions rather than mirroring Jenkins endpoints, and large console logs are cached on disk so the agent can grep a finished build instead of streaming it.
What you get
- last_green_build and changes_since_last_green — the bisect start point and every commit since it, deduped
- compare_builds — two builds diffed across result, duration, parameters, commits, pipeline stages and JUnit tests
- get_console_log, search_console_log and get_console_log_path, the last returning the cached file's path so the agent reads it locally
- tail_running_build for an in-flight build, offset-tracked so you can page through it
- get_test_report, get_flaky_candidates, get_test_history and find_test_by_name for JUnit results and flake ranking
- get_ginkgo_failure_summary for Ginkgo's own failure block
- get_pipeline_stages, get_stage_log and get_pipeline_script — including the Jenkinsfile a specific build actually ran
- get_scm_context for per-commit authors, messages and touched paths with edit codes
- health_check and whoami_can to confirm reachability and the token's effective permissions before you need them
- trigger_build, stop_build and cancel_queue_item — the only mutating tools, and they disappear entirely under JENKINS_MCP_READONLY
Requirements
JENKINS_URL, JENKINS_USER and JENKINS_API_TOKEN — an API token generated at /me/configure, not your password. One static binary, no Python runtime and no Docker required. Set JENKINS_MCP_READONLY and the three mutating tools are never registered, which is the sane default for an agent pointed at production CI.
Setup effort
Follow the published steps
USE CASES
Working out what broke a green pipeline
Find the last successful build, then union the commits that have landed since it.
Comparing a failing build against one that worked
Diff the two across parameters, commits, stages and tests in one call.
Reading a huge console log without drowning the context window
Cache the log once and grep it on disk, or search it by regex with surrounding lines.
Deciding whether a test failure is real
Rank the job's tests by pass/fail flips, then pull the per-build history of the suspect.
Watching a build that is still running
Tail the live console in offset-tracked chunks rather than waiting for it to finish.
Avoiding a 403 before you trigger anything
Probe the token's effective permissions on the job first, using read-only requests.
Restarting a job and clearing the queue
Trigger with parameters, abort a stuck run, and drop pending queue items.
31 tools
Listed in project docs. Your client may show a different list.
get_plugin_versionswhoami_canlist_jobslist_branchesget_console_logget_console_log_pathsearch_console_logtail_running_buildget_build_infoget_build_environmentget_scm_contextlast_green_buildchanges_since_last_greencompare_buildsget_pipeline_stagesget_stage_logget_pipeline_scriptget_test_reportget_flaky_candidatesget_test_historyfind_test_by_namefind_recent_failureslist_pr_buildsget_ginkgo_failure_summarylist_nodesget_nodelist_queuecancel_queue_itemtrigger_buildstop_buildBEFORE YOU INSTALL
What to know first
Tools you get
31 tools named in the project's documentation.
Requires
- Go 1.23+
- JENKINS_API_TOKEN in your environment
- JENKINS_URL in your environment
- JENKINS_USER in your environment
INSTALLATION
Connect your client
Server setup
Grab the archive for your OS and architecture from the Releases page (https://github.com/2001adarsh/jenkins-mcp-go/releases) and put the jenkins-mcp binary on your PATH.
MCP Clients
Claude Desktop
{
"mcpServers": {
"jenkins": {
"command": "/usr/local/bin/jenkins-mcp",
"env": {
"JENKINS_URL": "<YOUR_JENKINS_URL>",
"JENKINS_USER": "<YOUR_JENKINS_USER>",
"JENKINS_API_TOKEN": "<YOUR_JENKINS_API_TOKEN>"
}
}
}
}Claude Desktop — Docker
{
"mcpServers": {
"jenkins": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"JENKINS_URL",
"-e",
"JENKINS_USER",
"-e",
"JENKINS_API_TOKEN",
"ghcr.io/2001adarsh/jenkins-mcp-go:latest"
],
"env": {
"JENKINS_URL": "<YOUR_JENKINS_URL>",
"JENKINS_USER": "<YOUR_JENKINS_USER>",
"JENKINS_API_TOKEN": "<YOUR_JENKINS_API_TOKEN>"
}
}
}
}Claude Code
claude mcp add jenkins /usr/local/bin/jenkins-mcp --env JENKINS_URL=<YOUR_JENKINS_URL> --env JENKINS_USER=<YOUR_JENKINS_USER> --env JENKINS_API_TOKEN=<YOUR_JENKINS_API_TOKEN>Cursor
{
"mcpServers": {
"jenkins-mcp-go": {
"command": "jenkins-mcp",
"args": [],
"env": {
"JENKINS_URL": "<YOUR_JENKINS_URL>",
"JENKINS_USER": "<YOUR_JENKINS_USER>",
"JENKINS_API_TOKEN": "<YOUR_JENKINS_API_TOKEN>"
}
}
}
}