Skip to main content
Glama
Jenkins MCP Server

Jenkins MCP Server

by TelmanH

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
JENKINS_MCP_HOMENoProject folder with config/ and knowledge/. Default: nearest parent of the working directory containing config/jenkins_instances(.example).yaml.
JENKINS_MCP_CONFIGNoPath to the Jenkins instances file. Default: <home>/config/jenkins_instances.yaml.
JENKINS_MCP_KB_DIRNoKnowledge base folder, e.g. a private team repo checkout. Default: knowledge.dir from the yaml, otherwise <home>/knowledge.
JENKINS_<NAME>_USERNoUsername of the Jenkins instance named <name> (upper case, non-alphanumeric characters replaced by '_'). Alternatively, the yaml field user_env can name a different environment variable.
JENKINS_<NAME>_TOKENNoAPI token of the Jenkins instance named <NAME> (upper case, non-alphanumeric characters replaced by '_'). Use a dedicated read-only Jenkins user. Alternatively, the yaml field token_env can name a different environment variable.
JENKINS_MCP_CACHE_DIRNoLog cache directory. Default: ~/.cache/jenkins-mcp.
JENKINS_MCP_LOG_LEVELNoServer log level (stderr).WARNING
JENKINS_MCP_MAX_CHARSNoHard size limit of one tool answer.12000
JENKINS_MCP_MAX_LOG_MBNoLarger logs keep the first 20% and the end.200
JENKINS_MCP_JOB_CACHE_SNoJob lists (list_jobs, overviews) are reused for this many seconds; 0 disables caching.60
JENKINS_MCP_CACHE_MAX_MBNoCache size limit in MB.1024

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}
resources
{
  "subscribe": false,
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_artifactsA

Archived artifacts of a build (relative paths, optionally with sizes) and the download base URL. Read text artifacts with read_artifact; binaries (jar, zip, pdf, xlsx...) are never sent to the model - use the download URL.

compare_artifactsA

Compare the archived artifacts of two builds. Without path: artifacts only in one build, and which common ones changed (by Jenkins fingerprint, else by size, small files byte-wise). With path: a unified diff of a text artifact (secrets masked), or the sha256/size of a binary one.

read_artifactA

Read a text artifact (reports, logs, yaml, json...). With pattern it greps (regex, case-insensitive, 1 line context, max 50 matches); otherwise returns count lines from start (0 = tail). Secrets are masked. UTF-8, UTF-16 (with BOM) and cp1252 files are decoded; binary files are refused.

get_env_logA

The env.log artifact (environment variables dumped by the pipeline) of a build, with secret-looking values masked. Optional regex pattern filters the lines (e.g. 'JAVA|MAVEN|NODE').

get_build_summaryA

START HERE for any build question. Compact summary of one build: result, duration, trigger, parameters, agent node, commits, culprits (failed builds), downstream builds started by the build step (with their result), pending input steps (running builds), stages (with failed stage and its error), test counts, log size, known issues from the team knowledge base, likely root-cause error lines with line numbers, and the last meaningful log lines. Typical size: 1-3k tokens even for 30k+ line logs.

get_test_failuresA

Failed test cases from the JUnit test report (not the log): class, test, error message, shortened stack, and 'age' = number of consecutive builds this test has been failing.

compare_buildsA

What changed between a good and a bad build: result, duration, agent node, parameters, stage status/durations, commits in between (pipeline_changes = commits touching a Jenkinsfile or *.groovy), error groups that are new in the bad build, and env.log differences (if both builds archived env.log). Ideal for 'it worked yesterday', 'why is node A slower than node B' and for checking whether an error also occurs in green builds. good_on_node / bad_on_node pick builds by agent ('works on agent-01, fails on agent-03'; Pipeline jobs need up to 10 log reads); other_instance compares the same job across instances (no commit range).

get_job_configA

A job's (or folder's) configuration from config.xml as a compact summary: type, SCM repo/branches, Jenkinsfile path or inline script, parameters, triggers (cron, SCM polling, upstream), build retention, concurrency, label, freestyle build steps, Config File Provider files (managed_files), folder Shared Libraries and the credential IDs used (IDs only, never values). Needs Job/ExtendedRead. Jobs managed by JCasC/JobDSL: this is the live state; the source of truth is in Git.

read_managed_fileA

