Jenkins MCP server: 18 tools from a plugin
Jenkins becomes the server rather than connecting to one. What the eighteen tools reach, how log pagination works, and the four tools that change a build.
Last verified 1 September 2026 · from The Jenkins plugin repository and its own README
This page is one of 90 in a directory of monitoring and developer tools. Each page checks what an AI coding agent can get out of the tool through its MCP server, the connector that lets the agent query the tool directly.
Summary
Jenkins does not connect to an MCP server; a plugin turns the controller into one. The official jenkinsci/mcp-server-plugin documents 18 tools over jobs, builds, logs, test results and source control management (SCM) configuration.
It is built on the MCP Java SDK version 0.17.2 and implements MCP specification version 2025-06-18. It sets up its endpoints on installation, with no additional configuration.
Of the log tools, getBuildLog supports forward reads, end-relative reads with negative offsets, and cursor pagination, where each cursor is tied to the build that issued it.
What is the Jenkins MCP server?
It is an MCP server implemented as a Jenkins plugin, exposing the controller over the Model Context Protocol. Because it runs inside Jenkins, there is no separate process to deploy.
The tool set follows the Jenkins object model: jobs, builds, the queue, test results and SCM configuration. getJobs pages through jobs by name and getBuild fetches a specific build or the last one.
Four tools go beyond reading. triggerBuild starts a build, and updateBuild changes a build's display name or description. rebuildBuild re-runs a build. replayBuild re-runs a Pipeline with a modified script.
Jenkins is a CI system, so it sits in CI and release, touches code and tests through test results, and reaches nothing in agent observability or cost.
| Part of the work | What Jenkins has here | Can an agent reach it |
|---|---|---|
| Code, tests & review | Test results, SCM configuration, change sets | Partial. Test results and change sets are reachable; there is no diff or review feature |
| CI & release | Jobs, builds, queue, logs, replay | Yes. Core strength, and the only connector here that runs inside the CI system itself |
| Production observability | Controller health | No. getStatus reports on Jenkins itself, not on your services |
| Agent observability & evals | None | No traces or evaluations for your own agents |
| AI cost management | None | No spend data of any kind |
In practice, Jenkins answers what ran, what it did and why it failed, and can start it again. It has no view of the running service, so a question about production behavior needs a telemetry connector beside it.
What can an AI agent do with Jenkins?
| Task | Tools | Works | Watch out for |
|---|---|---|---|
| Find a job | getJobs getJob findJobsWithScmUrl | Yes | getJobs is paginated and sorted by name |
| Check the last build | getBuild getQueueItem | Yes | getBuild fetches a specific build or the last one |
| Read a long build log | getBuildLog searchBuildLog | Yes | Cursor is tied to its build and rejected against a different one |
| See which tests failed | getTestResults | Yes | Returns test results for a specific build or the last one |
| Find what changed | getBuildChangeSets getJobScm getBuildScm | Yes | Change sets are Jenkins's record, not the repository's history |
| Run it again | triggerBuild rebuildBuild replayBuild | Yes | replayBuild runs a Pipeline again with a modified script |
| Annotate a build | updateBuild | Yes | Changes the build's display name or description |
getBuildLog returns a nextCursor on every response. Pass it back to continue the read without re-scanning. That is what makes a long log usable inside a context window.
18 tools documented, installed with the plugin
- Jobs3
getJobsgetJobfindJobsWithScmUrl- Builds2
getBuildgetQueueItem- Logs2
getBuildLogsearchBuildLog- Tests1
getTestResults- Source control3
getJobScmgetBuildScmgetBuildChangeSets- Pipeline scripts1
getReplayScripts- Session2
whoAmIgetStatus- Acting4Write
triggerBuildrebuildBuildreplayBuildupdateBuild
Counts come from the plugin's own README, read 24 August 2026. The server exists only inside a running controller, so there is no standalone process to capture tools/list from.
What connecting costs before the first question
A context window is the amount of text a model can hold at once. Eighteen tools load when the plugin is enabled. They cost 1,450 to 1,604 tokens on Claude. Jenkins is the server here rather than a client of one, so the definitions come from your own controller.
Four of the eighteen change a build. The context cost is the same whether you intend to use them or not, because the plugin registers the full set.
| Tool set | Tools | Tokens (GPT-5.6, GPT-5.5) | Tokens (GPT-4, GPT-3.5) | Tokens (Claude Haiku 4.5 to Opus 5) | Share of a 200,000-token window |
|---|---|---|---|---|---|
| Every tool documented | 18 | 472 to 640 | 472 to 640 | 1,450 to 1,604 | 0.2% to 0.8% |
Encodings: GPT-5.6, GPT-5.5 o200k_base; GPT-4, GPT-3.5 cl100k_base; Claude Haiku 4.5 to Opus 5 count_tokens. Counted from the 18 tool entries in the vendor's own documentation. That is the only public inventory.
The server could not be run for a live tools/list. So no input schemas are available. These figures cover each tool's name and description only. They are a floor, not the figure.
The Claude columns are measured through the API's count_tokens endpoint, with an empty schema per tool. So they cover the same content as the GPT columns. The range there is two tokenizer generations. Haiku 4.5 and Opus 4.6 sit at the low end. Opus 5 and Sonnet 5 sit at the high end. The gap between them is about a tenth.
Jenkins MCP server limits: where answers come back incomplete
The limits below come from logs being large and from the server living inside the thing it describes.
The agent says: “There is no error in the log.” It may have read part of it.
getBuildLog paginates and returns a nextCursor on every response. For forward and cursor reads totalLines is -1, because the read stops as soon as it has enough lines.
A response with nextCursor set and hasMoreContent false means everything written so far has been read while the build is still running.
Guard: Require the agent to say whether it read to the end, and to use searchBuildLog when looking for a specific pattern.
The agent says: “I have re-run it.” `replayBuild` can change the script.
rebuildBuild re-runs with the same parameters, while replayBuild runs a Pipeline again with a modified script supplied by the caller.
Guard: Set client approval for the four state-changing tools, and treat replayBuild as code execution on the controller.
The agent says: “Everything is healthy.” `getStatus` describes Jenkins.
getStatus checks the health and readiness of the Jenkins instance, and /mcp-health reports server status and connection counts. Neither says anything about a deployed service.
Guard: Have the agent name Jenkins as the subject of any health claim.
How to configure Jenkins MCP for agents
- 1
Decide who may trigger builds
triggerBuild,rebuildBuildandreplayBuildall start work, andreplayBuildruns a modified Pipeline script. - 2
Prefer streamable HTTP
The README recommends it. Streamable HTTP answers one request with one response, so it needs none of the keep-alive handling that server-sent events require.
- 3
Leave Origin validation on
The specification marks validating the
Originheader as a MUST, and the plugin validates it against the configured Jenkins root URL by default. - 4
Know what the health endpoint exposes
/mcp-healthreturns server status and active connection counts and, by design, requires no authentication.
Paste this into your agent’s instructions
Log reads are paginated and cursor-based, so a partial read looks like a complete one. The block makes the agent say which it did.
When you answer using Jenkins MCP tools, state: - The job and build number the answer covers. - Whether a log read was complete. getBuildLog paginates, and totalLines is -1 for forward and cursor reads. - Whether you called triggerBuild, rebuildBuild, replayBuild or updateBuild. All four change state. Never state that data does not exist. State that the build above returned no matching lines or results. Write your answer in ASD-STE100 Simplified Technical English. Use short sentences with one idea in each.
Do you need the MCP server at all?
Not for a scripted trigger. Jenkins has a REST API and a CLI, and for that either is simpler than a connector.
The connector earns its place on log reading. Cursor pagination and end-relative reads are exactly what a model needs to work through a long build log without exhausting its window.
For test analytics across runs rather than one build, ReportPortal or BuildPulse answer questions this does not.
Connect it when an agent is debugging a build. Use the REST API for scripted triggers.
Jenkins MCP server setup
Install the MCP Server plugin through the Jenkins plugin manager. The README states that it sets up the necessary endpoints and tools on installation.
Clients connect to the controller itself. The streamable HTTP endpoint is at /mcp-server/mcp under your Jenkins URL.
Claude Code
Jenkins authenticates the request with HTTP Basic, not a bearer token. Generate an API token from your user configuration, then encode it: echo -n "<username>:<token>" | base64. The plugin README notes that base64 is not encryption, so treat the encoded string as carefully as the token itself.
claude mcp add --transport http jenkins \ https://jenkins.internal/mcp-server/mcp \ --header "Authorization: Basic <user:token base64>"
Cursor
In ~/.cursor/mcp.json. The API token comes from your Jenkins user configuration.
{"mcpServers":{"jenkins":{
"url":"https://jenkins.internal/mcp-server/mcp",
"headers":{"Authorization":"Basic <user:token base64>"}}}}Codex CLI
Codex reads TOML, so the JSON blocks above will not transfer. The token still applies.
[mcp_servers.jenkins]
url = "https://jenkins.internal/mcp-server/mcp"
headers = { Authorization = "Basic <user:token base64>" }Every other client
Each block below is the configuration for one client, with the file path and the key that client expects.
Claude Desktop
macOS ~/Library/Application Support/Claude/claude_desktop_config.json. Windows %APPDATA%\Claude\claude_desktop_config.json. There is no CLI. Edit through Settings, Developer, Edit Config.
Quit and restart fully for changes to load. Paths in args must be absolute. Logs at ~/Library/Logs/Claude/mcp.log.
{"mcpServers":{"jenkins":{"url":"https://jenkins.internal/mcp-server/mcp",
"headers":{"Authorization":"Basic <user:token base64>"}}}}Gemini CLI
~/.gemini/settings.json globally, or .gemini/settings.json per project. Key mcpServers. CLI: gemini mcp add.
{"mcpServers":{"jenkins":{"url":"https://jenkins.internal/mcp-server/mcp",
"headers":{"Authorization":"Basic <user:token base64>"}}}}VS Code Copilot
.vscode/mcp.json per workspace, or your user profile. CLI: code --add-mcp.
{"servers":{"jenkins":{"url":"https://jenkins.internal/mcp-server/mcp",
"headers":{"Authorization":"Basic <user:token base64>"}}}}The key is `servers`, not `mcpServers`. VS Code is the only client that uses that name, and copying a config from anywhere else fails silently.
Windsurf
~/.codeium/windsurf/mcp_config.json, which is the path Windsurf documents. Key mcpServers, the same JSON shape as Cursor, carrying the same credential.
Zed
~/.config/zed/settings.json, carrying the same credential as the blocks above.
The key is `context_servers`. Zed does not call them MCP servers in config, so searching its settings for mcp finds nothing.
Google Antigravity
~/.gemini/config/mcp_config.json globally, or .agents/mcp_config.json per project. Key mcpServers. There is no CLI. Use the /mcp overlay in the editor. Supports stdio, streamable HTTP, SSE and websocket.
{"mcpServers":{"jenkins":{"url":"https://jenkins.internal/mcp-server/mcp",
"headers":{"Authorization":"Basic <user:token base64>"}}}}Amp (Sourcegraph)
~/.config/amp/settings.json or .amp/settings.json, carrying the same credential. The amp mcp CLI covers approve, doctor and oauth.
The key is `amp.mcpServers`, namespaced. A bare mcpServers block is ignored.
Cline
~/.cline/mcp.json per the docs. The source also reads ~/.cline/data/settings/cline_mcp_settings.json. Key mcpServers, standard JSON shape, carrying the same credential. Supports stdio, streamable HTTP and SSE.
Goose (Block)
~/.config/goose/config.yaml, carrying the same credential.
YAML, and servers are called `extensions`. Goose does not use the MCP vocabulary in config at all. Add one interactively with goose configure, or per session with goose session --with-extension.
Kiro (AWS)
.kiro/settings/mcp.json per workspace, or ~/.kiro/settings/mcp.json globally. Key mcpServers, standard JSON shape, carrying the same credential.
Warp
~/.warp/.mcp.json or .warp/.mcp.json. Key mcpServers, standard shape, carrying the same credential. Also addable through the /agent-add-mcp skill.
JetBrains Junie
.junie/mcp/mcp.json per project, or ~/.junie/mcp/mcp.json. Key mcpServers, carrying the same credential. Use /mcp in the CLI to manage.
Roo Code
.roo/mcp.json per project. The global file is mcp_settings.json, opened from the Roo Code MCP settings view with Edit Global MCP. Key mcpServers, carrying the same credential.
Continue
.continue/mcpServers/*.yaml, one file per server, carrying the same credential.
YAML, and `mcpServers` is a list, not an object. Every JSON client keys servers by name. Continue takes an array, so a converted config will not parse.
Trae
.trae/mcp.json per project, or paste into the UI under Raw Config (JSON). Key mcpServers, standard shape, carrying the same credential.
Devin
Devin has no config file to edit. Servers are added through a web form in the settings UI, and Devin's documentation states you do not need to write or paste JSON. The block below is the shape those fields describe, shown for reference. Either route uses the same credential.
Disabling the streamable endpoint
The plugin exposes a system property for turning the streamable HTTP endpoint off. No credentials appear here: this is a controller startup flag, and Jenkins still authorizes every request.
-Dio.jenkins.plugins.mcp.server.Endpoint\ .disableMcpStreamable=true
Health monitoring
The health endpoint deliberately requires no authentication, which is why it should not be exposed beyond your monitoring network.
curl https://jenkins.internal/mcp-health
Read-only access, permissions and security
Four tools change state
triggerBuild,rebuildBuild,replayBuildandupdateBuildstart or alter builds.replayBuildruns a modified scriptIt re-runs a Pipeline with a script the caller supplies, which is code execution on your controller.
The health endpoint is unauthenticated by design
/mcp-healthreturns status and active connection counts without a credential. The plugin does this by design, so keep the endpoint inside your monitoring network.Origin validation is on by default
The plugin validates the
Originheader against the configured Jenkins root URL, which the MCP specification requires.
Troubleshooting
- A cursor is rejected
- Cursors are tied to the job and build number they were issued for, and are rejected against a different build.
- A long tool call returns 504
- A slow
triggerBuildcan exceed a short proxy read timeout. The README notes raisingproxy_read_timeoutfor that case, regardless of transport. - Total line count looks wrong
totalLinesis exact only for end-relative reads. Forward and cursor reads return -1, because they stop as soon as they have enough lines.
Jenkins MCP server: Reference
| Item | Value |
|---|---|
| Status | Plugin 0.202.vdb_1a_a_9cfe7b_1 · repository pushed 31 August 2026 |
| Adoption | 107 stars · 64 forks · 46 releases · repository created 27 May 2025 |
| Distribution | A Jenkins plugin, via the controller's plugin manager |
| SDK | MCP Java SDK 0.17.2, implementing specification 2025-06-18 |
| Endpoint | /mcp-server/mcp under your Jenkins URL |
| Tools | 18 documented |
| State-changing tools | triggerBuild, rebuildBuild, replayBuild, updateBuild |
| Health endpoint | /mcp-health, unauthenticated by design |
| Inventory source | The plugin README, read 24 August 2026 |
What engineers report
jenkinsci/mcp-server-plugin carries 107 stars, 64 forks and 46 releases since 27 May 2025. The README is detailed about transports and pagination, so the counts below come from it.
| What was checked | What it shows |
|---|---|
| Stars | 105 |
| Last push | 24 August 2026 |
| Documented tools | 18 |
| State-changing tools | 4 |
| MCP Java SDK version | 0.17.2 |
| MCP specification version | 2025-06-18 |
Repository facts from the GitHub API, retrieved 24 August 2026. Tool inventory, SDK version and transport behavior read from the plugin's own README on the same date. The server runs only inside a Jenkins controller, so no standalone tools/list capture was possible.
Should you connect an agent to Jenkins?
Yes. Best for streamable HTTP with Origin validation left on, and client approval required for the four acting tools.
- Strongest fit
- Teams running their own Jenkins who want an agent to read build logs without a browser.
- Main advantage
- Cursor-based log pagination built for a context window, from a server that needs no separate deployment.
- Main weakness
- It describes Jenkins only, so anything about the deployed service needs another connector.
- Operational risk
replayBuildexecutes a caller-supplied Pipeline script on the controller.
From Oodle
One platform for agent traces and infrastructure
Agent traces usually sit in a different product from the rest of your telemetry, so when a slow database makes an agent slow the symptom is in one tool and the cause is in another. Oodle keeps both in one query surface, from $10 per million spans.
See agent observabilityFrequently asked questions
How many tools does the Jenkins MCP server have?
18 documented in the plugin's README, read on 24 August 2026. The server runs inside the controller, so there is no standalone process to capture.
Do I install anything separately?
No. It is a Jenkins plugin, and the README states it sets up its endpoints and tools on installation with no additional configuration.
Can an agent start a build?
Yes. triggerBuild, rebuildBuild and replayBuild all start work, and replayBuild runs a Pipeline with a modified script.
How do I read a very long log?
getBuildLog returns a nextCursor on each response. Pass it back as cursor to keep reading without re-scanning from the top.
Is the health endpoint safe to expose?
It requires no authentication by design, returning status and active connection counts. Keep it inside your monitoring network.