Jenkins MCP server
A maintained Jenkins MCP server: list jobs, trigger and stop builds, read console logs and test results, and manage nodes from an agent.
This Jenkins MCP server connects an AI agent to one or more Jenkins controllers over the Jenkins REST API, exposing roughly 38 tools that cover the full job-and-build lifecycle. On the read side an agent can list and search jobs, fetch the status of a job's latest build or a specific build number, pull console log output, read pipeline stages, get test results with pass and fail counts, list and download build artifacts, and inspect Git changes for a build. That makes it well suited to failure triage: the agent reads the console log and test results for a red build and proposes a fix without anyone opening the Jenkins UI.
On the write side it can trigger parameterized builds, stop or delete builds, replay a pipeline run with a modified script, and create, copy, rename, enable, disable, or delete jobs and update their XML configuration. It also manages infrastructure — listing nodes and views, toggling agents online or offline, reading the build queue, listing installed plugins, and performing guarded operations like quiet-down and safe-restart that require explicit confirmation. It runs locally over stdio via npx, supports multiple Jenkins instances at once, and authenticates with a Jenkins user plus API token (Bearer tokens and basic auth are also supported).
Quick install
Copy-paste configs are provided for all 8 supported clients. Pick your client below.
Add to ~/.claude.json
{
"mcpServers": {
"jenkins": {
"command": "npx",
"args": [
"--yes",
"@kud/mcp-jenkins@latest"
],
"env": {
"MCP_JENKINS_URL": "<MCP_JENKINS_URL>",
"MCP_JENKINS_USER": "<MCP_JENKINS_USER>",
"MCP_JENKINS_API_TOKEN": "<MCP_JENKINS_API_TOKEN>"
}
}
}
}claude mcp add jenkins -- npx --yes @kud/mcp-jenkins@latestAvailable tools
| Tool | Description |
|---|---|
| jenkins_list_instances | Lists all configured Jenkins instances with their names and URLs. |
| jenkins_list_jobs | Lists all Jenkins jobs with their names and URLs. |
| jenkins_search_jobs | Searches for Jenkins jobs by name with a case-insensitive substring match. |
| jenkins_get_job_status | Gets the status of the last build for a specific job. |
| jenkins_get_job_parameters | Gets the parameter definitions for a parameterized job: names, types, defaults, and choices. |
| jenkins_get_job_config | Gets a job's configuration XML. |
| jenkins_update_job_config | Updates an existing job's configuration. |
| jenkins_create_job | Creates a new Jenkins job from an XML configuration. |
| jenkins_copy_job | Copies or duplicates a Jenkins job under a new name. |
| jenkins_rename_job | Renames a Jenkins job. |
| jenkins_delete_job | Permanently deletes a job (cannot be undone). |
| jenkins_enable_job | Enables a disabled job. |
| jenkins_disable_job | Disables a job to prevent it from running. |
| jenkins_trigger_build | Triggers a new build for a job, optionally with parameters. |
| jenkins_stop_build | Stops or aborts a running build. |
| jenkins_replay_build | Replays or reruns a pipeline build, optionally with a modified pipeline script. |
| jenkins_delete_build | Deletes a specific build. |
| jenkins_get_recent_builds | Gets recent builds for a job with their status and metadata. |
| jenkins_get_build_status | Gets detailed status of a specific build number for a job. |
| jenkins_get_build_changes | Gets the Git commits and changes for a build. |
| jenkins_get_console_log | Gets console log output from a build, returning both a snippet and the full log. |
| jenkins_get_pipeline_stages | Gets pipeline stages and their status for a build. |
| jenkins_get_test_results | Gets test results for a build, including pass and fail counts and test suites. |
| jenkins_list_artifacts | Lists all artifacts produced by a specific build. |
| jenkins_get_artifact | Downloads a specific artifact from a build as base64-encoded content. |
| jenkins_get_queue | Gets the current build queue showing pending builds. |
| jenkins_cancel_queue | Cancels a queued build by queue ID. |
| jenkins_list_nodes | Lists all Jenkins nodes and agents and their status. |
| jenkins_get_node | Gets detailed information about a specific Jenkins node or agent. |
| jenkins_toggle_node_offline | Toggles a Jenkins node or agent between online and offline. |
| jenkins_list_views | Lists all Jenkins views with their jobs. |
| jenkins_get_view | Gets details and the job list for a specific Jenkins view. |
| jenkins_get_plugins | Lists all installed Jenkins plugins. |
| jenkins_get_system_info | Gets Jenkins system information. |
| jenkins_get_version | Gets the Jenkins version. |
| jenkins_quiet_down | Puts Jenkins into quiet mode so no new builds start until cancelled (requires confirmation). |
| jenkins_cancel_quiet_down | Cancels Jenkins quiet mode and resumes accepting new builds. |
| jenkins_safe_restart | Safely restarts Jenkins, waiting for running builds to finish first (requires confirmation). |
Required configuration
- MCP_JENKINS_URLRequired
URL of your Jenkins controller. Comma-separated for multiple instances.
- MCP_JENKINS_USERRequired
Jenkins username used to authenticate. Comma-separated to match multiple instances.
- MCP_JENKINS_API_TOKENRequired
Jenkins API token for the user, generated under your Jenkins account's security settings.
- MCP_JENKINS_BEARER_TOKENOptional
Bearer token to authenticate against Jenkins instead of a username and API token.
- MCP_JENKINS_ALLOW_TOOLSOptional
Comma-separated allowlist of tool names to expose. Restricts the surface the agent can call.
- MCP_JENKINS_BLOCK_TOOLSOptional
Comma-separated blocklist of tool names to hide, useful for disabling destructive operations.
What you can do with it
Triage a failing Jenkins build
The agent reads the console log, pipeline stages, and test results for a red build, correlates the failure with the Git changes in that build, and proposes a fix without you opening the Jenkins UI.
Kick off and monitor a parameterized job
Ask the agent to trigger a build with the right parameters, then poll the build status and console output and report back when it finishes or fails.
FAQ
- Is it free?
- Yes. It is free and open source under the MIT license; you only need a Jenkins account and an API token scoped to the controller you want the agent to reach.
- Does it support remote/OAuth?
- No. It runs locally over stdio via npx and authenticates with a Jenkins username and API token (Bearer tokens and basic auth are also supported). There is no hosted remote endpoint or OAuth flow.
- Can it manage more than one Jenkins instance?
- Yes. Pass comma-separated values to MCP_JENKINS_URL and MCP_JENKINS_USER and the server exposes all of them; jenkins_list_instances enumerates the configured controllers.
- Can I prevent destructive actions?
- Yes. Use MCP_JENKINS_BLOCK_TOOLS to hide tools like jenkins_delete_job or jenkins_safe_restart, or MCP_JENKINS_ALLOW_TOOLS to expose only an explicit allowlist. Guarded operations also require an explicit confirm flag.