Jenkins MCP Go MCP Server

Connect Jenkins to Claude Desktop, Claude Code, Cursor, or any MCP-compatible AI agent: fetch console logs, inspect pipeline stages, parse JUnit and

Local serverstdioPython

What is the Jenkins MCP Go MCP Server?

Connect Jenkins to Claude Desktop, Claude Code, Cursor, or any MCP-compatible AI agent: fetch console logs, inspect pipeline stages, parse JUnit and Ginkgo test

The short version

  • Read-first, opt-out writes. — Read tools are always on. Write tools
  • Single-host, single-credential. — It talks to one Jenkins URL with one
  • Triage-shaped, not API-shaped. — Tools answer the questions agents
  • Built for context windows. — Every listing tool takes an RE2 filter and
  • Disk-cached console logs. — Finished builds are saved once and reused
  • Pipeline- and Ginkgo-aware. — Beyond the raw console, dedicated tools

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
health_checkValidate the server's setup: Jenkins reachability and version, authenticated user, CSRF crumb issuer, Pipeline/JUnit plugin presence, online/offline node counts
get_plugin_versionsList installed Jenkins plugins with versions, pinned flag, and pending-update flag. Optional name_filter (RE2) and include_inactive. 403 degrades to a clear hin
whoami_canProbe a job for the configured token's effective Read / Build / Cancel / Configure permissions via read-only GET requests. Useful up-front to avoid a 403 on a t
list_jobsEnumerate jobs and folders under a path (or root). Optional recursion and case-insensitive RE2 name filter; capped at 500 entries.
list_branchesEnumerate the branches of a WorkflowMultiBranchProject with per-branch last-build number, result, duration, and timestamp. Optional name_filter (RE2) and health
get_console_logTail the build's /consoleText. Defaults to last 500 lines; pass tail_lines: -1 for the full log.
get_console_log_pathForce-cache the full log for a completed build and return its on-disk path so the agent can Read/Grep/Bash it natively.
search_console_logRE2 regex search over the console log with line-number-aware context windows.
tail_running_buildCapped, offset-tracked tail of an in-flight build's console via Jenkins' progressiveText. Echo Next since_byte back to paginate. Never writes to the on-disk cac
get_build_infoPretty-printed build summary: result, duration, parameters, change set.
get_build_environmentThree sections for a build: Cause (trigger reason verbatim), Parameters (masked secrets surfaced as (masked)), and Injected Env Vars via EnvInject. Optional RE2
get_scm_contextPer-commit history for one build: commit id, author, timestamp, message subject, and each commit's touched paths with A/M/D edit codes. Pipeline change sets are
last_green_buildReport the most recent successful build of a job. Returns number, finish time (UTC), and URL — the start point for bisect-from-green.
changes_since_last_greenUnion the commits across every completed build since the job's last green. Walks previousCompletedBuild, dedupes by commitId, supports path_filter and max_commi
compare_buildsDiff two builds of the same job across result, duration, parameters, SCM commits, pipeline stages, and JUnit tests. The agent answers "what changed between A an
get_pipeline_stagesList Declarative/Scripted Pipeline stages via /wfapi/describe with status and duration.
get_stage_logFetch a single pipeline stage's log via /execution/node/ /wfapi/log.
get_pipeline_scriptReturn the Jenkinsfile a specific build actually ran. Tries the Replay plugin first (build-pinned), falls back to config.xml (job-level — provenance surfaced).
get_test_reportStructured JUnit results from /testReport/api/json, with failed cases and head+tail of stack traces.
get_flaky_candidatesRank flaky tests across the latest N completed builds of one job by counting pass↔fail flips. Returns a sorted table of test name, flip count, pass/fail tallies
get_test_historyPer-build trend of a single test across the last N completed builds — the follow-up to get_flaky_candidates once a suspect is known. Timeline (build , result, s
find_test_by_nameLocate which job runs a test whose full name contains a substring. Walks list_jobs(recursive) under folder_path, fans out per-job probes against lastCompletedBu
find_recent_failuresSurvey failed builds across the jobs under folder_path within a lookback window. Per-job probe of the last 5 builds; filters by since (24h default; supports Nd)
list_pr_buildsList all builds for a PR on a WorkflowMultiBranchProject. Probes the common PR branch naming conventions in parallel (PR-N, pull/N/head, change-N, pr/N) and ren
get_ginkgo_failure_summaryParse Ginkgo's Summarizing N Failure block and surface the first [ERROR] tagged with each spec name.
list_nodesList Jenkins agents/nodes with status, executor counts, labels, and monitor summaries.
get_nodePer-node detail: status, per-executor idle state, labels, full monitor data.
list_queueList pending Jenkins queue items with the block reason for each.
cancel_queue_itemDrop a pending queue item by id. Mutating; suppressed when JENKINS_MCP_READONLY is set.
trigger_buildQueue a build, optionally with parameters; can block until the build is assigned a number. Mutating.
stop_buildAbort a running build. Mutating.

How to install the Jenkins MCP Go MCP Server

{
  "mcpServers": {
    "jenkins": {
      "command": "/usr/local/bin/jenkins-mcp",
      "env": {
        "JENKINS_URL": "https://jenkins.example.com",
        "JENKINS_USER": "your-username",
        "JENKINS_API_TOKEN": "YOUR_JENKINS_API_TOKEN"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

VariableDescriptionRequired
JENKINS_URLDeclared in the maintainer’s client configuration.Check documentation
JENKINS_USERDeclared in the maintainer’s client configuration.Check documentation
JENKINS_API_TOKENDeclared in the maintainer’s client configuration.Check documentation

Example prompts to try

  • “Use Jenkins MCP Go to health check.”
  • “Use Jenkins MCP Go to get plugin versions.”
  • “Use Jenkins MCP Go to whoami can.”

Frequently asked questions

Connect Jenkins to Claude Desktop, Claude Code, Cursor, or any MCP-compatible AI agent: fetch console logs, inspect pipeline stages, parse JUnit and Ginkgo test Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.