About Go Jenkins MCP
Go Jenkins MCP is an MCP server published by simonfxr in the Developer Tools category: simple jenkins mcp server. It has been installed 0 times through Conduid.
Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.
Install
npx go-jenkins-mcpThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Go Jenkins MCP
Powered by Claude · Grounded in docs
Security checks
- ·README presentNot checked yet.
- ·License declaredNot checked yet.
- ·Tests presentNot checked yet.
- ·Dependencies pinnedNot checked yet.
- ·No dynamic code executionNot checked yet.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
README
Jenkins MCP Server (Go)
Overview
- Purpose: Pure Go MCP server exposing Jenkins API functionality as MCP tools.
- Transport: stdio (newline-delimited JSON) via
mcp-go-sdk.
Features
-
Tool:
jenkins_get_jobs- Description: Get list of Jenkins jobs with their current status
- Arguments: None
- Returns: JSON array of jobs with basic information:
name,url,color,buildable,description, andlastBuildwhen available
-
Tool:
jenkins_get_job- Description: Get detailed information about a specific Jenkins job by name, including recent builds and any queued items for this job
- Arguments:
name(required) - Name of the Jenkins jobmax_builds(optional, default: 20) - Maximum number of recent builds to return
- Returns: JSON object with detailed job information including recent build history and
queuedBuilds(if present)
-
Tool:
jenkins_get_running_builds- Description: Get list of currently running and queued Jenkins builds
- Arguments: None
- Returns: JSON object with:
builds: running builds with fields:jobName,buildNumber,url,startTime(RFC3339 string),duration(human-readable), optionalprogressqueuedBuilds: queued items with fields:jobName,url,queueId,why,queuedSince(RFC3339 string),stuck,buildable, optionalparameters
-
Tool:
jenkins_get_build- Description: Get detailed information about a specific Jenkins build by job name and build number
- Arguments:
job_name(required) - Name/path of the Jenkins job (supports folders)build_number(required) - Build number
- Returns: JSON object with build details including
result,building, timestamps, durations, display name, and extracted buildparameters
-
Tool:
jenkins_get_build_logs- Description: Get build logs for a specific Jenkins job and build number with pagination support
- Arguments:
job_name(required) - Name of the Jenkins jobbuild_number(required) - Build number to get logs foroffset(optional, default: 0) - Starting byte offset in the log filelength(optional, default: 8192) - Maximum number of bytes to retrieve
- Returns: JSON object with log metadata:
jobName,buildNumber,offset,length,totalSize,hasMore, andlogs
-
Tool:
jenkins_get_build_log_tail- Description: Get the tail of build logs - useful for quick failure analysis
- Arguments:
job_name(required) - Name of the Jenkins jobbuild_number(required) - Build number to get logs formax_length(optional, default: 8192) - Maximum number of bytes to retrieve from the end
- Returns: JSON object with log metadata:
jobName,buildNumber,offset,length,totalSize,hasMore, andlogs
-
Tool:
jenkins_start_job- Description: Trigger a Jenkins job build with optional parameters
- Arguments:
job_name(required) - Name/path of the Jenkins job (supports folders)parameters(optional) - Object map of build parameters
- Returns: JSON with
jobNameandqueueUrl(if available), plusqueueIdwhen Jenkins returns a queue item. The server waits briefly for Jenkins to assign an executable and may also includebuildUrlandbuildNumber; total queue wait is bounded to 30 seconds.
-
Tool:
jenkins_get_queue_item- Description: Get the current state of a Jenkins queue item, including the assigned build when available
- Arguments:
queue_id(required) - Jenkins queue item ID
- Returns: JSON object with queue item details including
jobName,why,queuedSince,cancelled, andexecutablewhen a build has been assigned
-
Tool:
jenkins_wait_for_queue_item- Description: Wait for a Jenkins queue item to receive a build assignment, be cancelled, or timeout
- Arguments:
queue_id(required) - Jenkins queue item IDtimeout_seconds(optional, default: 30) - Maximum time to wait in secondspoll_interval_seconds(optional, default: 2) - Polling interval in seconds
- Returns: JSON object with
status(started,cancelled, ortimeout),waitTime,timedOut, latestqueueItem, andbuildwhen assigned
-
Tool:
jenkins_wait_for_running_build- Description: Wait for a running Jenkins build to complete or timeout
- Arguments:
job_name(required) - Name of the Jenkins jobbuild_number(required) - Build number to wait fortimeout_seconds(optional, default: 600) - Maximum time to wait in seconds
- Returns: JSON object with build completion status and timing information
-
Tool:
jenkins_search_builds- Description: Search Jenkins builds by result and/or build parameters
- Arguments:
job_name(required) - Name of the Jenkins jobresult(optional) - Filter by build result:SUCCESS,FAILURE,ABORTEDparams(optional) - Filter by build parameters askey=valuestrings; an empty value (key=) matches an empty or unset parameterlimit(optional, default: 5) - Maximum number of matching results to returnmax_lookback(optional, default: 100) - Maximum number of builds to scan
- Returns: JSON object with matching
buildsandscannedcount
-
Tool:
jenkins_stop_build- Description: Stop a running Jenkins build by job name and build number
- Arguments:
job_name(required) - Name/path of the Jenkins job (supports folders)build_number(required) - Build number to stop
- Returns: JSON object with
jobName,buildNumber, andstopped
Job Format
Each job returned by jenkins_get_jobs and jenkins_get_job includes:
{
"name": "job-name",
"url": "https://jenkins.example.com/job/job-name/",
"color": "blue",
"buildable": true,
"description": "Job description",
"recentBuilds": [
{
"number": 123,
"url": "https://jenkins.example.com/job/job-name/123/",
"building": false,
"result": "SUCCESS",
"timestamp": "2023-08-21T12:00:00Z",
"duration": "2m0s"
},
{
"number": 122,
"url": "https://jenkins.example.com/job/job-name/122/",
"building": false,
"result": "SUCCESS",
"timestamp": "2023-08-21T11:40:00Z",
"duration": "1m58s"
}
],
"parameters": [
{
"name": "MERGE_FEATURE",
"type": "StringParameterDefinition",
"description": "Feature branch to merge",
"defaultValue": "",
"choices": []
},
{
"name": "BUILD_TYPE",
"type": "ChoiceParameterDefinition",
"description": "Type of build to perform",
"defaultValue": "release",
"choices": ["debug", "release", "test"]
}
]
}
Note: recentBuilds are sorted by build number (descending - most recent first) and both lastBuild and recentBuilds fields are omitted when empty.
Note: The jenkins_get_job tool returns individual jobs with full parameter information and recent build history (up to max_builds, default 20, sorted by number descending), while jenkins_get_jobs returns only basic job fields (no parameters or recentBuilds) for performance; it may include lastBuild when available.
Running Build Format
Each running build returned by jenkins_get_running_builds includes:
{
"jobName": "job-name",
"buildNumber": 124,
"url": "https://jenkins.example.com/job/job-name/124/",
"startTime": "2023-08-21T12:01:40Z",
"duration": "45s",
"progress": 75
}
Queued Build Format Each queued build item includes:
{
"jobName": "job-name",
"url": "https://jenkins.example.com/job/job-name/",
"queueId": 19069,
"why": "Build is waiting for an available executor",
"queuedSince": "2023-08-21T12:01:00Z",
"stuck": false,
"buildable": true,
"parameters": "PARAM1=foo\nPARAM2=bar"
}
Build Logs Result
jenkins_get_build_logs returns plain text containing the requested portion of the log. Control pagination via the offset and length arguments. Example output:
Started by user admin
Building in workspace /var/lib/jenkins/workspace/job-name
...
Wait for Build Format
Build wait results returned by jenkins_wait_for_running_build include:
{
"jobName": "job-name",
"buildNumber": 124,
"status": "success",
"result": "SUCCESS",
"duration": "2m0s",
"waitTime": "45s",
"timedOut": false
}
Status values:
success: Build completed successfullyfailure: Build failedunstable: Build completed but with test failures or warningsaborted: Build was manually abortedtimeout: Wait operation timed out before build completedunknown: Build completed with an unrecognized result
Jenkins Color Codes
blue: Last build was successfulred: Last build failedyellow: Last build was unstablegrey: Job has never been builtdisabled: Job is disabledaborted: Last build was aborted*_anime: Job is currently building (e.g.,blue_anime)
Requirements
- CLI:
-url <jenkins_url>(required) - Jenkins server URL - CLI:
-auth "<user>:<api_token>"(optional) - Jenkins authentication credentials - ENV:
JENKINS_MCP_AUTH="<user>:<api_token>"(optional) - Alternative to-authflag - CLI:
-stdio(default true) for stdio, or-http <addr>for Streamable HTTP.
Authentication Authentication can be provided in two ways:
- Command line flag:
-auth "user:token" - Environment variable:
JENKINS_MCP_AUTH="user:token"
If both are provided, the -auth flag takes precedence.
Run (stdio)
- Build:
go build -o jenkins-mcp-go . - Run (stdio): execute with required parameters; an MCP host (e.g., Claude Desktop) should launch this binary with stdio wiring.
Examples:
JENKINS_MCP_AUTH="myuser:myapitoken" ./jenkins-mcp-go -url "https://jenkins.example.com"- HTTP mode:
JENKINS_MCP_AUTH="myuser:myapitoken" ./jenkins-mcp-go -url "https://jenkins.example.com" -http :8080
Smithery / Hosts
- Configure your MCP host to run this server over stdio with the required parameters.
API Details
- Uses Jenkins REST API
/api/jsonendpoint to fetch job list - Uses Jenkins REST API
/job/{jobName}/api/jsonendpoint to fetch specific job details - Uses Jenkins REST API
/computer/api/jsonendpoint to fetch running builds from executors - Uses Jenkins REST API
/queue/api/jsonand/queue/item/{queueId}/api/jsonendpoints for queued builds and queue item tracking - Uses Jenkins REST API
/job/{jobName}/{buildNumber}/logText/progressiveTextendpoint for build logs - Implements smart tail log retrieval by calculating offset from total log size
- Implements proper basic authentication and includes Jenkins CSRF crumb for build triggers when available
- 30-second timeout for API calls, 60-second timeout for log retrieval
- Graceful error handling for missing jobs/builds
- Parses job names and build numbers from executor information
- Supports nested jobs/folders via Jenkins path convention
/job/<seg>/job/<seg>/...and proper URL escaping - Supports log pagination with offset and length parameters
- Optimized tail log retrieval for quick failure analysis
Notes
- Input validation: enforces required URL and auth parameters
- Auth format: must be "user:api_token" format
- Errors: returned as tool results with
isError=truefor LLM visibility - Timestamps are RFC3339 strings; durations are human-readable (e.g., "45s", "2m5s")
Transport
-http <addr>starts Streamable HTTP; otherwise-stdioruns by default.- If
-stdio=falseand no-httpis provided, the server exits with an error.
TODO
- Add more Jenkins tools (get build status, etc.)
- Add filtering options (by job name pattern, status, etc.)
- Add SSL certificate validation options
- Optionally return structured metadata for log tools
- Optional
waitbehavior modes forjenkins_start_job
README mirrored from the source repository 4 months ago. The original is authoritative.