Skip to main content
Glama

jenkins-mcp (Microtech fork)

Microtech fork of lanbaoshen/mcp-jenkins (MIT), a Model Context Protocol server that lets an AI assistant read a Jenkins instance. Upstream version 3.6.0 (commit 1d8587e) is the baseline; this fork is read-only by default and has three opt-in write tools, all limited to an allowlist of release jobs: trigger_build, stop_build, cancel_queue_item.

It is the transport behind the microtech-jenkins plugin in the microtech-hub marketplace. End users do not run it by hand: the plugin's .mcp.json starts it and supplies the credentials.

What differs from upstream

Area

Upstream

This fork

Why

Other write tools (submit_input, set_item_config, set_node_config)

Present, hidden by --read-only

Deleted

A flag can be forgotten or regress; deleted code can not run

Starting, stopping, cancelling

build_item, stop_build, cancel_queue_item: any job

trigger_build, stop_build, cancel_queue_item: off by default; with --allow-trigger only the exact jobs in --trigger-jobs (a queue item is checked against its job first); dry run unless confirm=true; parameterised jobs use their defaults

Release automation can start, and undo, the release jobs and nothing else

run_groovy_script

Present

Deleted

It is code execution on the Jenkins controller

get_node_config

Present

Deleted

Node configs carry agent connection details and are not needed

Transports

stdio, SSE, streamable-http (binds 0.0.0.0, no auth)

stdio only

Nothing is ever exposed on a network port

URL / credentials

A request header could replace the URL while the server's credentials were still sent

Taken only from the server's own configuration

A caller could aim your token at a host of its choice

.env

Auto-loaded from the working directory

Only with an explicit --env-file

A stray file can not silently change credentials

Job and artifact paths

Inserted into URLs unchecked

Segments validated and URL-quoted; .., ?, #, %, \, control characters refused

Stops a crafted name reaching other URLs

Scope

Whole instance

Optional --allowed-folders

Limit reads to the folders you care about

Output size

Unbounded

Console 5000 lines, 2000 chars per line, regex up to 200 chars, artifacts 5 MiB; listings are compact by default (fullname, kind, color, max 200 rows, fields and limit to change)

One call can not flood a model's context

Recipe tools

none

