home / mcp / jenkins mcp server

Jenkins MCP Server

Provides MCP access to Jenkins data and actions, including job/status retrieval, build control, and log analysis.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "akhilthomas236-jenkins_mcp_server": {
      "command": "jenkins-mcp-server",
      "args": [
        "--verbose"
      ],
      "env": {
        "JENKINS_URL": "http://your-jenkins-server:8080",
        "JENKINS_TOKEN": "your-api-token",
        "JENKINS_PASSWORD": "your-password",
        "JENKINS_USERNAME": "your-username"
      }
    }
  }
}

You run an MCP server that lets you interact with Jenkins through AI assistants. This setup enables you to manage builds, analyze status and logs, trigger jobs, and inspect Jenkins resources from your MCP-enabled client in a reliable, standardized way.

How to use

You connect an MCP client (such as an AI assistant with MCP support) to your Jenkins MCP Server to access jobs, builds, and node information. Use natural language prompts to list jobs, check statuses, fetch build details, or trigger and stop builds. The server exposes a set of tools for Jenkins operations and analysis, so you can orchestrate CI tasks and receive structured results that you can display or feed into your automation workflows.

How to install

Prerequisites: make sure you have Python available on your system or use the recommended installation path that includes a package manager and optional tooling for development.

# Install from PyPI (recommended for quick setup)
pip install jenkins-mcp-server==0.1.6

# Or install with UV (fast startup and development-friendly)
uv pip install jenkins-mcp-server==0.1.6

# Run the server (verbose output)
jenkins-mcp-server --verbose

Additional setup steps for local development

If you prefer to run from source, clone the project, install dependencies, and start the server in development mode.

# Clone the project
git clone https://github.com/yourusername/jenkins-mcp-server.git
cd jenkins-mcp-server

# Create a virtual environment and install dependencies
uv venv
uv pip install -e .

# Run the server
python -m jenkins_mcp_server --verbose

Configuration and running as a local MCP server

The MCP server is configured to run as a local process and communicate with Jenkins over environment variables that you provide. The typical setup uses a stdio-based MCP server process that you launch directly from your development or automation environment.

{
  "type": "stdio",
  "name": "jenkins_mcp",
  "command": "jenkins-mcp-server",
  "args": ["--verbose"],
  "env": {
    "JENKINS_URL": "http://your-jenkins-server:8080",
    "JENKINS_USERNAME": "your-username",
    "JENKINS_TOKEN": "your-api-token"
  }
}

Connecting a client

Connect an MCP-capable AI assistant or client to the server using the stdio channel. You can also connect through an HTTP endpoint if you configure that option in the future. Once connected, you can issue prompts to fetch job lists, check statuses, retrieve build details, trigger builds, or fetch logs.

Available tools

trigger-build

Triggers a Jenkins job build. You provide the job name and optional parameters; the server returns information about the queued or running build.

stop-build

Stops a running Jenkins build by specifying the job name and build number, terminating the in-progress execution.

get-job-details

Fetches detailed information about a specific Jenkins job, including recent builds and configuration.

list-jobs

Lists all Jenkins jobs with their current statuses and key metadata.

get-build-info

Retrieves information about a specific build, including status, duration, and result.

get-build-console

Returns the console output for a specific build to help diagnose failures.

get-queue-info

Provides information about the Jenkins build queue, including pending builds.

get-node-info

Returns information about a Jenkins node/agent, including status and configuration.

list-nodes

Lists all Jenkins nodes/agents and their current states.

analyze-job-status

Analyzes the status of all Jenkins jobs and suggests improvements or fixes based on detected patterns.

analyze-build-logs

Analyzes logs from a specific build to identify errors, warnings, and actionable fixes.