Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

ijenk

CI

A Jenkins CLI + MCP server — manage nodes, users, and jobs from the terminal or from AI agents.

Features

  • Node Management: Add, remove, and list worker nodes/agents.
  • Account Management: Create and configure Jenkins user accounts.
  • Job Overview: List jobs and their status.
  • CSRF Token / Crumb Handling: Automatically acquires and attaches Jenkins-Crumb for Jenkins 2.x instances with security enabled.
  • Dual Mode: Works as a standalone terminal CLI (ijenk) or as an MCP server for AI agents (ijenk-mcp).

Install

pip install ijenk

or with uv:

uv tool install ijenk

Quickstart

export JENKINS_URL="https://jenkins.example.com"
export JENKINS_USER="admin"
export JENKINS_PASSWORD="your-api-token"

ijenk status

CLI Usage

# Check status of all nodes
ijenk status

# Add a worker node
ijenk node add worker-01 --ip 192.0.2.10 --labels "linux worker"

# Remove a worker node
ijenk node remove worker-01

# Create a new user account
ijenk user create someuser 'a-strong-password' --email someuser@example.com

# List all jobs
ijenk jobs

# Run the MCP stdio server
ijenk serve

Credentials can also be passed explicitly, overriding env vars / config file:

ijenk --url https://jenkins.example.com --user admin --password '...' status

Configuration

ijenk never ships with credentials. It resolves connection settings in this order, first match wins:

  1. Explicit CLI flags: --url, --user, --password
  2. Environment variables: JENKINS_URL, JENKINS_USER, JENKINS_PASSWORD
  3. A JSON config file at ~/.config/ijenk/config.json

If no username/password is found by any of the above, the command exits with a clear error instead of connecting anonymously.

Environment variables

export JENKINS_URL="https://jenkins.example.com"
export JENKINS_USER="your-jenkins-username"
export JENKINS_PASSWORD="your-jenkins-api-token"

Config file

Create ~/.config/ijenk/config.json:

{
  "url": "https://jenkins.example.com",
  "username": "your-jenkins-username",
  "password": "your-jenkins-api-token"
}

Running as an MCP Server for AI Agents

ijenk ships a dedicated entry point for the MCP server:

ijenk-mcp

(equivalent to ijenk serve)

Register it with Claude Code:

claude mcp add jenkins -- ijenk-mcp

Exposed MCP Tools:

  • jenkins_get_status()
  • jenkins_add_node(name, ip, labels, remote_fs)
  • jenkins_remove_node(name)
  • jenkins_create_user(username, password, email)
  • jenkins_list_jobs()

Security

Requests use HTTP Basic Auth, which sends username:password base64-encoded on every request — base64 is trivially reversible, not encryption. Use an https:// Jenkins URL, or make sure the connection stays on a trusted network, before sending real credentials.

Prefer a Jenkins API token over your account password: generate one under your Jenkins user profile ("Configure" → "API Token") and set it as JENKINS_PASSWORD. ijenk accepts an API token anywhere it accepts a password, and tokens can be revoked independently of your login credentials.

Development

git clone https://github.com/ml-lubich/ijenk.git
cd ijenk
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Running Tests

pytest -q

License

MIT

Metadata

Release files for ijenk 0.1.0

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

Source distribution (sdist)

Source distribution for ijenk 0.1.0
File Size Uploaded Provenance
ijenk-0.1.0.tar.gz 11.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ijenk 0.1.0
File Interpreter ABI Platform
ijenk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.3 kB

Release files / ijenk-0.1.0.tar.gz

Download URL ijenk-0.1.0.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c332869881bc734f0f0b5f9c941607431aae163b26cf48f358ab0e9d22396c2c
BLAKE2b-256 checksum
How to use checksums
f9e6693915600c87a4d71a3b91b07ff341e84545973f71ebcc9ea7b28e061a3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.14

Release files / ijenk-0.1.0-py3-none-any.whl

Download URL ijenk-0.1.0-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bfb6507b1c507a661af6be890efd2f9b94bad193b149b69a23f0376a2c99252c
BLAKE2b-256 checksum
How to use checksums
5e0d99d53ae0c8176ee15bc00d720a1ad28774ffe156791b46b23eb472186479
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.14

Security for ijenk 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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