Skip to main content
Glama
Jenkins Server MCP

Jenkins Server MCP

by hekmon8

Sponsors

Website

Description

productdirs.com

Free AI SaaS Product Directory & Listing Platform - Submit your AI products and SaaS tools for free exposure and discovery

thistools.app

Free AI Tools & SaaS Directory for Developers - Discover and list innovative AI-powered tools and SaaS applications

aiimgcombiner.com

Free AI-Powered Image Merging & Combination Tool - Merge and combine multiple images effortlessly with AI technology


Jenkins Server MCP

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

Related MCP server: Jenkins MCP Server

Installation

  1. Clone this repository:

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

npm install
  1. Build the project:

npm run build

Configuration

The server requires the following environment variables:

  • JENKINS_URL: The URL of your Jenkins server

  • JENKINS_USER: Jenkins username for authentication

  • JENKINS_TOKEN: Jenkins API token for authentication

Configure these in your MCP settings file:

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"
      }
    }
  }
}

Tools and Usage

1. Get Build Status

Get the status of a Jenkins build:

// Example usage
const result = await mcpClient.useTool("jenkins-server", "get_build_status", {
  jobPath: "view/xxx_debug",
  buildNumber: "lastBuild"  // Optional, defaults to lastBuild
});

Input Schema:

{
  "jobPath": "string",  // Relative Jenkins job path (must not start with "/", "\\", or include a URL scheme)
  "buildNumber": "string"  // Optional, build number or "lastBuild"
}

2. Trigger Build

Trigger a new Jenkins build with parameters:

// Example usage
const result = await mcpClient.useTool("jenkins-server", "trigger_build", {
  jobPath: "view/xxx_debug",
  parameters: {
    BRANCH: "main",
    BUILD_TYPE: "debug"
  }
});

Input Schema:

{
  "jobPath": "string",  // Relative Jenkins job path (must not start with "/", "\\", or include a URL scheme)
  "parameters": {
    // Build parameters as key-value pairs
  }
}

3. Get Build Log

Retrieve the console output of a Jenkins build:

// Example usage
const result = await mcpClient.useTool("jenkins-server", "get_build_log", {
  jobPath: "view/xxx_debug",
  buildNumber: "lastBuild"
});

Input Schema:

{
  "jobPath": "string",  // Relative Jenkins job path (must not start with "/", "\\", or include a URL scheme)
  "buildNumber": "string"  // Build number or "lastBuild"
}

Development

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

Thanks

Thanks AIMCP(https://www.aimcp.info).

License

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

Available Tools

3 tools
get_build_logC

Get the console output of a Jenkins build

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

get_build_statusB

Get the status of a Jenkins build

Inputs: jobPath (required), buildNumber.

trigger_buildB

Trigger a new Jenkins build

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

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: get_build_log retrieves console output, get_build_status checks build status, and trigger_build initiates new builds. There is no overlap or ambiguity between these functions.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern (get_build_log, get_build_status, trigger_build) with clear, descriptive names. The naming convention is uniform and predictable throughout the set.

    Tool Count3/5

    With only 3 tools, the server feels thin for a Jenkins integration, which typically involves more operations like managing jobs, viewing queue status, or canceling builds. While the tools cover basic build interactions, the scope is limited.

    Completeness2/5

    The toolset is severely incomplete for Jenkins functionality. It lacks core operations such as listing jobs, viewing build history, managing job configurations, or handling Jenkins system information. Agents will face significant gaps in performing typical Jenkins tasks.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      A Model Context Protocol (MCP) server that enables AI tools like chatbots to interact with and control Jenkins, allowing users to trigger jobs, check build statuses, and perform other Jenkins operations through natural language.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides Jenkins CI/CD integration for AI assistants through the Model Context Protocol, enabling job management, build control, and system administration via natural language commands.
      666 PyPI
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server that connects AI agents to Jenkins, supporting stdio and HTTP transports with tools for jobs, builds, logs, and queue management.
      9
      181 npm
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to securely interact with Jenkins through the Model Context Protocol, allowing inspection and management of jobs, builds, nodes, queues, plugins, artifacts, and pipelines.
      -