jenkins-http-mcp-server
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.
README
Jenkins MCP Server
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.
Python Setup
This project was initialized with pyenv using the latest stable Python 3.14.x available locally:
- Python:
3.14.4 - pyenv virtualenv:
venv3144
To reproduce:
pyenv local venv3144
python --version
which python
pyenv version
Install
python -m pip install -e '.[dev]'
Environment
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.
Run STDIO Server
python -m jenkins_mcp_server
Console script:
jenkins-mcp-server
Client Setup
- Codex CLI:
docs/codex-setup.md - Gemini CLI:
docs/gemini-setup.md
Tools
Read-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_plugins
Workspace 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_download
Write tools, gated by JENKINS_MCP_ENABLE_WRITES=1:
jenkins_trigger_buildjenkins_trigger_build_with_parametersjenkins_stop_buildjenkins_cancel_queue_itemjenkins_enable_jobjenkins_disable_job
Optional 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_config
Delete additionally requires JENKINS_MCP_ENABLE_DELETE=1:
jenkins_delete_job
Safety
- Read-only by default.
- Write tools require explicit local env flags and Jenkins-side permissions.
- Workspace bundle downloads require a separate explicit env flag and output directory.
- Jenkins logs and job output are treated as untrusted text.
- Jenkins workspace files are treated as untrusted local files.
- API tokens and Authorization headers are not printed by server helpers.
- 401, 403, 404, crumb failures, and permission failures return structured errors.
Limitations
- No script console.
- No restart, safe restart, or quiet down.
- No plugin install/update.
- No credential read/write.
- No node creation/deletion.
- No global config changes.
- No user management.
jenkins_get_test_reportdepends on a test-report plugin such as JUnit exposingtestReport; it fails clearly if absent.- Nested folder paths are URL-encoded as repeated
job/<segment>path components. Controllers without the needed folder/job type return Jenkins 404s. - Workspace bundle downloads use Jenkins' job-level workspace endpoint. The saved console log is build-run-specific, but the workspace is the current/some available job workspace and may not be an immutable snapshot of that build.
- Workspace bundle operations stream to disk and report status/progress through
jenkins_get_workspace_bundle_status; large downloads can still stress Jenkins controllers or agents.
Testing
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
Evidence Docs
docs/source-truth.mddocs/source-skills-check.mddocs/existing-research.mddocs/architecture-decision.mddocs/tool-evidence.mddocs/security.md
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.