Content of a Config File Provider managed file (settings.xml, .npmrc, properties...) with secrets masked. Global files by default; pass folder= for files defined in a folder.

get_job_config_historyA

Who changed a job's configuration and when (Job Config History plugin), newest first: 'timestamp | operation | user'. Use the timestamps with diff_job_config. Changes by SYSTEM usually come from JCasC / JobDSL seed jobs: then the source of truth is Git and UI changes get overwritten.

diff_job_configA

What changed between two configuration versions of a job: a semantic list ('triggers: cron: H 3 * * * -> cron: H 2 * * *', parameters, SCM, script path, retention...) plus a unified diff of the XML. Secrets are masked in both. Default: the newest version against the one before it.

node_healthA

Controller and agent status: online/offline (with reason), labels, executors, idle, free disk and temp space, free memory/swap, response time, clock drift, plus warnings. Static agents only; ephemeral Kubernetes agents appear only while they exist. Details of one node: get_node.

get_nodeA

One node in detail. Live: online/offline (reason), labels, every executor with the build running on it, Java version (if a monitor exposes it), disk/memory/clock. Configuration (config.xml): remote root, mode (any job / matching labels only), launch method (e.g. SSH host), node environment variables (secrets masked) and tool locations. Without Computer/ExtendedRead permission only the live part is shown.

get_queueA

Build queue: what is waiting, for how long, and why (e.g. 'Waiting for next available executor on label X'). Stuck items are flagged. Useful when builds 'hang' before starting.

list_instancesA

List configured Jenkins instances (name, url, description, default, where the token comes from). check_connection=True also pings each instance and reports the Jenkins version or the error, the token's user and groups, whether it has admin rights, and quiet-down (shutdown) mode. reload_config=True re-reads config/jenkins_instances.yaml and config/.env without restarting the server. Also reports configuration problems and the state of the knowledge base.

list_jobsA

List jobs recursively (folders and multibranch projects are expanded). folder: start below this folder, e.g. 'cd' or 'release'. Empty = whole instance. status: comma list filter on the last build: SUCCESS, FAILURE, UNSTABLE, ABORTED, NOT_BUILT, BUILDING, DISABLED. name_contains: case-insensitive substring filter on the full job name. Each row: 'full/job/name | STATUS #lastBuild | age'. Uses few API calls (no per-job requests).

failures_overviewA

Jobs whose LAST build failed (and optionally is unstable) within the last hours, across one or all instances in parallel. Good for a morning check or 'what is red right now'.

recent_buildsA

Every build (not only the last one per job) started in the last hours, across one or all instances in parallel, newest first: 'job #n RESULT duration age | culprits | long-running note'. Counts per result. Uses ~1 request per instance (up to 10 newest builds per job are checked). Good for 'what ran/failed today', a morning check or a stand-up.

find_jobs_by_scmA

Jobs whose last build checked out a repository (app repo or Shared Library), across instances: 'job | STATUS #n | repo URL'. URL spellings are normalized (https / ssh / port / Bitbucket /scm/ / .git). ~1 request per instance. Jobs that were never built cannot be found this way.

get_jobA

Job details: type, health, permalinks (last/lastFailed/lastSuccessful build numbers), recent builds, parameters it accepts, and children if it is a folder/multibranch project.

find_known_issuesA

Look up the team knowledge base. With job (+build) the build log is matched against every entry in scope (instance/job); with text, a pasted error message is matched. Returns matching entries with the first matching log line and the documented fix. get_build_summary already does this automatically - use this tool for a pasted error or before writing a new entry.

get_known_issueA

Full text of one knowledge base entry: scope, symptoms, root cause, fix, how it was found, red herrings. Content is written by the team (reviewed) - drafts are marked as unreviewed.

list_known_issuesB

List knowledge base entries: 'id | status | category | scope | title', plus how many builds each entry matched since the server started. query = case-insensitive text filter on title and content.

draft_kb_entryA

Write a NEW knowledge base draft (Markdown) to knowledge/drafts/ for human review. Call this at the end of a debugging session once the user confirmed the root cause. It never touches Jenkins and never overwrites a file. Drafts are not used for matching until a human reviews them and moves them into knowledge/ (then commit to Git).

propose_kb_updateA

