mcpField
J
Jenkins Mcp

Jenkins Mcp

Local
github.com/kjozsaCloud & Infra10Updated 81w ago

About Jenkins Mcp

Jenkins MCP is an MCP server for managing Jenkins operations, intended for users who need to inspect and trigger builds from a client. It lists jobs, starts parameterized builds, checks status, and handles CSRF protection.

Key features

  1. 01List Jenkins jobs
  2. 02Trigger builds with optional parameters
  3. 03Check build status
  4. 04Handle CSRF crumbs

Use cases

  1. 01Review jobs in Jenkins
  2. 02Start a build with parameters
  3. 03Check whether a build has completed and its status
  4. 04Access Jenkins through CSRF-protected requests

MCP support

The server exposes Jenkins job listing, build triggering, and status-checking operations to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"jenkins": {
"command": "uvx",
"args": [
"jenkins-mcp"
],
"env": {
"JENKINS_URL": "<JENKINS_URL>",
"JENKINS_USERNAME": "<JENKINS_USERNAME>",
"JENKINS_PASSWORD": "<JENKINS_PASSWORD>"
}
}
}
}
Run commanduvx jenkins-mcp
Environment variables to set
JENKINS_URL
JENKINS_USERNAME
JENKINS_PASSWORDSecret

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypijenkins-mcp

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project 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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.