jenkins-http-mcp-server

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.

Category
访问服务器

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_whoami
  • jenkins_version
  • jenkins_health
  • jenkins_get_json
  • jenkins_list_jobs
  • jenkins_get_job
  • jenkins_get_job_config
  • jenkins_list_builds
  • jenkins_get_build
  • jenkins_get_build_log
  • jenkins_get_build_artifacts
  • jenkins_get_test_report
  • jenkins_list_queue
  • jenkins_get_queue_item
  • jenkins_list_views
  • jenkins_get_view
  • jenkins_list_nodes
  • jenkins_get_node
  • jenkins_list_plugins

Workspace bundle tools, gated by JENKINS_MCP_ENABLE_WORKSPACE_DOWNLOAD=1 and JENKINS_MCP_WORKSPACE_DOWNLOAD_DIR:

  • jenkins_start_workspace_bundle_download
  • jenkins_get_workspace_bundle_status
  • jenkins_cancel_workspace_bundle_download

Write tools, gated by JENKINS_MCP_ENABLE_WRITES=1:

  • jenkins_trigger_build
  • jenkins_trigger_build_with_parameters
  • jenkins_stop_build
  • jenkins_cancel_queue_item
  • jenkins_enable_job
  • jenkins_disable_job

Optional job config tools, gated by JENKINS_MCP_ENABLE_WRITES=1 and JENKINS_MCP_ENABLE_JOB_CONFIG_WRITE=1:

  • jenkins_create_job
  • jenkins_copy_job
  • jenkins_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_report depends on a test-report plugin such as JUnit exposing testReport; 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.md
  • docs/source-skills-check.md
  • docs/existing-research.md
  • docs/architecture-decision.md
  • docs/tool-evidence.md
  • docs/security.md

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选