getBuild
Retrieve a specific build or the last build of a Jenkins job.
How to use it
getBuild is exposed by the MCP Server Plugin MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the getBuild tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install MCP Server Plugin
claude mcp add jenkins http://jenkins-host/mcp-server/mcp --transport http --header "Authorization: Basic <user:token base64>"Other tools in MCP Server Plugin (17)
Find jobs using a specific SCM (git) repository URL
Retrieve change log sets of a specific build.
Retrieve log lines with pagination for a specific build or the last build. Supports forward reads, end-relative reads (negative skip/limit), and cursor pagination: every response carries a nextCursor you can pass back as cursor to keep reading without re-scanning from the top. The cursor is tied to
Retrieve SCM configurations of a specific build.
Get a Jenkins job by its full path.
Get a paginated list of Jenkins jobs, sorted by name.
Retrieve SCM configurations of a Jenkins job.
Get information about a queued item using its ID.
Return the main script and loaded scripts of a replayable Pipeline build. Use this to inspect or modify script before calling replayBuild. Fails for non-Pipeline jobs. Optional buildNumber; defaults to the last build.
Checks the health and readiness status of a Jenkins instance. Use this tool to assess Jenkins instance health rather than simple up/down status.
Retrieve test results of a specific build or the last build.
Re-run a build with the same parameters. For Pipeline jobs with Replay support, uses the original script; for other parameterized jobs, schedules a new build with the same parameters. Optional buildNumber; defaults to the last build. Returns the queue item for the new build.
Run a Pipeline build again with a modified script. Provide mainScript (required) and optionally loadedScripts. Optional buildNumber; defaults to the last build. Fails if the build is not replayable or replay is not allowed (e.g. permissions or sandbox).
Search for log lines matching a pattern (string or regex) in build logs. Reads a non-blocking snapshot (returns promptly for in-progress builds) and stops scanning early once maxMatches is reached.
Trigger a build of a job.
Update build display name and/or description.
Get information about the current user.