NewAgent Observability is live.
Back to directory
Jenkins logo

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.

Connector
Official plugin, inside your controller
Coverage
Jobs, builds, logs, test results, source control, queue
Tools
18 documented
Biggest risk for an agent
Four tools trigger or modify builds

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 workWhat Jenkins has hereCan an agent reach it
Code, tests & reviewTest results, SCM configuration, change setsPartial. Test results and change sets are reachable; there is no diff or review feature
CI & releaseJobs, builds, queue, logs, replayYes. Core strength, and the only connector here that runs inside the CI system itself
Production observabilityController healthNo. getStatus reports on Jenkins itself, not on your services
Agent observability & evalsNoneNo traces or evaluations for your own agents
AI cost managementNoneNo 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?

TaskToolsWorksWatch out for
Find a jobgetJobs getJob findJobsWithScmUrlYesgetJobs is paginated and sorted by name
Check the last buildgetBuild getQueueItemYesgetBuild fetches a specific build or the last one
Read a long build loggetBuildLog searchBuildLogYesCursor is tied to its build and rejected against a different one
See which tests failedgetTestResultsYesReturns test results for a specific build or the last one
Find what changedgetBuildChangeSets getJobScm getBuildScmYesChange sets are Jenkins's record, not the repository's history
Run it againtriggerBuild rebuildBuild replayBuildYesreplayBuild runs a Pipeline again with a modified script
Annotate a buildupdateBuildYesChanges 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 setToolsTokens (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 documented18472 to 640472 to 6401,450 to 1,6040.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. 1

    Decide who may trigger builds

    triggerBuild, rebuildBuild and replayBuild all start work, and replayBuild runs a modified Pipeline script.

  2. 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. 3

    Leave Origin validation on

    The specification marks validating the Origin header as a MUST, and the plugin validates it against the configured Jenkins root URL by default.

  4. 4

    Know what the health endpoint exposes

    /mcp-health returns 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.

Terminal
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.

Terminal
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.

Terminal
{"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.

Terminal
[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.

Terminal
{"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.

Terminal
{"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.

Terminal
{"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.

Terminal
{"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.

Terminal
-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.

Terminal
curl https://jenkins.internal/mcp-health

Read-only access, permissions and security

  • Four tools change state

    triggerBuild, rebuildBuild, replayBuild and updateBuild start or alter builds.

  • replayBuild runs a modified script

    It 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-health returns 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 Origin header 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 triggerBuild can exceed a short proxy read timeout. The README notes raising proxy_read_timeout for that case, regardless of transport.
Total line count looks wrong
totalLines is 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

ItemValue
StatusPlugin 0.202.vdb_1a_a_9cfe7b_1 · repository pushed 31 August 2026
Adoption107 stars · 64 forks · 46 releases · repository created 27 May 2025
DistributionA Jenkins plugin, via the controller's plugin manager
SDKMCP Java SDK 0.17.2, implementing specification 2025-06-18
Endpoint/mcp-server/mcp under your Jenkins URL
Tools18 documented
State-changing toolstriggerBuild, rebuildBuild, replayBuild, updateBuild
Health endpoint/mcp-health, unauthenticated by design
Inventory sourceThe 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 checkedWhat it shows
Stars105
Last push24 August 2026
Documented tools18
State-changing tools4
MCP Java SDK version0.17.2
MCP specification version2025-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
replayBuild executes 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 observability

Frequently 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.

Changelog

  • 31 August 2026. Plugin repository last pushed. It carries 107 stars, 64 forks and 46 releases, the latest being 0.202.vdb_1a_a_9cfe7b_1.
  • 27 May 2025. Repository created on GitHub.

Sources

Every number on this page traces to one of these

  1. Repository facts from the GitHub API · jenkinsci/mcp-server-plugin, retrieved 24 August 2026
  2. Tool inventory, SDK version, transports and pagination behavior from the plugin README
  3. Official MCP registry searched for Jenkins on 27 August 2026: 2 results, neither from the Jenkins project

Jenkins’s own MCP documentation

Also CI and release:

For test results across runs: