Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

jenkins-mcp

MCP.Pizza Chef: kjozsa

Jenkins MCP is a server that integrates Jenkins continuous integration and delivery operations into the MCP ecosystem. It enables real-time interaction with Jenkins pipelines, job management, and automation tasks through structured context and commands. This server simplifies Jenkins automation by exposing Jenkins functionality to LLMs, allowing seamless orchestration of build, test, and deployment workflows within AI-enhanced environments.

Use This MCP server To

Trigger Jenkins build jobs from natural language commands Monitor Jenkins pipeline status and results in real time Automate Jenkins job configuration and parameter updates Fetch build logs and test reports for analysis Integrate Jenkins CI/CD workflows into AI-driven automation Manage Jenkins credentials and environment variables securely Schedule Jenkins jobs based on AI-generated triggers Retrieve Jenkins job history and metrics for reporting

README

Jenkins MCP

smithery badge MCP server for managing Jenkins operations.

Jenkins MCP server

Installation

Installing via Smithery

To install Jenkins MCP for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @kjozsa/jenkins-mcp --client claude

Installing Manually

uvx install jenkins-mcp

Configuration

Add the MCP server using the following JSON configuration snippet:

{
  "mcpServers": {
    "jenkins-mcp": {
      "command": "uvx",
      "args": ["jenkins-mcp"],
      "env": {
        "JENKINS_URL": "https://your-jenkins-server/",
        "JENKINS_USERNAME": "your-username",
        "JENKINS_PASSWORD": "your-password",
        "JENKINS_USE_API_TOKEN": "false"
      }
    }
  }
}

CSRF Crumb Handling

Jenkins implements CSRF protection using "crumbs" - tokens that must be included with POST requests. This MCP server handles CSRF crumbs in two ways:

  1. Default Mode: Automatically fetches and includes CSRF crumbs with build requests

    • Uses session cookies to maintain the web session
    • Handles all the CSRF protection behind the scenes
  2. API Token Mode: Uses Jenkins API tokens which are exempt from CSRF protection

    • Set JENKINS_USE_API_TOKEN=true
    • Set JENKINS_PASSWORD to your API token instead of password
    • Works with Jenkins 2.96+ which doesn't require crumbs for API token auth

You can generate an API token in Jenkins at: User → Configure → API Token → Add new Token

Features

  • List Jenkins jobs
  • Trigger builds with optional parameters
  • Check build status
  • CSRF crumb handling for secure API access

Development

# Install dependencies
uv pip install -r requirements.txt

# Run in dev mode with Inspector
mcp dev jenkins_mcp/server.py

jenkins-mcp FAQ

How do I install Jenkins MCP server?
You can install Jenkins MCP via Smithery CLI using 'npx -y @smithery/cli install @kjozsa/jenkins-mcp --client claude' or manually with 'uvx install jenkins-mcp'.
How do I configure Jenkins MCP to connect to my Jenkins server?
Configure Jenkins MCP by setting environment variables like JENKINS_URL, JENKINS_USERNAME, and JENKINS_PASSWORD in the MCP server JSON configuration.
Can Jenkins MCP handle secure credentials?
Yes, Jenkins MCP supports secure management of Jenkins credentials through environment variables and secure storage mechanisms.
Which LLM clients are compatible with Jenkins MCP?
Jenkins MCP works with multiple LLM clients including Claude, OpenAI GPT models, and Gemini, enabling flexible integration.
Can Jenkins MCP fetch build logs and test reports?
Yes, it can retrieve detailed build logs and test reports from Jenkins jobs for analysis and troubleshooting.
Is it possible to trigger Jenkins jobs using natural language?
Absolutely, Jenkins MCP allows triggering and managing Jenkins jobs via natural language commands processed by LLMs.
How does Jenkins MCP improve CI/CD workflows?
By integrating Jenkins operations into MCP, it enables AI-driven automation, real-time monitoring, and streamlined job management.
Does Jenkins MCP support scheduling Jenkins jobs?
Yes, Jenkins MCP can schedule jobs based on AI-generated triggers or predefined conditions within the MCP environment.