Skip to main content

MCP server for managing Jenkins operations

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cams_jenkins_mcp-0.1.2.6.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cams_jenkins_mcp-0.1.2.6-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file cams_jenkins_mcp-0.1.2.6.tar.gz.

File metadata

  • Download URL: cams_jenkins_mcp-0.1.2.6.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for cams_jenkins_mcp-0.1.2.6.tar.gz
Algorithm Hash digest
SHA256 3fa0b1761745495564c02ee1dab47fe79c41b249fc0e2d85af5a3b9b73aaa422
MD5 70c8ab66360f527c3df16084ada250b9
BLAKE2b-256 9c4a1c4377e770e0e4e92f80865ab687b957073a8c271cfbc5f37262a5ec0846

See more details on using hashes here.

File details

Details for the file cams_jenkins_mcp-0.1.2.6-py3-none-any.whl.

File metadata

File hashes

Hashes for cams_jenkins_mcp-0.1.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 90f5be4ca5d9edfb27a4a119ecc6157c95f19d600b7e777437893e5deeeaca46
MD5 a169213776ea5d1c9ff60898f87d11e1
BLAKE2b-256 647412893b2ecb7c1e0e878a6f8164fbe5b8558eb2a96b4cf5b576124aa5b68b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page