loading…
Search for a command to run...
loading…
Enables interaction with Jenkins servers through HTTP APIs, allowing users to list jobs, trigger builds, view logs, and manage configurations without requiring
Enables interaction with Jenkins servers through HTTP APIs, allowing users to list jobs, trigger builds, view logs, and manage configurations without requiring plugins or admin access.
External Python MCP server for Jenkins 2.563. It connects through normal Jenkins HTTP APIs using the permissions available to JENKINS_USER and JENKINS_API_TOKEN.
It does not require Jenkins administrator access, does not install Jenkins plugins, and does not depend on the official Jenkins MCP Server Plugin.
This project was initialized with pyenv using the latest stable Python 3.14.x available locally:
3.14.4venv3144To reproduce:
pyenv local venv3144
python --version
which python
pyenv version
python -m pip install -e '.[dev]'
Required:
export JENKINS_URL="https://jenkins.example.com/"
export JENKINS_USER="your-user"
export JENKINS_API_TOKEN="your-api-token"
Optional:
export JENKINS_VERIFY_SSL=1
export JENKINS_TIMEOUT_SECONDS=30
export JENKINS_MCP_MAX_RESPONSE_BYTES=2000000
export JENKINS_MCP_MAX_LOG_BYTES=200000
Workspace bundle downloads are gated separately because they can be very large and may contain secrets or other untrusted files:
export JENKINS_MCP_ENABLE_WORKSPACE_DOWNLOAD=1
export JENKINS_MCP_WORKSPACE_DOWNLOAD_DIR="/absolute/path/with/enough/disk"
export JENKINS_MCP_MAX_WORKSPACE_ARCHIVE_BYTES=6000000000
export JENKINS_MCP_MAX_WORKSPACE_EXTRACT_BYTES=20000000000
export JENKINS_MCP_MAX_WORKSPACE_FILES=200000
export JENKINS_MCP_MAX_BUNDLE_LOG_BYTES=1200000000
export JENKINS_MCP_WORKSPACE_PROGRESS_INTERVAL_SECONDS=2
Write gates:
export JENKINS_MCP_ENABLE_WRITES=1
export JENKINS_MCP_ENABLE_JOB_CONFIG_WRITE=1
export JENKINS_MCP_ENABLE_DELETE=1
Do not store real Jenkins secrets in MCP client config files.
python -m jenkins_mcp_server
Console script:
jenkins-mcp-server
docs/codex-setup.mddocs/gemini-setup.mdRead-only:
jenkins_whoamijenkins_versionjenkins_healthjenkins_get_jsonjenkins_list_jobsjenkins_get_jobjenkins_get_job_configjenkins_list_buildsjenkins_get_buildjenkins_get_build_logjenkins_get_build_artifactsjenkins_get_test_reportjenkins_list_queuejenkins_get_queue_itemjenkins_list_viewsjenkins_get_viewjenkins_list_nodesjenkins_get_nodejenkins_list_pluginsWorkspace bundle tools, gated by JENKINS_MCP_ENABLE_WORKSPACE_DOWNLOAD=1 and
JENKINS_MCP_WORKSPACE_DOWNLOAD_DIR:
jenkins_start_workspace_bundle_downloadjenkins_get_workspace_bundle_statusjenkins_cancel_workspace_bundle_downloadWrite tools, gated by JENKINS_MCP_ENABLE_WRITES=1:
jenkins_trigger_buildjenkins_trigger_build_with_parametersjenkins_stop_buildjenkins_cancel_queue_itemjenkins_enable_jobjenkins_disable_jobOptional job config tools, gated by JENKINS_MCP_ENABLE_WRITES=1 and JENKINS_MCP_ENABLE_JOB_CONFIG_WRITE=1:
jenkins_create_jobjenkins_copy_jobjenkins_update_job_configDelete additionally requires JENKINS_MCP_ENABLE_DELETE=1:
jenkins_delete_jobjenkins_get_test_report depends on a test-report plugin such as JUnit exposing testReport; it fails clearly if absent.job/<segment> path components. Controllers without the needed folder/job type return Jenkins 404s.jenkins_get_workspace_bundle_status; large downloads can still stress Jenkins controllers or agents.Normal tests are mocked and do not require a live Jenkins controller:
python -m pytest
python -m compileall src
ruff check
Optional integration tests only run when all are set:
export JENKINS_INTEGRATION_TESTS=1
export JENKINS_URL="https://jenkins.example.com/"
export JENKINS_USER="your-user"
export JENKINS_API_TOKEN="your-api-token"
python -m pytest tests/test_integration.py
docs/source-truth.mddocs/source-skills-check.mddocs/existing-research.mddocs/architecture-decision.mddocs/tool-evidence.mddocs/security.mdAdd this to claude_desktop_config.json and restart Claude Desktop.
{
"mcpServers": {
"jenkins-http-mcp-server": {
"command": "npx",
"args": []
}
}
}