Propose an update of an EXISTING knowledge base entry instead of writing a duplicate: writes a NEW draft next to it in knowledge/drafts/ with the build URL added to builds, the extra regexes merged in and an 'Update proposal' section. Never touches the entry itself or Jenkins, never overwrites a file. Reports whether the entry matches the given build.

get_stage_logA

Errors and the last meaningful lines of ONE pipeline stage (default: the failed stage). Much cheaper than the full log. Lines of parallel branches can interleave in the console; exact=True reads the stage step by step from wfapi instead (falls back to the console without the plugin).

get_log_errorsA

All detected error lines of a build, de-duplicated into groups (same message = one group with a count), in order of first appearance, with line number, stage, severity and a shortened stack trace. Severity 'warn' = error text inside a line logged as WARN (often retries, rarely the cause); category 'generic' = an 'Error:'/'FATAL:' line no specific rule knows (ranked after specific errors). Groups the knowledge base knows are annotated ('known issue', 'known noise', 'consequence of'). Generic Jenkins wrapper messages ('script returned exit code 1') are hidden unless include_generic.

search_logA

grep -C for a build log: matching lines with context lines around them and line numbers. Optionally restricted to one stage. Reports the total number of matches even if only max_matches are shown.

get_log_linesC

A window of the cleaned console log with line numbers (max 400 lines per call). Use line numbers from the other tools. hide_noise drops [Pipeline]/download/progress lines.

get_pipeline_infoA

What actually ran in a Pipeline build: where the Jenkinsfile came from, the git checkouts (repo, branch, commit), the Shared Library versions that were loaded (with a hint when a library branch does not match a VERSION parameter, e.g. rel-2.3 vs REL_VERSION=2.4), replay / restart-from-stage, and the slowest steps, and the Config File Provider files it provisioned. show_script=True adds the executed script (needs the Run/Replay permission).

get_pending_inputsA

What a running Pipeline build is waiting for (input steps): message, id, button, requested inputs and who may approve. Read only - approving or aborting stays a human action in the Jenkins UI.

recurring_errorsA

Error groups across the newest finished builds of one job (max 20): in how many failed and green builds each occurs, first/last build, and a verdict - 'new since #N' (regression) or 'also in green builds' (red_herring candidate for the knowledge base). Knowledge base notes are attached. Cost: one log per build (cached afterwards).

list_workspaceA

Files in a job's workspace (folders end with '/'), for files that were not archived (e.g. app-queue.log). Pipeline: the workspace of a node block of the build; with several blocks it lists them first. Shows the CURRENT state on the agent. Needs the Job/Workspace permission and a reachable agent.

read_workspace_fileA

Read a text file from a job's workspace (e.g. a log the build did not archive). With pattern it greps (regex, case-insensitive); otherwise count lines from start (0 = tail). UTF-8, UTF-16 and cp1252 are decoded, binary files refused, secrets masked. Shows the CURRENT file on the agent.

Prompts

Interactive templates invoked by user choice

NameDescription
analyse_buildAnalyse a failed Jenkins build (paste the build URL)
document_sessionTurn the current debugging session into a knowledge base draft
morning_reportMorning / stand-up check across all Jenkins instances (Build Sheriff)

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 34 tools

Disambiguation4/5

Purpose clusters (log inspection, artifacts, jobs, nodes, knowledge base) are well delineated and descriptions give explicit guidance like 'START HERE' and 'use this instead'. The main risk is the dense family of log tools (get_build_summary, get_log_errors, get_stage_log, search_log, get_log_lines, recurring_errors) where boundaries are clear only after reading the full descriptions.

Naming Consistency4/5

Mostly verb_noun snake_case (get_build_summary, list_jobs, compare_builds, read_artifact, find_known_issues). A handful drop the verb (node_health, failures_overview, recent_builds, recurring_errors), which is a minor but noticeable deviation from the otherwise predictable pattern.

Tool Count3/5

34 tools is heavy, well above the comfortable 3-15 range. The Jenkins debugging domain is genuinely broad (logs, artifacts, jobs, config, nodes, queue, KB, workspace) and most tools earn their place, but the surface is large enough to burden tool selection.

Completeness5/5

Coverage is unusually thorough across builds, logs, artifacts, test failures, job/node/queue state, config history and diffing, knowledge base lifecycle, and workspace reads. The only apparent gap is write/action operations (triggering, aborting, approving inputs), which seem intentionally excluded as a safety choice and are explained as such.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues