mcp-jenkins
by lanbaoshen·★ 120·综合分 47
Jenkins 集成的 MCP 服务器,通过 AI 助手与 Jenkins CI/CD 系统交互。
概述
MCP Jenkins 服务器通过模型上下文协议将 Jenkins CI/CD 基础设施与 AI 助手连接起来,实现安全、上下文化的 Jenkins 工具交互,同时保护数据隐私。服务器支持通过用户名/密码或 API 令牌进行身份验证,并支持 stdio、SSE 和 streamable HTTP 多种传输方式。凭借对构建、节点、队列项目和工件的全面工具支持,AI 助手可以无缝执行 Jenkins 操作。
试试问 AI
装完之后,这里有 7 个你可以让 AI 做的事:
什么时候选它
当你的团队使用 Jenkins 进行 CI/CD,并希望通过自然语言让 AI 助手管理或查询管道状态、构建作业和 Jenkins 资源时,选择此服务器。
什么时候不要选它
如果你使用其他 CI/CD 系统(如 GitLab CI、GitHub Actions 或 Azure DevOps),不要选择此服务器,因为它专门为 Jenkins 集成而设计。
此 server 暴露的工具
从 README 抽取出 12 个工具get_itemGet a specific item by name.
get_item_configGet the configuration of a specific item.
get_all_itemsGet all items in Jenkins.
build_itemBuild a item.
get_buildGet a specific build by job name and build number.
get_build_console_outputGet the console output of a specific build.
stop_buildStop a specific build by job name and build number.
get_all_nodesGet all nodes in Jenkins.
get_queue_itemGet a specific queue item by ID.
cancel_queue_itemCancel a specific queue item by ID.
get_viewGet a specific view by name.
get_all_viewsGet the configuration of a specific view.
可对比工具
安装
安装
使用 pip:
pip install mcp-jenkins
mcp-jenkins使用 uv(推荐):
pip install uv
uvx mcp-jenkinsDocker:
docker pull ghcr.io/lanbaoshen/mcp-jenkins:latest
docker run -p 9887:9887 --rm ghcr.io/lanbaoshen/mcp-jenkins:latest --transport streamable-httpClaude Desktop 配置
添加到你的 claude_desktop_config.json:
{
"mcpServers": {
"jenkins": {
"command": "uvx",
"args": ["mcp-jenkins", "--jenkins-url=YOUR_JENKINS_URL", "--jenkins-username=YOUR_USERNAME", "--jenkins-password=YOUR_TOKEN"]
}
}
}FAQ
- 如何与 Jenkins 身份验证?
- 您可以使用用户名和密码或 Jenkins API 令牌进行身份验证。这些可以通过命令行参数(--jenkins-username、--jenkins-password)提供,如果使用 HTTP 传输,也可以通过标头提供。
- 支持哪些传输方式?
- 服务器支持三种传输方式:stdio(默认)、SSE(服务器发送事件)和可流式 HTTP。您可以使用 --transport 参数指定首选的传输方式。
- 我可以以只读模式运行吗?
- 是的,您可以使用 --read-only 标志启用只读模式,这将防止对 Jenkins 资源进行任何修改。
mcp-jenkins 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。