Skip to main content

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

Metadata

Release files for iflow-mcp_jenkins-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_jenkins-mcp 0.1.1
File Size Uploaded
iflow_mcp_jenkins_mcp-0.1.1.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_jenkins-mcp 0.1.1
File Interpreter ABI Platform
iflow_mcp_jenkins_mcp-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.6 kB

Release files / iflow_mcp_jenkins_mcp-0.1.1.tar.gz

Download URL iflow_mcp_jenkins_mcp-0.1.1.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e677c3674dd3191fc5864b9f7cfee769edbbb99fe80632b4d0358d423184f89d
BLAKE2b-256 checksum
How to use checksums
a7a5db4984397ee1a20c114c76443741ca0f66e915c09f6ab6c07ca171d9231b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.9

Release files / iflow_mcp_jenkins_mcp-0.1.1-py3-none-any.whl

Download URL iflow_mcp_jenkins_mcp-0.1.1-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6135f2e36db1d32e78b095cbb47914cac352482299ac4fd7a93f501cd2ce1223
BLAKE2b-256 checksum
How to use checksums
b5bfe586fa10f62e43bcd8d23ca2dbe8bcd6f3460b3e52ee0421721a29fcf4cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.9

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page