home / mcp / jenkins mcp server

Jenkins MCP Server

mcp-jenkins

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "gcorroto-mcp-jenkins": {
      "command": "npx",
      "args": [
        "@grec0/mcp-jenkins"
      ],
      "env": {
        "JENKINS_URL": "https://tu-jenkins.com",
        "JENKINS_PASSWORD": "tu-token",
        "JENKINS_USERNAME": "tu-usuario"
      }
    }
  }
}

You have a dedicated MCP server that lets you manage Jenkins CI/CD from any MCP client. It enables you to query jobs, start and stop builds, monitor steps and nodes, handle input actions, and retrieve coverage reports, all through a secure, scriptable interface.

How to use

Connect to the Jenkins MCP server from your MCP client and start issuing commands to manage jobs, builds, and reports. You can perform the following practical workflows: - Check the status of a Jenkins job and start or stop it as needed - View detailed build steps, node status, and overall build progress - Retrieve a list of Git branches available for a build and trigger builds on a specific branch - Access code coverage reports and file-level coverage details - Submit input actions to approvals or pending tasks during deployments All commands are exposed as MCP tools that you can call from your client’s command surface.

How to install

Prerequisites you need before installation:
- Node.js and npm (or npx comes with npm)
- Access to a Jenkins instance with required plugins installed and accessible over HTTPS (self-signed certificates allowed)
- Administrative access to configure environment variables for the MCP server
Step-by-step installation options:
- Option 1: Use with npx (Recommended)
  - Run: `npx @grec0/mcp-jenkins`
- Option 2: Global installation
  - Run: `npm install -g @grec0/mcp-jenkins`
  - Then run: `mcp-jenkins

Configuration and usage notes

Environment variables you must configure for the MCP server to connect to Jenkins: - JENKINS_URL — URL of your Jenkins instance (e.g., https://your-jenkins.example) - JENKINS_USERNAME — Jenkins username - JENKINS_PASSWORD — Jenkins password or API token Use these variables in your client configuration to enable authentication and secure access.

Configuration examples for Claude Desktop

You configure the MCP server in Claude Desktop by specifying either an npx-based or a global-install-based setup.

{
  "mcpServers": {
    "jenkins": {
      "command": "npx",
      "args": ["@grec0/mcp-jenkins"],
      "env": {
        "JENKINS_URL": "https://tu-jenkins.com",
        "JENKINS_USERNAME": "tu-usuario",
        "JENKINS_PASSWORD": "tu-token"
      }
    }
  }
}
{
  "mcpServers": {
    "jenkins_cli": {
      "command": "mcp-jenkins",
      "args": [],
      "env": {
        "JENKINS_URL": "https://tu-jenkins.com",
        "JENKINS_USERNAME": "tu-usuario",
        "JENKINS_PASSWORD": "tu-token"
      }
    }
  }
}

Security and credentials

Use HTTPS when connecting to Jenkins and prefer tokens or certificates where possible. The MCP server supports secure connections and can work with self-signed certificates. Keep credentials in secure storage and rotate tokens regularly.

Troubleshooting tips

If you cannot connect to Jenkins, verify: - Jenkins URL is reachable from the host running the MCP server - Credentials are correct and have enough permissions for the requested operations - Required Jenkins plugins are installed (pipeline-rest-api, git-parameter, and optional coverage plugins if you need coverage reports) - The MCP server environment variables are properly set in your client configuration

Notes

The MCP server exposes tools for managing Jenkins jobs, builds, input actions, and coverage data. You can adapt the flow to trigger builds on specific branches, inspect build steps, and navigate deployment approvals while keeping credentials isolated and secure.

Usage examples

Obtain the status of a job named "my-app" and show the latest coverage for a build if needed. Start a build on branch "feature/new-feature" and monitor its progress. Retrieve pending input actions to approve or reject a deployment.

Available tools

jenkins_get_job_status

Query the current status of a Jenkins job

jenkins_start_job

Start a Jenkins job for a specific branch

jenkins_stop_job

Stop a running Jenkins job

jenkins_get_git_branches

List available Git branches for builds

jenkins_get_build_steps

Retrieve the steps of a particular build

jenkins_get_node_status

Check the status of a Jenkins node

jenkins_get_pending_actions

Fetch input actions awaiting approval or execution

jenkins_submit_input_action

Submit an approval or rejection for an input action

jenkins_get_coverage_report

Get a general coverage report for a build

jenkins_get_coverage_lines

Get coverage data for a specific file

jenkins_get_coverage_paths

List files with coverage information

Jenkins MCP Server - gcorroto/mcp-jenkins