Skip to main content
Glama
Jenkins Server MCP

Jenkins Server MCP

Jenkins Server MCP

A Model Context Protocol (MCP) server that provides tools for interacting with Jenkins CI/CD servers (including CloudBees CI). This server enables AI assistants to check build statuses, trigger builds, stop builds, and retrieve build logs through a standardized interface.

Features

  • ✅ Get Build Status - Retrieve detailed build information including build number, status, timing, and results

  • ✅ Trigger Builds - Start builds with or without parameters (automatically detects build type)

  • ✅ Stop Builds - Stop currently running builds

  • ✅ List Builds - Get a list of recent builds for any job

  • ✅ Get Build Logs - Retrieve console output from builds

  • ✅ CloudBees CI Support - Works with both standard Jenkins and CloudBees CI

Related MCP server: Jenkins MCP Server

Installation

  1. Clone this repository:

git clone https://github.com/grysonbaltazar/jenkins-server-mcp.git
cd jenkins-server-mcp
  1. Install dependencies:

npm install
  1. Build the project:

npm run build

The built server will be available at build/index.js.

Configuration

The server requires the following environment variables:

  • JENKINS_URL: The URL of your Jenkins server (e.g., https://jenkins.example.com)

  • JENKINS_USER: Jenkins username for authentication

  • JENKINS_TOKEN: Jenkins API token for authentication

Getting Your Jenkins API Token

  1. Log in to your Jenkins server

  2. Click your username in the top-right corner

  3. Click "Configure" (or go to User → Configure)

  4. Scroll down to the "API Token" section

  5. Click "Add new token" or "Generate"

  6. Give it a name (e.g., "mcp-server")

  7. Click "Generate" and copy the token immediately (it won't be shown again)

For Cursor IDE

Edit ~/.cursor/mcp_config.json (create it if it doesn't exist):

{
  "mcpServers": {
    "jenkins-server": {
      "command": "node",
      "args": ["/path/to/jenkins-server-mcp/build/index.js"],
      "env": {
        "JENKINS_URL": "https://your-jenkins-server.com",
        "JENKINS_USER": "your-username",
        "JENKINS_TOKEN": "your-api-token"
      }
    }
  }
}

After saving the config file, restart Cursor for changes to take effect.

For Claude Desktop

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "jenkins-server": {
      "command": "node",
      "args": ["/path/to/jenkins-server-mcp/build/index.js"],
      "env": {
        "JENKINS_URL": "https://your-jenkins-server.com",
        "JENKINS_USER": "your-username",
        "JENKINS_TOKEN": "your-api-token"
      }
    }
  }
}

After saving the config file, restart Claude Desktop for changes to take effect.

Tools and Usage

Once configured, you can use the Jenkins tools in your AI assistant:

1. Get Build Status

Get detailed status information about a Jenkins build, including build number, status, result, timing, and more.

2. Trigger Build

Trigger a new Jenkins build. Supports both parameterized and non-parameterized builds.

3. Stop Build

Stop a currently running Jenkins build.

4. List Builds

List recent builds for a Jenkins job.

5. Get Build Log

Retrieve the console output of a Jenkins build.

Development

Building

npm run build

Development with auto-rebuild

npm run watch

Debugging

Since MCP servers communicate over stdio, you can use the MCP Inspector for debugging:

npm run inspector

This will provide a URL to access debugging tools in your browser.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Available Tools

5 tools
get_build_logC

Get the console output of a Jenkins build

Inputs: jobPath (required), buildNumber (required).

get_build_statusB

Get the status of a Jenkins build

Inputs: jobPath (required), buildNumber.

list_buildsC

List builds for a Jenkins job

Inputs: jobPath (required), limit.

stop_buildC

Stop a running Jenkins build

Inputs: jobPath (required), buildNumber (required).

trigger_buildB

Trigger a new Jenkins build. Use parameters for parameterized builds, or omit for simple builds

Inputs: jobPath (required), parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: status retrieval, triggering, stopping, listing, and log retrieval. There is little risk of confusing one action for another.

    Naming Consistency5/5

    All tools follow a consistent snake_case verb_noun pattern: get_build_status, trigger_build, stop_build, list_builds, get_build_log. The convention is predictable throughout.

    Tool Count5/5

    Five tools are well-scoped for a Jenkins build-operation server. Each tool earns its place and covers a distinct part of the build lifecycle without bloat.

    Completeness4/5

    The core build lifecycle is covered: list builds, trigger, stop, check status, and retrieve logs. Minor gaps remain around job discovery and job-level metadata, but agents can work around them if job names are known.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with Jenkins CI/CD systems through natural language, providing build management, job monitoring, log analysis, and debugging capabilities.
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Provides AI assistants with full access to Jenkins CI/CD systems, enabling querying, managing, and controlling Jenkins jobs, builds, nodes, and queues through natural language.
      22
      2,121 npm
      2
      MIT