MCP Jenkins
Provides tools for interacting with Jenkins, enabling management and inspection of items/jobs, builds, nodes, queues, views, plugins, artifacts, pipeline inputs, and Groovy script execution.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Jenkinstrigger the deploy-prod job and show me its build status"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Installation
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-httpRelated MCP server: Jenkins MCP Server
Line Arguments
When using command line arguments, you can specify the Jenkins server details as follows:
# Simple streamable-http example
uvx mcp-jenkins --transport streamable-httpArgument | Description | Required |
| Path to a | No |
| The URL of the Jenkins server. (Http app can set it via headers | No |
| The username for Jenkins authentication. (Http app can set it via headers | No |
| The password or API token for Jenkins authentication. (Http app can set it via headers | No |
| Timeout for Jenkins API requests in seconds. Default is | No |
| Whether to verify SSL certificates when connecting to Jenkins. Default is to verify. | No |
| Whether to use a singleton Jenkins client for all requests in the same session. Default is True. | No |
| Whether to enable read-only mode. Default is False | No |
| Transport method to use for communication. Options are | No |
| Host address for | No |
| Port number for | No |
Environment Variables / .env file
Instead of passing credentials on the command line, you can set them as environment variables, or put them in a .env file:
JENKINS_URL=https://jenkins.example.com
JENKINS_USERNAME=alice
JENKINS_PASSWORD=xxxx
JENKINS_TIMEOUT=5
JENKINS_VERIFY_SSL=trueIf a .env file is present in the current directory (or a parent directory), it is loaded automatically — no flag needed:
uvx mcp-jenkins --transport streamable-httpTo load a .env file from a specific location, use --env-file:
uvx mcp-jenkins --env-file /path/to/.env --transport streamable-httpValues already set in the real environment take precedence over the .env file, and any --jenkins-* CLI flag takes precedence over both.
Configuration and Usage
Jetbrains Github Copilot
Open Jetbrains Settings
Navigate to Github Copilot > MCP > Configure
Add the following configuration:
{
"servers": {
"my-mcp-server": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-jenkins",
"--jenkins-url=xxx",
"--jenkins-username=xxx",
"--jenkins-password=xxx"
]
}
}
}VSCode Copilot Chat
Create
.vscodefolder withmcp.jsonfile in you workspace for local setup or editsettings.jsontrough settings menu.Insert the following configuration:
SSE mode
{
"servers": {
"jenkins": {
"url": "http://localhost:9887/sse",
"type": "sse"
}
}
}Streamable-Http mode
{
"servers": {
"mcp-jenkins-mcp": {
"autoApprove": [],
"disabled": false,
"timeout": 60,
"type": "streamableHttp",
"url": "http://localhost:9887/mcp"
}
}
}Run the Jenkins MCP server with the following command:
uvx mcp-jenkins \
--jenkins-url xxx \
--jenkins-username xxx \
--jenkins-password xxx \
--transport sseHealth Check Endpoint
When running with --transport streamable-http or --transport sse, the server exposes a plain HTTP liveness endpoint:
GET /healthz -> 200 OKIt 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:
livenessProbe:
httpGet:
path: /healthz
port: 9887
initialDelaySeconds: 5
periodSeconds: 10Note: this is a liveness check only — it does not verify connectivity to the upstream Jenkins server.
Available Tools
Tool | Description |
| Get a specific item by name. |
| Get the configuration of a specific item. |
| Get the parameters of a specific item. |
| Get all items in Jenkins. |
| Query items based on pattern. |
| Build a item. |
| Get all nodes in Jenkins. |
| Get a specific node by name. |
| Get the configuration of a specific node. |
| Get all queue items in Jenkins. |
| Get a specific queue item by ID. |
| Cancel a specific queue item by ID. |
| Get a specific build by job name and build number. |
| Get scripts associated with a specific build. |
| Get the console output of a specific build. |
| Get the parameters of a specific build. |
| Get the test report of a specific build. |
| Get the failing tests of a specific build. |
| Get all currently running builds in Jenkins. |
| Stop a specific build by job name and build number. |
| Get the pending input steps of a build paused for input. |
| Proceed with or abort a pipeline input step of a build. |
| List the artifacts of a specific build. |
| Download an artifact from a specific build. |
| Get the direct URL of an artifact from a specific build. |
| Get a specific view by name. |
| Get the configuration of a specific view. |
| Get all installed plugins. |
| Get a specific plugin by short name. |
| Get plugins with problems (missing dependencies, version mismatch, etc.). |
| Get plugins that can be downgraded. |
| Get plugins that have available updates. |
| Get dependency graph for a plugin in Graphviz format. |
| Execute an arbitrary Groovy script on Jenkins. |
Note: get_pending_inputs reads the wfapi endpoint served by the pipeline-rest-api plugin (bundled with
pipeline-stage-view). submit_input only needs that plugin when input_id is omitted — pass input_id
explicitly and it works on any Jenkins with the pipeline-input-step plugin.
Contributing
License
Licensed under MIT - see LICENSE file. This is not an official Jenkins product.
Star History
This server cannot be deployed
Maintenance
Related MCP Connectors
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Context and control for any AI. Agent identity, scoped access, and proof across tools.
The Buildkite MCP server exposes Buildkite product data (pipelines, builds, jobs, and test data) to AI tools, editors, and agents through the Model Context Protocol. It provides capabilities including pipeline creation and management, build monitoring with specialized tools like 'wait_for_build', efficient log querying using Apache Parquet conversion and caching, and OAuth-based authentication for both read-write and read-only access to Buildkite's REST API.
Related MCP Servers
- AlicenseBqualityAmaintenanceThe Model Context Protocol (MCP) Jenkins integration 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.36154MIT
- AlicenseNot gradedqualityCmaintenanceProvides Jenkins CI/CD integration for AI assistants through the Model Context Protocol, enabling job management, build control, and system administration via natural language commands.225 PyPI1MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI language models to securely inspect and control Jenkins through natural language, covering jobs, builds and their console output/artifacts, queue items, nodes, views and plugins, plus triggering or stopping builds, submitting pipeline inputs, and running Groovy scripts. Read-only mode and CLI, environment-variable, or HTTP-header based authentication keep credentials and data under the user's control.-
- FlicenseNot gradedqualityAmaintenanceEnables AI language models to securely interact with Jenkins through the Model Context Protocol, exposing tools to query and manage items, nodes, queues, builds, artifacts, views, plugins, and execute Groovy scripts while maintaining data privacy and security.-