Gene Library Courses Download Pricing Contact Sign in
jenkins logo
developer-tools Official Website

Jenkins MCP Server – CI/CD Tools for AI Agents

The Jenkins MCP Server Plugin lets a Jenkins controller act as a Model Context Protocol server for MCP-compatible clients. It exposes Jenkins jobs, builds, queues, logs, health information, and extension points as MCP tools so agents can inspect and operate CI/CD workflows using the authenticated user's Jenkins permissions.

#ci-cd#jenkins#builds

Overview

The Jenkins MCP Server is an official Jenkins plugin that implements the server side of the Model Context Protocol inside a Jenkins controller. After installation, Jenkins exposes MCP endpoints that AI agents and IDE-based assistants can use to query Jenkins context, interact with jobs and builds, and monitor the CI/CD system without requiring a separate local bridge server.

What the MCP server enables

The plugin exposes Jenkins functionality as MCP tools and resources. Built-in tools include job lookup, paginated job listing, build triggering, queue item lookup, current-user inspection through whoAmI, and Jenkins health/readiness checks through getStatus. Build triggering supports common Jenkins parameter types such as string, boolean, choice, text, password, and run parameters; plugin parameter types are attempted through reflection, while file parameters are not supported through MCP because they require uploads.

Jenkins administrators and plugin developers can also extend the server by implementing the McpServerExtension interface and annotating Java methods with @Tool and @ToolParam. Built-in tools can be replaced only with explicit override behavior, which helps avoid accidental tool shadowing.

When to use it

Use this MCP server when an AI agent needs live CI/CD context from Jenkins. Practical uses include listing jobs in a folder, checking the latest build status, retrieving or summarizing build information, triggering parameterized builds, checking queue state after a trigger, or asking an IDE assistant to answer Jenkins questions without leaving the development environment.

Connection and authentication

The plugin requires Jenkins 2.533 or higher and automatically configures its endpoints after installation. Streamable HTTP is available at <jenkins-url>/mcp-server/mcp and is recommended for most MCP clients because it handles connection issues more gracefully. SSE is available at <jenkins-url>/mcp-server/sse, with message handling at <jenkins-url>/mcp-server/message; the Jenkins plugin page notes that GitHub Copilot users should continue using SSE while Streamable HTTP compatibility is being investigated.

Authentication uses the same credentials as the Jenkins instance. For MCP clients, Jenkins documents using a Jenkins API token with HTTP Basic Authentication, encoded as a Basic authorization header. Tokens should be generated from the Jenkins user security page, stored securely, and scoped by normal Jenkins permissions.

Key considerations

The server follows the Jenkins security model, so available actions depend on the authenticated user. Administrators can disable SSE, Streamable HTTP, or stateless endpoints with system properties. Origin header validation is not enforced by default to support clients that omit the header, but Jenkins documents properties to require an Origin header or require it to match the configured Jenkins root URL. Production deployments behind reverse proxies should extend connection timeouts for MCP endpoints and protect encoded credentials as secrets.

Supported Transports

streamable_http

URL: https://<jenkins-url>/mcp-server/mcp

sse

URL: https://<jenkins-url>/mcp-server/sse

Frequently Asked Questions

When should an AI agent use the Jenkins MCP Server?
Use it when an agent needs live Jenkins CI/CD context or actions, such as listing jobs, checking build status, inspecting queue items, triggering parameterized builds, or asking an IDE assistant to retrieve Jenkins information without leaving the developer workflow.
What does this MCP server add to an AI agent's capabilities?
It gives the agent MCP tools backed by the Jenkins controller, including job lookup, paginated job listing, build triggering, queue item lookup, current-user inspection with whoAmI, and Jenkins health/readiness checks with getStatus.
What can the AI agent access or manage through this server?
The agent can access Jenkins jobs, builds, queue items, selected build logs and status information, and any additional tools contributed by Jenkins plugins through the McpServerExtension interface. Access is limited by the authenticated Jenkins user's permissions, and file parameters are not supported through MCP build triggering.
How is authentication configured for this MCP server?
Jenkins documents using the same credentials as the Jenkins instance. A user generates a Jenkins API token, combines it with the username, Base64-encodes the username:token value, and sends it in an HTTP Basic Authorization header. The encoded value should be stored as a secret because Base64 is not encryption.
Which transport should be used for this MCP server?
Use Streamable HTTP at /mcp-server/mcp for most MCP clients because the Jenkins plugin recommends it for better connection reliability. Use SSE at /mcp-server/sse when a client specifically needs SSE, such as the GitHub Copilot configuration documented by the plugin while Streamable HTTP compatibility is under investigation.