Jenkins MCP
MCP server that connects AI agents to Jenkins, supporting stdio and HTTP transports with tools for jobs, builds, logs, and queue management.
README
Jenkins MCP Server
TypeScript MCP server that connects AI agents to Jenkins. Supports stdio and Streamable HTTP transports, plus a local web UI to test credential authentication/authorization and copy agent configuration snippets.
Developed by oshaani.com · © oshaani.com. All rights reserved.
Features
- MCP tools for jobs, builds, logs, queue, nodes, identity, and auth checks
- stdio mode for Cursor, Claude Desktop, VS Code
- HTTP mode with Streamable MCP endpoint at
/mcp - Web UI to test Jenkins username/API token auth and permission probes
- Ready-made config snippets for AI agents
- Unit tests with Vitest
Quick start
npm install
npm run build
cp .env.example .env # then edit credentials
Local Jenkins in Docker (recommended for testing)
docker compose up -d
# Wait until healthy, then copy the generated API token into .env:
docker exec jenkins-mcp-test cat /var/jenkins_home/mcp-api-token.txt
Default test login:
| Field | Value |
|---|---|
| URL | http://127.0.0.1:8080 |
| Username | admin |
| Password | admin123 |
| Sample job | hello-mcp |
Put the token from mcp-api-token.txt into .env as JENKINS_API_TOKEN, then:
npm run start:http
Open http://127.0.0.1:3100 and run Test authentication.
Stop Jenkins later with docker compose down (add -v to wipe data).
HTTP + UI
npm run start:http
Open http://127.0.0.1:3100 to:
- Test authentication and authorization against your Jenkins
- Copy MCP config for Cursor / Claude Desktop / VS Code
Stdio (AI agents)
npm run start:stdio
Environment
| Variable | Description |
|---|---|
JENKINS_URL |
Jenkins base URL |
JENKINS_USERNAME |
Jenkins username |
JENKINS_API_TOKEN |
Jenkins API token |
PORT / MCP_HTTP_PORT |
HTTP port (default 3100) |
MCP_HTTP_HOST |
Bind host (default 127.0.0.1) |
JENKINS_READ_ONLY |
true disables jenkins_trigger_build |
Cursor MCP config (stdio)
{
"mcpServers": {
"jenkins": {
"command": "node",
"args": ["/absolute/path/to/Jenkins MCP/dist/index.js", "stdio"],
"env": {
"JENKINS_URL": "https://jenkins.example.com",
"JENKINS_USERNAME": "your-user",
"JENKINS_API_TOKEN": "your-api-token"
}
}
}
}
Cursor MCP config (HTTP + headers)
Pass Jenkins credentials from the agent on every request:
{
"mcpServers": {
"jenkins": {
"url": "http://127.0.0.1:3100/mcp",
"headers": {
"X-Jenkins-Url": "http://127.0.0.1:8080",
"X-Jenkins-Username": "admin",
"X-Jenkins-Api-Token": "your-api-token"
}
}
}
}
Header values override server .env for that MCP session. You can also use Authorization: Basic base64(username:apiToken) plus X-Jenkins-Url.
Cursor MCP config (HTTP + server env)
{
"mcpServers": {
"jenkins": {
"url": "http://127.0.0.1:3100/mcp"
}
}
}
MCP tools
| Tool | Description |
|---|---|
jenkins_whoami |
Authenticated user identity |
jenkins_test_auth |
Auth + authorization permission probes |
jenkins_list_jobs |
List visible jobs |
jenkins_get_job |
Job details |
jenkins_get_build |
Build details |
jenkins_get_build_log |
Progressive console log |
jenkins_get_queue |
Build queue |
jenkins_get_nodes |
Agents/nodes |
jenkins_trigger_build |
Trigger build (disabled in read-only mode) |
Development
npm test
npm run typecheck
npm run dev
License
MIT
Copyright © oshaani.com. Developed by oshaani.com. All rights reserved.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。