Skip to content
Back to search

mcp-jenkins

The Model Context Protocol (MCP) is an open-source implementation that bridges Jenkins with AI language models following Anthropic's MCP specification. This project enables secure, contextual AI interactions with Jenkins tools while maintaining data privacy and security.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/lanbaoshen/mcp-jenkins with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/lanbaoshen/mcp-jenkins'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/lanbaoshen--mcp-jenkins/badge.svg)](/listings/lanbaoshen--mcp-jenkins)

HTML

<a href="/listings/lanbaoshen--mcp-jenkins"><img src="/api/listings/lanbaoshen--mcp-jenkins/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Choose one of these installation methods:

# Using uv (recommended)
pip install uv
uvx mcp-jenkins

# Using pip
pip install mcp-jenkins
mcp-jenkins

# Docker
docker pull ghcr.io/lanbaoshen/mcp-jenkins:latest
docker run -p 9887:9887 --rm ghcr.io/lanbaoshen/mcp-jenkins:latest --transport streamable-http

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 203 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # MCP Jenkins
  2. ![PyPI Version](https://img.shields.io/pypi/v/mcp-jenkins)
  3. [![PyPI Downloads](https://static.pepy.tech/badge/mcp-jenkins)](https://pepy.tech/projects/mcp-jenkins)
  4. [![test](https://github.com/lanbaoshen/mcp-jenkins/actions/workflows/test.yml/badge.svg)](https://github.com/lanbaoshen/mcp-jenkins/actions/workflows/test.yml/badge.svg)
  5. [![codecov](https://codecov.io/gh/lanbaoshen/mcp-jenkins/branch/master/graph/badge.svg)](https://codecov.io/gh/lanbaoshen/mcp-jenkins)
  6. ![License](https://img.shields.io/github/license/lanbaoshen/mcp-jenkins)
  7. The Model Context Protocol (MCP) is an open-source implementation that bridges Jenkins with AI language models following Anthropic's MCP specification. This project enables secure, contextual AI interactions with Jenkins tools while maintaining data privacy and security.
  8. ## Installation
  9. Choose one of these installation methods:
  10. ```
  11. # Using uv (recommended)
  12. pip install uv
  13. uvx mcp-jenkins
  14. # Using pip
  15. pip install mcp-jenkins
  16. mcp-jenkins
  17. # Docker
  18. docker pull ghcr.io/lanbaoshen/mcp-jenkins:latest
  19. docker run -p 9887:9887 --rm ghcr.io/lanbaoshen/mcp-jenkins:latest --transport streamable-http
  20. ```
  21. ## Line Arguments
  22. When using command line arguments, you can specify the Jenkins server details as follows:
  23. ```shell
  24. # Simple streamable-http example
  25. uvx mcp-jenkins --transport streamable-http
  26. ```
  27. | Argument | Description | Required |
  28. |--------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|----------|
  29. | `--env-file` | Path to a `.env` file to load configuration from. See [Environment Variables / .env file](#environment-variables--env-file) below. | No |
  30. | `--jenkins-url` | The URL of the Jenkins server. (Http app can set it via headers `x-jenkins-url`) | No |
  31. | `--jenkins-username` | The username for Jenkins authentication. (Http app can set it via headers `x-jenkins-username`) Set it together with the password, or leave both unset to access Jenkins anonymously. | No |
  32. | `--jenkins-password` | The password or API token for Jenkins authentication. (Http app can set it via headers `x-jenkins-password`) Set it together with the username, or leave both unset to access Jenkins anonymously: what the server can then do is decided by the anonymous user's permissions in Jenkins. | No |
  33. | `--jenkins-timeout` | Timeout for Jenkins API requests in seconds. Default is `5` seconds. | No |
  34. | `--jenkins-verify-ssl/--no-jenkins-verify-ssl` | Whether to verify SSL certificates when connecting to Jenkins. Default is to verify. | No |
  35. | `--jenkins-session-singleton/--no-jenkins-session-singleton` | Whether to use a singleton Jenkins client for all requests in the same session. Default is True. | No |
  36. | `--read-only` | Whether to enable read-only mode. Default is False | No |
  37. | `--transport` | Transport method to use for communication. Options are `stdio`, `sse` or `streamable-http`. Default is `stdio`. | No |
  38. | `--host` | Host address for `streamable-http` transport. Default is `0.0.0.0` | No |
  39. | `--port` | Port number for `streamable-http` transport. Default is `9887`. | No |
  40. ## Environment Variables / .env file
  41. Instead of passing credentials on the command line, you can set them as environment variables, or put them in a `.env` file:
  42. ```
  43. JENKINS_URL=https://jenkins.example.com
  44. JENKINS_USERNAME=alice
  45. JENKINS_PASSWORD=xxxx
  46. JENKINS_TIMEOUT=5
  47. JENKINS_VERIFY_SSL=true
  48. ```
  49. If a `.env` file is present in the current directory (or a parent directory), it is loaded automatically — no flag needed:
  50. ```shell
  51. uvx mcp-jenkins --transport streamable-http
  52. ```
  53. To load a `.env` file from a specific location, use `--env-file`:
  54. ```shell
  55. uvx mcp-jenkins --env-file /path/to/.env --transport streamable-http
  56. ```
  57. Values already set in the real environment take precedence over the `.env` file, and any `--jenkins-*` CLI flag takes precedence over both.
  58. ## Configuration and Usage
  59. ### Jetbrains Github Copilot
  60. 1. Open Jetbrains Settings
  61. 2. Navigate to Github Copilot > MCP > Configure
  62. 3. Add the following configuration:
  63. ```json
  64. {
  65. "servers": {
  66. "my-mcp-server": {
  67. "type": "stdio",
  68. "command": "uvx",
  69. "args": [
  70. "mcp-jenkins",
  71. "--jenkins-url=xxx",
  72. "--jenkins-username=xxx",
  73. "--jenkins-password=xxx"
  74. ]
  75. }
  76. }
  77. }
  78. ```
  79. ### VSCode Copilot Chat
  80. 1. Create `.vscode` folder with `mcp.json` file in you workspace for local setup or edit `settings.json` trough settings menu.
  81. 2. Insert the following configuration:
  82. - SSE mode
  83. ```json
  84. {
  85. "servers": {
  86. "jenkins": {
  87. "url": "http://localhost:9887/sse",
  88. "type": "sse"
  89. }
  90. }
  91. }
  92. ```
  93. - Streamable-Http mode
  94. ```json
  95. {
  96. "servers": {
  97. "mcp-jenkins-mcp": {
  98. "autoApprove": [],
  99. "disabled": false,
  100. "timeout": 60,
  101. "type": "streamableHttp",
  102. "url": "http://localhost:9887/mcp"
  103. }
  104. }
  105. }
  106. ```
  107. Run the Jenkins MCP server with the following command:
  108. ```shell
  109. uvx mcp-jenkins \
  110. --jenkins-url xxx \
  111. --jenkins-username xxx \
  112. --jenkins-password xxx \
  113. --transport sse
  114. ```
  115. ## Health Check Endpoint
  116. When running with `--transport streamable-http` or `--transport sse`, the server exposes a plain HTTP liveness endpoint:
  117. ```
  118. GET /healthz -> 200 OK
  119. ```
  120. It always returns `200` and bypasses the `x-jenkins-*` auth headers, so it is safe to use directly as a Kubernetes liveness/readiness probe without any Jenkins credentials. Example probe:
  121. ```yaml
  122. livenessProbe:
  123. httpGet:
  124. path: /healthz
  125. port: 9887
  126. initialDelaySeconds: 5
  127. periodSeconds: 10
  128. ```
  129. Note: this is a liveness check only — it does not verify connectivity to the upstream Jenkins server.
  130. ## Available Tools
  131. | Tool | Description |
  132. |----------------------------|-----------------------------------------------------|
  133. | `get_item` | Get a specific item by name. |
  134. | `get_item_config` | Get the configuration of a specific item. |
  135. | `get_item_parameters` | Get the parameters of a specific item. |
  136. | `get_all_items` | Get all items in Jenkins. |
  137. | `query_items` | Query items based on pattern. |
  138. | `build_item` | Build a item. |
  139. | `get_all_nodes` | Get all nodes in Jenkins. |
  140. | `get_node` | Get a specific node by name. |
  141. | `get_node_config` | Get the configuration of a specific node. |
  142. | `get_all_queue_items` | Get all queue items in Jenkins. |
  143. | `get_queue_item` | Get a specific queue item by ID. |
  144. | `cancel_queue_item` | Cancel a specific queue item by ID. |
  145. | `get_build` | Get a specific build by job name and build number. |
  146. | `get_build_scripts` | Get scripts associated with a specific build. |
  147. | `get_build_console_output` | Get the console output of a specific build. |
  148. | `get_build_parameters` | Get the parameters of a specific build. |
  149. | `get_build_test_report` | Get the test report of a specific build. |
  150. | `get_build_test_failures` | Get the failing tests of a specific build. |
  151. | `get_running_builds` | Get all currently running builds in Jenkins. |
  152. | `stop_build` | Stop a specific build by job name and build number. |
  153. | `get_pending_inputs` | Get the pending input steps of a build paused for input. |
  154. | `submit_input` | Proceed with or abort a pipeline input step of a build. |
  155. | `get_all_build_artifacts` | List the artifacts of a specific build. |
  156. | `get_build_artifact` | Download an artifact from a specific build. |
  157. | `get_build_artifact_url` | Get the direct URL of an artifact from a specific build. |
  158. | `get_view` | Get a specific view by name. |
  159. | `get_all_views` | Get the configuration of a specific view. |
  160. | `get_all_plugins` | Get all installed plugins. |
  161. | `get_plugin` | Get a specific plugin by short name. |
  162. | `get_plugins_with_problems` | Get plugins with problems (missing dependencies, version mismatch, etc.). |
  163. | `get_plugins_with_backup` | Get plugins that can be downgraded. |
  164. | `get_plugins_with_updates` | Get plugins that have available updates. |
  165. | `get_plugin_dependency_graph` | Get dependency graph for a plugin in Graphviz format. |
  166. | `run_groovy_script` | Execute an arbitrary Groovy script on Jenkins. |
  167. Note: `get_pending_inputs` reads the `wfapi` endpoint served by the `pipeline-rest-api` plugin (bundled with
  168. `pipeline-stage-view`). `submit_input` only needs that plugin when `input_id` is omitted — pass `input_id`
  169. explicitly and it works on any Jenkins with the `pipeline-input-step` plugin.
  170. ## Contributing
  171. [CONTRIBUTING.md](CONTRIBUTING.md)
  172. ## License
  173. Licensed under MIT - see [LICENSE](LICENSE) file. This is not an official Jenkins product.
  174. ## Star History
  175. [![Star History Chart](https://api.star-history.com/svg?repos=lanbaoshen/mcp-jenkins&type=Date)](https://www.star-history.com/#lanbaoshen/mcp-jenkins&Date)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.