host-mcp-jenkins
Provides tools for interacting with Jenkins via REST API, enabling AI agents to manage jobs, builds, logs, SCM configurations, and test results on a Jenkins instance.
Click on "Install 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., "@host-mcp-jenkinsget the latest build status of 'my-app'"
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.
host-mcp-jenkins
A local MCP (Model Context Protocol) server for Jenkins that replicates the Jenkins MCP Server Plugin by calling Jenkins REST API over HTTP.
No plugin installation required on your Jenkins instance.
Why?
The official Jenkins MCP Server Plugin must be installed on the Jenkins server. If you don't have admin rights to install plugins, host-mcp-jenkins gives you the same 17 MCP tools running locally, calling Jenkins REST API with your personal API token.
Compatibility
Jenkins Version | Status |
LTS 2.462.x+ | ✅ Fully supported |
LTS 2.426.x | ✅ Fully supported |
LTS 2.401.x | ✅ Fully supported |
LTS 2.361.x | ✅ Fully supported |
Weekly (latest) | ✅ Fully supported |
Minimum version: Jenkins 2.164+. All REST API endpoints used by this server have been available in Jenkins core since the earliest 2.x releases. The
treequery parameter (used for response field filtering) was introduced in Jenkins 1.464.
Plugin Dependencies
Most tools (11 out of 17) use only the Jenkins core REST API and require no plugins. Some tool categories depend on specific plugins:
Tools | Required Plugin | Min Plugin Version | Notes |
| 2.0+ | SCM data exposed via Git plugin actions | |
| 1.0+ | Bundled with Jenkins since 1.577 | |
| 1.33+ | Flaky test detection support required |
Note: The Git Plugin is installed on ~96% of Jenkins controllers. The JUnit Plugin is installed on ~97% and has been bundled with Jenkins by default since version 1.577. If these plugins are not present, the corresponding tools will return empty results or 404 errors.
API Endpoint Matrix
Every tool maps to one or more Jenkins REST API endpoints. All JSON endpoints support the tree parameter for field filtering.
Tool | Method | REST Endpoint | Dependency |
| GET |
| Core |
| GET |
| Core |
| GET |
| Core |
| POST |
| Core |
| POST |
| Core |
| GET |
| Core |
| GET |
| Core |
| GET |
| Core |
| GET |
| Core |
| GET |
| Core |
| GET |
| Core |
| GET |
| Git Plugin |
| GET |
| Git Plugin |
| GET |
| Core |
| GET |
| Git Plugin |
| GET |
| JUnit Plugin |
| GET |
| JUnit Plugin ≥ 1.33 |
Quick Start
npx @mister-good-deal/host-mcp-jenkins \
--jenkins-url https://jenkins.example.com \
--jenkins-user your-username \
--jenkins-token your-api-tokenHTTP Transport
To start the server with Streamable HTTP transport instead of stdio:
npx @mister-good-deal/host-mcp-jenkins \
--jenkins-url https://jenkins.example.com \
--jenkins-user your-username \
--jenkins-token your-api-token \
--transport http \
--port 3000This exposes:
Health check:
GET /health→{"status":"ok"}MCP endpoint:
/mcp(Streamable HTTP)Graceful shutdown on
SIGINT/SIGTERM
Configuration
All options support both CLI arguments and environment variables (CLI takes precedence):
CLI Argument | Environment Variable | Required | Default | Description |
|
| ✅ | — | Jenkins base URL |
|
| ✅ | — | Jenkins username |
|
| ✅ | — | Jenkins API token |
|
|
| Skip TLS certificate verification | |
|
|
|
| |
|
|
| HTTP request timeout (ms) | |
|
|
| Max retries for transient errors (429/5xx) | |
|
|
| Base delay in ms for exponential backoff | |
|
|
| Transport type ( | |
|
|
| HTTP server port (only with |
Getting a Jenkins API Token
Log in to Jenkins
Click your username (top-right) → Configure
Under API Token, click Add new Token
Name it and click Generate — copy the token value
MCP Client Configuration
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"jenkins": {
"command": "npx",
"args": ["-y", "@mister-good-deal/host-mcp-jenkins"],
"env": {
"JENKINS_URL": "https://jenkins.example.com",
"JENKINS_USER": "your-username",
"JENKINS_API_TOKEN": "your-api-token"
}
}
}
}VS Code
Add to .vscode/mcp.json:
{
"servers": {
"jenkins": {
"command": "npx",
"args": ["-y", "@mister-good-deal/host-mcp-jenkins"],
"env": {
"JENKINS_URL": "https://jenkins.example.com",
"JENKINS_USER": "your-username",
"JENKINS_API_TOKEN": "your-api-token"
}
}
}
}Cursor
Add to your MCP server configuration:
{
"mcpServers": {
"jenkins": {
"command": "npx",
"args": ["-y", "@mister-good-deal/host-mcp-jenkins", "--jenkins-url", "https://jenkins.example.com", "--jenkins-user", "your-username", "--jenkins-token", "your-api-token"]
}
}
}Note for contributors: If you're running the MCP server from within this workspace (where
package.jsondeclares"packageManager": "pnpm@...") andnpxfails withhost-mcp-jenkins: not found, usepnpm dlxinstead. This happens because corepack interceptsnpxwhen run from a pnpm-managed project.
HTTP Transport (Remote)
When the server is running with --transport http, MCP clients can connect via HTTP URL instead of launching a subprocess:
Claude Desktop / VS Code / Cursor:
{
"mcpServers": {
"jenkins": {
"url": "http://localhost:3000/mcp"
}
}
}Docker Usage
HTTP transport enables AI agents running inside Docker containers to connect to the MCP server without needing an MCP gateway.
Running the MCP Server on the Host
Start the server with HTTP transport on the host machine:
npx @mister-good-deal/host-mcp-jenkins \
--jenkins-url https://jenkins.example.com \
--jenkins-user your-username \
--jenkins-token your-api-token \
--transport http \
--port 3000From inside a Docker container, connect to http://host.docker.internal:3000/mcp.
Docker Compose Example
services:
ai-agent:
image: your-ai-agent:latest
environment:
MCP_SERVER_URL: "http://host.docker.internal:3000/mcp"
extra_hosts:
- "host.docker.internal:host-gateway"Note: The
extra_hostsmapping is required on Linux. On macOS and Windows, Docker Desktop resolveshost.docker.internalautomatically.
Available Tools (17)
Full parity with the Jenkins MCP Server Plugin, plus extras:
Core (8)
Tool | Description |
| Get a Jenkins job by its full path |
| Get a paginated list of Jenkins jobs, sorted by name |
| Get a specific build or the last build of a Jenkins job |
| Trigger a build for a Jenkins job (supports parameters) |
| Update build display name and/or description |
| Get information about the currently authenticated user |
| Check the health and readiness status of a Jenkins instance |
| Get the queue item details by its ID |
Build Logs (3)
Tool | Description |
| Retrieve paginated log lines for a build |
| Incrementally retrieve build logs via Jenkins progressive text API |
| Search for log lines matching a pattern (string or regex) |
SCM (4)
Tool | Description |
| Retrieve SCM configurations of a Jenkins job |
| Retrieve SCM configurations of a Jenkins build |
| Retrieve change log sets of a Jenkins build |
| Find jobs that use a specified git SCM URL |
Test Results (2)
Tool | Description |
| Retrieve test results for a build (optionally only failures) |
| Retrieve flaky test failures for a build |
Comparison with Jenkins MCP Server Plugin
Feature | Jenkins Plugin | host-mcp-jenkins |
Installation | Requires Jenkins admin | None — runs locally |
Transport | SSE, Streamable HTTP, Stateless | stdio (default), Streamable HTTP |
Authentication | Jenkins built-in | API token over HTTP Basic |
Tools | 16 | 17 (full parity + progressive log) |
Response format |
| Same |
| Via internal API | Forwarded to REST API |
Development
# Install dependencies
pnpm install
# Build
pnpm run build
# Run in development mode
pnpm run dev -- --jenkins-url https://jenkins.example.com --jenkins-user admin --jenkins-token TOKEN
# Lint
pnpm run lint
# Unit tests
pnpm test
# Integration tests (requires Docker)
pnpm run test:integrationLicense
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mister-good-deal/host-mcp-jenkins'
If you have feedback or need assistance with the MCP directory API, please join our Discord server