get_jobs_status (last build of many jobs, one request), get_item_summary (a job's repo, branch, steps, triggers, downstream in ~1 KB) and get_chain_status (follows one entry build through its downstream jobs: passed, stopped at a job, running or waiting, ~1 KB, optional wait of up to 50 s)

Replace N+1 calls and raw config.xml dumps

Secret redaction

Raw config, console, scripts, parameters

Secret-looking values replaced by [REDACTED] in get_item_config, console output, build scripts, build parameters and parameter defaults: NAME=value, quoted or XML-escaped, curl -u, URL userinfo, Bearer tokens, {encrypted} values (best effort, not a guarantee)

Config files, logs and pipelines can hold tokens

Human approval

n/a

With the write tools on, a confirmed start, stop or cancel also asks the user through the client, showing the branch, default parameters and downstream jobs, and is refused if the client cannot ask or the job changed since the dry run. Classic connections get an MCP elicitation request; on the 2026-07-28 protocol era (no server-initiated requests) the call returns an InputRequiredResult and the client retries it with the answer, bound to the same job and job-configuration digest

confirm=true alone can be set by a model after reading planted text

Audit and cap

n/a

Every confirmed write and every failed attempt is appended to a JSONL audit file; at most 5 confirmed starts per server session

Views and unknown job types

Raw JSON at any depth, including parameter defaults and past builds' parameters

Views are names, urls and colours only (limited to the allowed folders); unknown job types never return property or actions

Job parameters can hold secrets

User regular expressions

Compiled as given

Length-capped and refused when they nest or alternate repeats

A pattern like (a+)+$ would hang the server

File logging

Wrote the URL and username to ~/.mcp_jenkins/log.log

None

No credentials metadata on disk

list_builds

Missing

Added

Build history of a job, newest first

Dependencies

Lockfile with advisories

Refreshed lockfile

--read-only is still accepted and ignored, so existing configurations keep working.

Related MCP server: MCP Jenkins Server

Run

uvx --from git+https://github.com/microtechos/jenkins-mcp@<tag-or-sha> mcp-jenkins --transport stdio

Option

Environment variable

Meaning

--jenkins-url

JENKINS_URL

Jenkins base URL (required)

--jenkins-username

JENKINS_USERNAME

User. Give both username and password, or neither (anonymous)

--jenkins-password

JENKINS_PASSWORD

API token (preferred) or password

--jenkins-timeout

JENKINS_TIMEOUT

Seconds per request, default 5

--jenkins-verify-ssl/--no-jenkins-verify-ssl

JENKINS_VERIFY_SSL

TLS verification, default on

--allow-trigger

JENKINS_ALLOW_TRIGGER

Register trigger_build, stop_build and cancel_queue_item (default off)

--trigger-jobs

JENKINS_TRIGGER_JOBS

Comma-separated exact job full names trigger_build may start (and the other two may stop or cancel). Empty = none

--stop-jobs

JENKINS_STOP_JOBS

Extra exact job full names that only stop_build and cancel_queue_item may act on, e.g. the rest of a release chain. They can never be started

--require-approval/--no-require-approval

none (flag only)

Ask the user before any confirmed write (default on; elicitation on classic connections, InputRequiredResult on 2026-07-28 and newer). A client that can not answer means nothing is run. An environment variable can not switch it off. With MCP_JENKINS_LOG_LEVEL=DEBUG (stderr only; this also logs request URLs) the log names the protocol version and path used

--audit-log

JENKINS_AUDIT_LOG

JSONL file for confirmed writes (default with --allow-trigger: ~/.microtech/jenkins-mcp-audit.jsonl)

--max-starts

JENKINS_MAX_STARTS

Confirmed trigger_build starts per server session (default 5; a start counts even if the reply is lost)

--allowed-folders

JENKINS_ALLOWED_FOLDERS

Comma-separated folder/job full names that may be read, e.g. Branch-Retail,Branch-Salon. Empty = no restriction

--env-file

Load the settings above from a file (never auto-discovered)

The allowlist gates every tool that takes a job fullname and filters get_all_items / query_items (parent folders stay visible so the tree can be navigated). Views, nodes, the queue and plugins are instance-level metadata and are not filtered: for a hard boundary also give the Jenkins user only the permissions it needs (Overall/Read, Job/Read on the folders, Job/ExtendedRead only if get_item_config is wanted).

Tools (32 read-only, plus 3 opt-in tools when enabled)

Group

Tools

Items

get_item, get_item_summary, get_item_config, get_item_parameters, get_all_items, query_items

Builds

get_jobs_status, get_chain_status, list_builds, get_build, get_build_parameters, get_build_console_output, get_build_scripts, get_build_test_report, get_build_test_failures, get_running_builds, get_pending_inputs

Artifacts

get_all_build_artifacts, get_build_artifact, get_build_artifact_url

Views / queue / nodes

get_all_views, get_view, get_all_queue_items, get_queue_item, get_all_nodes, get_node

Plugins

get_all_plugins, get_plugin, get_plugins_with_problems, get_plugins_with_updates, get_plugins_with_backup, get_plugin_dependency_graph

Trigger (opt-in)

trigger_build(fullname, confirm=false), stop_build(fullname, number, confirm=false), cancel_queue_item(id, confirm=false)

Listings (get_all_items, query_items) are compact by default; for status use get_jobs_status and for a job's configuration get_item_summary before get_item_config.

Maintaining this fork

uv sync
uv run pytest
uv run --with ruff ruff check src tests

Keep the fork read-only apart from the three allowlisted tools: a new tool must be a read tool, and nothing else that sends a non-GET request to Jenkins is added without a separate, explicit decision. Upstream changes are taken by diff or cherry-pick (the history is not shared). Release by tagging; the plugin pins a full commit SHA.

License

MIT, as upstream: see LICENSE. This is not an official Jenkins product.

Available Tools

31 tools
get_all_build_artifactsGet All Build ArtifactsC

List the artifacts of a specific build in Jenkins

Inputs: fullname (required), number. Returns: result

get_all_itemsGet All ItemsA

Get all items from Jenkins, compact: prefer query_items with a filter on a large instance

Inputs: limit, fields. Returns: result

get_all_nodesGet All NodesB

Get all nodes from Jenkins

Inputs: no named parameters. Returns: result

get_all_pluginsGet All PluginsB

Get all installed plugins from Jenkins

Inputs: depth. Returns: result

get_all_queue_itemsGet All Queue ItemsA

Get all items in Jenkins queue, each with the job it belongs to (name and url)

Inputs: no named parameters. Returns: result

get_all_viewsGet All ViewsB

Get all top-level views from Jenkins.

Inputs: no named parameters. Returns: result

get_buildGet BuildC

Get specific build info from Jenkins

Inputs: fullname (required), number. Returns: object

get_build_artifactGet Build ArtifactB

Download an artifact from a specific build in Jenkins

Binary files are returned as base64-encoded content; text files are returned as plain text.

Inputs: fullname (required), relative_path (required), number. Returns: object

get_build_artifact_urlGet Build Artifact UrlC

Get the direct URL of an artifact from a specific build in Jenkins

Inputs: fullname (required), relative_path (required), number. Returns: result

get_build_console_outputGet Build Console OutputC

Get the console output of a specific build in Jenkins

Inputs: fullname (required), limit, number, offset, +1 more. Returns: result

get_build_parametersGet Build ParametersC

Get the parameters of a specific build in Jenkins

Inputs: fullname (required), number. Returns: object

get_build_scriptsGet Build ScriptsB

Get the scripts used in a specific build in Jenkins

Inputs: fullname (required), number. Returns: result

get_build_test_failuresGet Build Test FailuresA

Get the failing tests of a specific build in Jenkins, with their error details

For a matrix build, the failures of all configurations are returned, each with the URL of its configuration build.

Inputs: fullname (required), limit, number, max_stack_trace_length. Returns: object

get_build_test_reportGet Build Test ReportA

Get the test report of a specific build in Jenkins

The report lists every test case, passing ones included, so it can be very large; use get_build_test_failures to see what failed.

Inputs: fullname (required), number. Returns: object

get_itemGet ItemC

Get specific item from Jenkins

Inputs: fullname (required). Returns: object

get_item_configGet Item ConfigA

Get specific item config from Jenkins

Secret-looking values (encrypted secrets, password/token elements, inline NAME=value assignments for password/token/secret/key variables) are replaced with [REDACTED]. Credential ids are kept.

Inputs: fullname (required). Returns: result

get_item_parametersGet Item ParametersC

Get the parameter definitions of a Jenkins job

Inputs: fullname (required). Returns: result

get_item_summaryGet Item SummaryA

Summarise a job's configuration: repo and branch, steps, triggers, parameters, downstream jobs

A fraction of get_item_config. Secret-looking values are redacted, credential ids and long scripts are not reproduced. Use get_item_config only when you need the exact XML.

Inputs: fullname (required). Returns: object

get_jobs_statusGet Jobs StatusA

Last build of every job matching a pattern, in one call (use this instead of list_builds per job)

Inputs: limit, folder_depth, fullname_pattern. Returns: result

get_nodeGet NodeB

Get a specific node from Jenkins

Contains executor about the node.

Inputs: name (required). Returns: object

get_pending_inputsGet Pending InputsA

Get the pending input steps of a specific build in Jenkins

A pipeline showing "Paused for Input" is waiting on an input step. This lists the input id and the parameter definitions the pipeline is waiting for.

Only the given build is inspected. With number=None that is the job's last build, so a paused build that is no longer the most recent one is not found that way — locate it with get_running_builds and pass its number explicitly.

Inputs: fullname (required), number. Returns: result

get_pluginGet PluginB

Get a specific plugin from Jenkins

Contains detailed information about the plugin, including dependencies when depth >= 2.

Inputs: short_name (required), depth. Returns: result

get_plugin_dependency_graphGet Plugin Dependency GraphB

Get dependency graph for a specific plugin in Graphviz format

Recursively analyzes dependencies down to leaf nodes. Returns nodes and edges that can be used to generate a dependency graph.

Inputs: short_name (required). Returns: object

get_plugins_with_backupGet Plugins With BackupA

Get plugins that can be downgraded

Returns plugins that have a backupVersion and can be rolled back.

Inputs: depth. Returns: result

get_plugins_with_problemsGet Plugins With ProblemsA

Get all plugins with problems from Jenkins

These are plugins that have issues such as missing dependencies, incompatible versions, core version mismatch, or other configuration problems.

Inputs: no named parameters. Returns: result

get_plugins_with_updatesGet Plugins With UpdatesC

Get plugins that have available updates

Inputs: depth. Returns: result

get_queue_itemGet Queue ItemC

Get a specific item in Jenkins queue by id

Inputs: id (required). Returns: object

get_running_buildsGet Running BuildsB

Get all running builds from Jenkins

Inputs: no named parameters. Returns: result

get_viewGet ViewA

Get a Jenkins view by path, returning its jobs and/or nested sub-views.

Views can be nested up to multiple levels deep. Use "/" to separate levels in the path. If the view contains sub-views instead of jobs, the response will include their names so you can drill down further.

Inputs: view_path (required), depth. Returns: object

list_buildsList BuildsA

List the most recent builds of a job in Jenkins, newest first

Inputs: fullname (required), limit. Returns: result

query_itemsQuery ItemsC

Query items from Jenkins, compact

Inputs: limit, fields, folder_depth, class_pattern, +2 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 31 tools

    Disambiguation4/5

    Most tools target clearly distinct Jenkins resources: builds, nodes, plugins, queue items, views, items, and artifacts. A few read-only item tools (get_all_items, query_items, get_item, get_item_config, get_item_summary) and build-listing tools (list_builds, get_jobs_status) could be confused, but descriptions provide useful guidance.

    Naming Consistency5/5

    All tool names are snake_case and consistently verb-first, using get_, list_, or query_ prefixes with noun phrases. The pattern is predictable across builds, items, nodes, plugins, queue, and views.

    Tool Count2/5

    31 tools is heavy for this surface, with many granular build-inspection getters (scripts, console output, test report, test failures, parameters, inputs, artifacts) that could be consolidated. Although Jenkins is broad, the count exceeds the practical 25+ threshold.

    Completeness2/5

    The surface is entirely read-only, offering no operations to trigger builds, stop builds, cancel queue items, update job configs, or manage plugins. Read coverage is broad, but lifecycle/action coverage is severely missing for a Jenkins management server.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to securely interact with Jenkins through its API, exposing tools for inspecting items, nodes, views, queues, and builds, reading console output, test reports, and artifacts, managing plugins, and triggering, stopping, or approving pipeline builds, including executing Groovy scripts. Supports stdio, SSE, and streamable-HTTP transports with configurable authentication, SSL verification, and a read-only mode.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI models to securely inspect and operate Jenkins through tools for jobs, builds, queue items, nodes, views, plugins, artifacts, pipeline inputs, and Groovy script execution. Supports stdio, SSE, and streamable-HTTP transports with configurable authentication and a read-only mode.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to interact with Jenkins servers through the Jenkins API, allowing them to browse items, nodes, views and plugins, inspect and control builds and queue items, retrieve artifacts, test reports and console output, submit pipeline inputs, and run Groovy scripts. Supports authenticated or anonymous access over stdio, SSE, and streamable-http transports with an optional read-only mode.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI language models to securely interact with Jenkins through the Model Context Protocol, supporting job and node inspection, build triggering and monitoring, queue management, artifact retrieval, plugin and view queries, and Groovy script execution. It offers flexible authentication via CLI flags, environment variables, or headers, plus a read-only mode, multiple transports, and a credential-free health check endpoint.
      -