{"id":32675174,"url":"https://github.com/kud/mcp-jenkins","last_synced_at":"2026-05-01T21:03:03.830Z","repository":{"id":321447801,"uuid":"1085892856","full_name":"kud/mcp-jenkins","owner":"kud","description":"A Jenkins MCP server with 25+ tools for managing jobs, builds, and CI/CD workflows","archived":false,"fork":false,"pushed_at":"2026-04-18T00:09:00.000Z","size":97,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-18T01:26:48.907Z","etag":null,"topics":["ai","jenkins","mcp","mcp-server"],"latest_commit_sha":null,"homepage":"https://kud.github.io/mcp-jenkins","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kud.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-29T16:47:47.000Z","updated_at":"2026-04-18T00:09:04.000Z","dependencies_parsed_at":"2025-10-29T18:40:04.714Z","dependency_job_id":null,"html_url":"https://github.com/kud/mcp-jenkins","commit_stats":null,"previous_names":["kud/mcp-jenkins"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/kud/mcp-jenkins","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kud%2Fmcp-jenkins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kud%2Fmcp-jenkins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kud%2Fmcp-jenkins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kud%2Fmcp-jenkins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kud","download_url":"https://codeload.github.com/kud/mcp-jenkins/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kud%2Fmcp-jenkins/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32512670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","jenkins","mcp","mcp-server"],"created_at":"2025-11-01T06:01:28.372Z","updated_at":"2026-05-01T21:03:03.819Z","avatar_url":"https://github.com/kud.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jenkins MCP Server\n\n```\n     ██╗███████╗███╗   ██╗██╗  ██╗██╗███╗   ██╗███████╗    ███╗   ███╗ ██████╗██████╗\n     ██║██╔════╝████╗  ██║██║ ██╔╝██║████╗  ██║██╔════╝    ████╗ ████║██╔════╝██╔══██╗\n     ██║█████╗  ██╔██╗ ██║█████╔╝ ██║██╔██╗ ██║███████╗    ██╔████╔██║██║     ██████╔╝\n██   ██║██╔══╝  ██║╚██╗██║██╔═██╗ ██║██║╚██╗██║╚════██║    ██║╚██╔╝██║██║     ██╔═══╝\n╚█████╔╝███████╗██║ ╚████║██║  ██╗██║██║ ╚████║███████║    ██║ ╚═╝ ██║╚██████╗██║\n ╚════╝ ╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝╚═╝╚═╝  ╚═══╝╚══════╝    ╚═╝     ╚═╝ ╚═════╝╚═╝\n```\n\n\u003cdiv align=\"center\"\u003e\n\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.3+-blue?logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n[![Node.js](https://img.shields.io/badge/Node.js-20+-green?logo=node.js\u0026logoColor=white)](https://nodejs.org/)\n[![MCP](https://img.shields.io/badge/MCP-1.0-purple?logo=anthropic)](https://modelcontextprotocol.io/)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n**A Jenkins MCP server with 37 tools for managing jobs, builds, nodes, views, and CI/CD workflows**\n\n[Features](#-features) • [Quick Start](#-quick-start) • [Installation](#-installation-guides) • [Tools](#-available-tools) • [Development](#-development)\n\n\u003c/div\u003e\n\n---\n\n## 🌟 Features\n\n- **🔐 Flexible Authentication** - Bearer tokens, Basic auth, OAuth support\n- **⚙️ Flexible Configuration** - CLI args or `MCP_JENKINS_*` env vars (priority-based)\n- **🔒 Tool Filtering** - Allowlist or blocklist tools via `MCP_JENKINS_ALLOW_TOOLS` / `MCP_JENKINS_BLOCK_TOOLS`\n- **🔀 Multi-Instance Support** - Connect to multiple Jenkins servers in one MCP entry, select per tool call\n- **🛠️ 37 Tools** - Comprehensive Jenkins API coverage\n- **⚡ Modern Stack** - TypeScript 5.3+, ES2023, Native Fetch API\n- **📦 MCP Protocol** - Native integration with Claude Desktop, Claude Code CLI\n- **🔄 Real-time Monitoring** - Build status, queue management, pipeline stages\n- **🧪 Test Results** - View test pass/fail counts and suites\n- **🎯 Job Control** - Enable/disable, trigger, stop, replay builds\n- **📊 System Info** - Nodes, plugins, version info\n- **🔍 Debug Tools** - MCP inspector for testing\n\n---\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Node.js 20+\n- Jenkins API token ([how to get one](#-authentication))\n\n### Installation\n\n**Option 1: Via npm (recommended once published):**\n\n```bash\n# No installation needed! Just use npx in your MCP config\nnpx --yes @kud/mcp-jenkins@latest\n```\n\n**Option 2: Local installation:**\n\n```bash\ngit clone https://github.com/kud/mcp-jenkins.git\ncd mcp-jenkins\nnpm install\nnpm run build\n```\n\n### Configuration Priority\n\nThe server supports **2 ways** to provide configuration (highest to lowest priority):\n\n1. **CLI arguments** - `--url`, `--user`, `--api-token`, `--bearer-token`\n2. **`MCP_JENKINS_*` environment variables** - `MCP_JENKINS_URL`, `MCP_JENKINS_USER`, etc.\n\n### Quick Setup Example (Claude CLI)\n\n**Using environment variables (recommended):**\n\n```bash\nclaude mcp add --transport stdio --scope user jenkins \\\n  --env MCP_JENKINS_URL=https://your-jenkins.com \\\n  --env MCP_JENKINS_USER=your_username \\\n  --env MCP_JENKINS_API_TOKEN=your_token \\\n  -- npx --yes @kud/mcp-jenkins@latest\n```\n\n**Using CLI arguments (override env vars):**\n\n```bash\nclaude mcp add --transport stdio --scope user jenkins \\\n  -- npx --yes @kud/mcp-jenkins@latest \\\n  --url https://your-jenkins.com \\\n  --user your_username \\\n  --api-token your_token\n```\n\n**If installed locally:**\n\n```bash\nclaude mcp add --transport stdio --scope user jenkins \\\n  -- node ~/path/to/mcp-jenkins/dist/index.js \\\n  --url https://your-jenkins.com \\\n  --user your_username \\\n  --api-token your_token\n```\n\n✅ Done! Now you can use Jenkins commands in your AI assistant.\n\n---\n\n## 📚 Installation Guides\n\nChoose your development environment:\n\n- [Claude Code CLI](#-claude-code-cli) - Command line interface\n- [Claude Code Web](#-claude-code-web) - Browser-based Claude\n- [Claude Desktop](#%EF%B8%8F-claude-desktop) - Desktop application\n- [VSCode](#-vscode) - With Cline, Claude Dev, Continue\n- [Cursor](#-cursor) - AI-first IDE\n- [Windsurf](#-windsurf) - AI-powered code editor\n- [GitHub Copilot](#-github-copilot) - In VSCode or standalone\n- [GitHub Copilot CLI](#-github-copilot-cli) - Terminal tool\n- [JetBrains IDEs](#-all-jetbrains-ides) - IntelliJ, WebStorm, PyCharm, GoLand, etc.\n\n---\n\n### 🎯 Claude Code CLI\n\n**For:** Claude AI via command line interface\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eClick to expand Claude Code CLI setup\u003c/b\u003e\u003c/summary\u003e\n\nAdd the Jenkins MCP server to Claude CLI:\n\n**Via npm with env vars (recommended):**\n\n```bash\nclaude mcp add --transport stdio --scope user jenkins \\\n  --env MCP_JENKINS_URL=https://pipeline.yourcompany.com \\\n  --env MCP_JENKINS_USER=your_username \\\n  --env MCP_JENKINS_API_TOKEN=your_api_token \\\n  -- npx --yes @kud/mcp-jenkins@latest\n```\n\n**Via npm with CLI args:**\n\n```bash\nclaude mcp add --transport stdio --scope user jenkins \\\n  -- npx --yes @kud/mcp-jenkins@latest \\\n  --url https://pipeline.yourcompany.com \\\n  --user your_username \\\n  --api-token your_api_token\n```\n\n**Local installation with CLI args:**\n\n```bash\nclaude mcp add --transport stdio --scope user jenkins \\\n  -- node $HOME/path/to/mcp-jenkins/dist/index.js \\\n  --url https://pipeline.yourcompany.com \\\n  --user your_username \\\n  --api-token your_api_token\n```\n\n**Multiple Jenkins instances:**\n\n```bash\nclaude mcp add --transport stdio --scope user jenkins \\\n  --env MCP_JENKINS_URL=\"https://pipeline.yourcompany.com,https://scheduler.yourcompany.com\" \\\n  --env MCP_JENKINS_USER=\"your_username,your_username\" \\\n  --env MCP_JENKINS_API_TOKEN=\"token1,token2\" \\\n  -- npx --yes @kud/mcp-jenkins@latest\n# Instances named \"pipeline\" and \"scheduler\" automatically from hostnames\n```\n\nVerify: `claude mcp list` should show `jenkins`\n\n\u003c/details\u003e\n\n---\n\n### 🌐 Claude Code Web\n\n**For:** Claude.ai in your browser\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eClick to expand Claude Web setup\u003c/b\u003e\u003c/summary\u003e\n\n**⚠️ Not supported.** Claude.ai web interface doesn't support custom MCP servers yet.\n\n**Alternatives:**\n\n- Use desktop clients (see below)\n- Use CLI tools (see above)\n- Test via MCP Inspector: `npm run inspect:dev` → `http://localhost:5173`\n\n\u003c/details\u003e\n\n---\n\n### 🖥️ Claude Desktop\n\n**For:** Claude AI desktop application\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eClick to expand Claude Desktop setup\u003c/b\u003e\u003c/summary\u003e\n\n#### 1. Open Configuration File\n\n**macOS:**\n\n```bash\nopen ~/Library/Application\\ Support/Claude/claude_desktop_config.json\n```\n\n**Windows:**\n\n```bash\nnotepad %APPDATA%\\Claude\\claude_desktop_config.json\n```\n\n#### 2. Add Configuration\n\n**Via npm with env vars (recommended):**\n\n```json\n{\n  \"mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"npx\",\n      \"args\": [\"--yes\", \"@kud/mcp-jenkins@latest\"],\n      \"env\": {\n        \"MCP_JENKINS_URL\": \"https://pipeline.yourcompany.com\",\n        \"MCP_JENKINS_USER\": \"your_username\",\n        \"MCP_JENKINS_API_TOKEN\": \"your_api_token\"\n      }\n    }\n  }\n}\n```\n\n**Via npm with CLI args:**\n\n```json\n{\n  \"mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"--yes\",\n        \"@kud/mcp-jenkins@latest\",\n        \"--url\",\n        \"https://pipeline.yourcompany.com\",\n        \"--user\",\n        \"your_username\",\n        \"--api-token\",\n        \"your_api_token\"\n      ]\n    }\n  }\n}\n```\n\n**Local installation with CLI args:**\n\n```json\n{\n  \"mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"node\",\n      \"args\": [\n        \"/absolute/path/to/mcp-jenkins/dist/index.js\",\n        \"--url\",\n        \"https://pipeline.yourcompany.com\",\n        \"--user\",\n        \"your_username\",\n        \"--api-token\",\n        \"your_api_token\"\n      ]\n    }\n  }\n}\n```\n\n**Bearer token example:**\n\n```json\n{\n  \"mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"--yes\",\n        \"@kud/mcp-jenkins@latest\",\n        \"--url\",\n        \"https://pipeline.yourcompany.com\",\n        \"--bearer-token\",\n        \"your_bearer_token\"\n      ]\n    }\n  }\n}\n```\n\n**Multiple Jenkins instances:**\n\n```json\n{\n  \"mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"npx\",\n      \"args\": [\"--yes\", \"@kud/mcp-jenkins@latest\"],\n      \"env\": {\n        \"MCP_JENKINS_URL\": \"https://pipeline.yourcompany.com,https://scheduler.yourcompany.com\",\n        \"MCP_JENKINS_USER\": \"your_username,your_username\",\n        \"MCP_JENKINS_API_TOKEN\": \"token1,token2\"\n      }\n    }\n  }\n}\n```\n\n#### 3. Restart\n\nQuit (Cmd+Q / Alt+F4) and reopen Claude Desktop\n\n\u003c/details\u003e\n\n---\n\n### 📝 VSCode\n\n**For:** VSCode with MCP-compatible extensions (Cline, Claude Dev, Continue)\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eClick to expand VSCode setup\u003c/b\u003e\u003c/summary\u003e\n\n**Cline:**\n\nSettings (Cmd+, / Ctrl+,) → Search \"Cline: MCP Settings\" → Edit in settings.json:\n\n```json\n{\n  \"cline.mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"npx\",\n      \"args\": [\"@kud/mcp-jenkins\"],\n      \"env\": {\n        \"MCP_JENKINS_URL\": \"https://pipeline.yourcompany.com\",\n        \"MCP_JENKINS_USER\": \"your_username\",\n        \"MCP_JENKINS_API_TOKEN\": \"your_api_token\"\n      }\n    }\n  }\n}\n```\n\n**Multiple Jenkins instances:**\n\n```json\n{\n  \"cline.mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"npx\",\n      \"args\": [\"@kud/mcp-jenkins\"],\n      \"env\": {\n        \"MCP_JENKINS_URL\": \"https://pipeline.yourcompany.com,https://scheduler.yourcompany.com\",\n        \"MCP_JENKINS_USER\": \"your_username,your_username\",\n        \"MCP_JENKINS_API_TOKEN\": \"token1,token2\"\n      }\n    }\n  }\n}\n```\n\nOr for local installation, use `\"command\": \"node\"` and `\"args\": [\"/absolute/path/to/mcp-jenkins/dist/index.js\"]`\n\n**Claude Dev / Continue:**\n\nCommand Palette (Cmd+Shift+P) → \"MCP: Edit Config\" → Add similar configuration\n\nReload window after configuration\n\n\u003c/details\u003e\n\n---\n\n### 🌐 Cursor\n\n**For:** Cursor IDE with built-in AI\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eClick to expand Cursor setup\u003c/b\u003e\u003c/summary\u003e\n\nSettings (Cmd+, / Ctrl+,) → Search \"MCP\" → Edit Config or open `~/.cursor/mcp_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"npx\",\n      \"args\": [\"--yes\", \"@kud/mcp-jenkins@latest\"],\n      \"env\": {\n        \"MCP_JENKINS_URL\": \"https://pipeline.yourcompany.com\",\n        \"MCP_JENKINS_USER\": \"your_username\",\n        \"MCP_JENKINS_API_TOKEN\": \"your_api_token\"\n      }\n    }\n  }\n}\n```\n\n**Multiple Jenkins instances:**\n\n```json\n{\n  \"mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"npx\",\n      \"args\": [\"--yes\", \"@kud/mcp-jenkins@latest\"],\n      \"env\": {\n        \"MCP_JENKINS_URL\": \"https://pipeline.yourcompany.com,https://scheduler.yourcompany.com\",\n        \"MCP_JENKINS_USER\": \"your_username,your_username\",\n        \"MCP_JENKINS_API_TOKEN\": \"token1,token2\"\n      }\n    }\n  }\n}\n```\n\nOr for local installation, use `\"command\": \"node\"` and `\"args\": [\"/absolute/path/to/mcp-jenkins/dist/index.js\"]`\n\nRestart Cursor (Cmd+Q / Alt+F4) after configuration\n\n\u003c/details\u003e\n\n---\n\n### 🌊 Windsurf\n\n**For:** Windsurf AI-powered code editor\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eClick to expand Windsurf setup\u003c/b\u003e\u003c/summary\u003e\n\nSettings → **AI Settings** → **Model Context Protocol** → Add Server:\n\n```json\n{\n  \"mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"npx\",\n      \"args\": [\"--yes\", \"@kud/mcp-jenkins@latest\"],\n      \"env\": {\n        \"MCP_JENKINS_URL\": \"https://pipeline.yourcompany.com\",\n        \"MCP_JENKINS_USER\": \"your_username\",\n        \"MCP_JENKINS_API_TOKEN\": \"your_api_token\"\n      }\n    }\n  }\n}\n```\n\n**Multiple Jenkins instances:**\n\n```json\n{\n  \"mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"npx\",\n      \"args\": [\"--yes\", \"@kud/mcp-jenkins@latest\"],\n      \"env\": {\n        \"MCP_JENKINS_URL\": \"https://pipeline.yourcompany.com,https://scheduler.yourcompany.com\",\n        \"MCP_JENKINS_USER\": \"your_username,your_username\",\n        \"MCP_JENKINS_API_TOKEN\": \"token1,token2\"\n      }\n    }\n  }\n}\n```\n\nOr edit `~/.windsurf/mcp_settings.json` directly. For local installation, use `\"command\": \"node\"` with full path.\n\nRestart Windsurf after configuration.\n\n\u003c/details\u003e\n\n---\n\n### 🤖 GitHub Copilot\n\n**For:** GitHub Copilot in VSCode or other editors\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eClick to expand GitHub Copilot setup\u003c/b\u003e\u003c/summary\u003e\n\n**⚠️ Not supported.** GitHub Copilot doesn't support MCP servers.\n\n**Options:**\n\n- **In VSCode:** Install Copilot + Cline/Claude Dev. Use Copilot for coding, Cline/Claude Dev for Jenkins (see VSCode section)\n- **In terminal:** Use Copilot for coding suggestions, an MCP-compatible CLI for Jenkins (see CLI sections above)\n- **No MCP:** Use code in `src/lib/jenkins-client.ts` as examples for direct API calls\n\n\u003c/details\u003e\n\n---\n\n### 💻 GitHub Copilot CLI\n\n**For:** New GitHub Copilot CLI (`@github/copilot`) in your terminal\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eClick to expand GitHub Copilot CLI setup\u003c/b\u003e\u003c/summary\u003e\n\n**Note:** This is for the NEW Copilot CLI (`npm install -g @github/copilot`), not the old `gh copilot` extension.\n\n#### Option 1: Config File with Env Vars (Recommended)\n\nCreate or edit `~/.copilot/mcp-config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"npx\",\n      \"args\": [\"--yes\", \"@kud/mcp-jenkins@latest\"],\n      \"env\": {\n        \"MCP_JENKINS_URL\": \"https://pipeline.yourcompany.com\",\n        \"MCP_JENKINS_USER\": \"your_username\",\n        \"MCP_JENKINS_API_TOKEN\": \"your_api_token\"\n      }\n    }\n  }\n}\n```\n\nThen run: `copilot`\n\n#### Option 2: Config File with CLI Args\n\n```json\n{\n  \"mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"--yes\",\n        \"@kud/mcp-jenkins@latest\",\n        \"--url\",\n        \"https://pipeline.yourcompany.com\",\n        \"--user\",\n        \"your_username\",\n        \"--api-token\",\n        \"your_api_token\"\n      ]\n    }\n  }\n}\n```\n\n#### Option 3: Inline Config with CLI Args\n\nPass MCP config directly via command line:\n\n```bash\ncopilot --additional-mcp-config '{\n  \"mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"--yes\", \"@kud/mcp-jenkins@latest\",\n        \"--url\", \"https://pipeline.yourcompany.com\",\n        \"--user\", \"your_username\",\n        \"--api-token\", \"your_api_token\"\n      ]\n    }\n  }\n}'\n```\n\nOr save to a file and reference it:\n\n```bash\n# Save config to jenkins-mcp.json\ncopilot --additional-mcp-config @jenkins-mcp.json\n```\n\nFor local installation, use `\"command\": \"node\"` with path in args:\n\n```json\n\"args\": [\"/absolute/path/to/mcp-jenkins/dist/index.js\", \"--url\", \"...\", \"--user\", \"...\", \"--api-token\", \"...\"]\n```\n\n#### Option 4: Multiple Jenkins instances\n\n```json\n{\n  \"mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"npx\",\n      \"args\": [\"--yes\", \"@kud/mcp-jenkins@latest\"],\n      \"env\": {\n        \"MCP_JENKINS_URL\": \"https://pipeline.yourcompany.com,https://scheduler.yourcompany.com\",\n        \"MCP_JENKINS_USER\": \"your_username,your_username\",\n        \"MCP_JENKINS_API_TOKEN\": \"token1,token2\"\n      }\n    }\n  }\n}\n```\n\n#### Option 5: Allow All Tools (Non-Interactive)\n\nFor scripts and automation:\n\n```bash\ncopilot --allow-all-tools -p \"Check status of mobile-pipeline build\"\n```\n\n\u003c/details\u003e\n\n---\n\n### 🔧 All JetBrains IDEs\n\n**For:** IntelliJ IDEA, WebStorm, PyCharm, GoLand, RubyMine, PhpStorm, Rider, CLion, DataGrip\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eClick to expand JetBrains IDEs setup\u003c/b\u003e\u003c/summary\u003e\n\nSettings (Cmd+, / Ctrl+,) → **Tools** → **AI Assistant** → **Model Context Protocol** → Add Server:\n\n- **Name:** Jenkins\n- **Command:** `npx`\n- **Arguments:** `--yes @kud/mcp-jenkins@latest`\n- **Environment Variables:**\n  ```\n  MCP_JENKINS_URL=https://pipeline.yourcompany.com\n  MCP_JENKINS_USER=your_username\n  MCP_JENKINS_API_TOKEN=your_api_token\n  ```\n\n**Multiple Jenkins instances:** set these environment variables:\n\n```\nMCP_JENKINS_URL=https://pipeline.yourcompany.com,https://scheduler.yourcompany.com\nMCP_JENKINS_USER=your_username,your_username\nMCP_JENKINS_API_TOKEN=token1,token2\n```\n\nFor local installation, use **Command:** `node` and **Arguments:** `/absolute/path/to/mcp-jenkins/dist/index.js`\n\nApply and restart the IDE.\n\n**Alternative:** If MCP not available, use MCP-compatible CLI from built-in terminal (Alt+F12 / ⌥F12)\n\n**Notes:**\n\n- Ultimate/Professional editions: Full AI Assistant MCP support\n- Community editions: Use MCP-compatible CLI from terminal instead\n\n\u003c/details\u003e\n\n---\n\n## 🛠️ Available Tools\n\n### 📋 Job Operations (11 tools)\n\n| Tool                        | Description                         |\n| --------------------------- | ----------------------------------- |\n| `jenkins_list_jobs`         | List all Jenkins jobs               |\n| `jenkins_search_jobs`       | Search jobs by name                 |\n| `jenkins_get_job_status`    | Get last build status               |\n| `jenkins_enable_job`        | Enable a disabled job               |\n| `jenkins_disable_job`       | Disable a job                       |\n| `jenkins_delete_job`        | Delete a job (⚠️ permanent)         |\n| `jenkins_get_job_config`    | Get job XML configuration           |\n| `jenkins_create_job`        | Create a new job from XML config    |\n| `jenkins_update_job_config` | Update an existing job's XML config |\n| `jenkins_rename_job`        | Rename a job                        |\n| `jenkins_copy_job`          | Copy/duplicate a job                |\n\n### 🔨 Build Operations (9 tools)\n\n| Tool                          | Description                |\n| ----------------------------- | -------------------------- |\n| `jenkins_get_build_status`    | Get specific build status  |\n| `jenkins_get_recent_builds`   | Get recent builds (last N) |\n| `jenkins_trigger_build`       | Trigger a new build        |\n| `jenkins_stop_build`          | Stop/abort running build   |\n| `jenkins_delete_build`        | Delete a build             |\n| `jenkins_replay_build`        | Replay a pipeline build    |\n| `jenkins_get_console_log`     | Get build console output   |\n| `jenkins_get_build_changes`   | Get Git commits for build  |\n| `jenkins_get_pipeline_stages` | Get pipeline stage status  |\n\n### 🧪 Testing \u0026 Artifacts (3 tools)\n\n| Tool                       | Description                |\n| -------------------------- | -------------------------- |\n| `jenkins_get_test_results` | Get test pass/fail counts  |\n| `jenkins_list_artifacts`   | List build artifacts       |\n| `jenkins_get_artifact`     | Download artifact (base64) |\n\n### 📊 Queue Management (2 tools)\n\n| Tool                   | Description         |\n| ---------------------- | ------------------- |\n| `jenkins_get_queue`    | View pending builds |\n| `jenkins_cancel_queue` | Cancel queued build |\n\n### 🖥️ System \u0026 Nodes (8 tools)\n\n| Tool                          | Description                             |\n| ----------------------------- | --------------------------------------- |\n| `jenkins_list_nodes`          | List all agents/nodes                   |\n| `jenkins_get_node`            | Get detailed info on a specific node    |\n| `jenkins_toggle_node_offline` | Toggle a node online/offline            |\n| `jenkins_get_system_info`     | Get Jenkins system info                 |\n| `jenkins_get_version`         | Get Jenkins version                     |\n| `jenkins_get_plugins`         | List installed plugins                  |\n| `jenkins_quiet_down`          | Enable quiet mode (⚠️ requires confirm) |\n| `jenkins_cancel_quiet_down`   | Cancel quiet mode                       |\n\n### 🗂️ Views (2 tools)\n\n| Tool                 | Description                     |\n| -------------------- | ------------------------------- |\n| `jenkins_list_views` | List all views with their jobs  |\n| `jenkins_get_view`   | Get details for a specific view |\n\n### 🔀 Instances \u0026 Admin (2 tools)\n\n| Tool                     | Description                                   |\n| ------------------------ | --------------------------------------------- |\n| `jenkins_list_instances` | List all configured instances with their URLs |\n| `jenkins_safe_restart`   | Safely restart Jenkins (⚠️ requires confirm)  |\n\n**Total: 37 Tools** covering ~95% of Jenkins API operations!\n\n---\n\n## 💬 Example Conversations\n\nOnce configured, interact with Jenkins naturally:\n\n```\nYou: \"List all my Jenkins jobs\"\nAI: *Shows list of all jobs*\n\nYou: \"What's the status of the 'api-backend' build?\"\nAI: *Shows latest build status, duration, result*\n\nYou: \"Get the test results for build #42 of 'mobile-pipeline'\"\nAI: *Shows pass/fail counts, test suites*\n\nYou: \"Show me the pipeline stages for that failed build\"\nAI: *Shows which stage failed and durations*\n\nYou: \"Trigger a build for 'deploy-staging' with VERSION=2.1.0\"\nAI: *Triggers build with parameters*\n\nYou: \"Stop build #966 of 'mobile-pipeline'\"\nAI: *Stops the running build*\n\nYou: \"Show me the queue\"\nAI: *Lists all pending builds*\n\nYou: \"What version of Jenkins are we running?\"\nAI: *Shows Jenkins version*\n```\n\n---\n\n## 🧪 Development\n\n### Project Structure\n\n```\nmcp-jenkins/\n├── src/\n│   ├── common/              # Shared utilities\n│   │   ├── env.ts           # Environment config\n│   │   ├── errors.ts        # Error handling\n│   │   ├── http.ts          # HTTP client (native fetch)\n│   │   ├── logger.ts        # JSON logging\n│   │   └── index.ts         # Exports\n│   ├── lib/\n│   │   └── jenkins-client.ts  # Jenkins API client\n│   ├── tools/               # 25 MCP tool implementations\n│   │   ├── get-job-status.ts\n│   │   ├── trigger-build.ts\n│   │   ├── get-test-results.ts\n│   │   ├── stop-build.ts\n│   │   └── ... (21 more)\n│   └── index.ts             # MCP server entrypoint\n├── dist/                    # Compiled output\n├── package.json\n├── tsconfig.json\n└── README.md\n```\n\n### Available Scripts\n\n| Script                | Description                      |\n| --------------------- | -------------------------------- |\n| `npm run build`       | Compile TypeScript to JavaScript |\n| `npm run build:watch` | Watch mode - rebuild on changes  |\n| `npm run dev`         | Run in development (tsx)         |\n| `npm start`           | Run compiled server              |\n| `npm run inspect`     | Open MCP inspector               |\n| `npm run inspect:dev` | Inspector in dev mode (no build) |\n| `npm run typecheck`   | Type check without building      |\n| `npm run clean`       | Remove build artifacts           |\n\n### Development Workflow\n\n```bash\n# Terminal 1: Watch mode\nnpm run build:watch\n\n# Terminal 2: Test with inspector\nnpm run inspect:dev\n```\n\n### Testing with MCP Inspector\n\n```bash\nexport MCP_JENKINS_URL=https://pipeline.yourcompany.com\nexport MCP_JENKINS_USER=your_username\nexport MCP_JENKINS_API_TOKEN=your_token\n\nnpm run inspect:dev\n```\n\nOpens `http://localhost:5173` - test all tools interactively!\n\n### Adding New Tools\n\n1. Create tool file in `src/tools/`:\n\n```typescript\n// src/tools/my-new-tool.ts\nimport { JenkinsClient } from \"../lib/jenkins-client.js\"\n\nexport interface MyToolInput {\n  someParam: string\n}\n\nexport const myNewTool = async (client: JenkinsClient, input: MyToolInput) =\u003e {\n  // Implementation\n  return { result: \"success\" }\n}\n```\n\n2. Add method to `JenkinsClient` (src/lib/jenkins-client.ts)\n\n3. Register in `src/index.ts`:\n   - Import the tool\n   - Add to `tools` array\n   - Add to `toolHandlers` map\n\n4. Rebuild:\n\n```bash\nnpm run build\n```\n\n---\n\n## ⚙️ Configuration\n\n### Priority System\n\nThe server uses a **2-tier priority system** for configuration:\n\n1. **CLI Arguments** (Highest Priority)\n   - `--url \u003curl\u003e` - Jenkins server URL\n   - `--user \u003cusername\u003e` - Username for Basic auth\n   - `--api-token \u003ctoken\u003e` - API token for Basic auth\n   - `--bearer-token \u003ctoken\u003e` - Bearer token for OAuth/token auth\n\n2. **`MCP_JENKINS_*` Environment Variables**\n   - `MCP_JENKINS_URL`\n   - `MCP_JENKINS_USER`\n   - `MCP_JENKINS_API_TOKEN`\n   - `MCP_JENKINS_BEARER_TOKEN`\n\n### Multiple Instances\n\nConnect to more than one Jenkins server in a single MCP entry using comma or pipe-separated values.\n\n**Automatic naming (derived from URL hostname):**\n\n```bash\nexport MCP_JENKINS_URL=\"https://pipeline.yourcompany.com,https://scheduler.yourcompany.com\"\nexport MCP_JENKINS_USER=\"your_username,your_username\"\nexport MCP_JENKINS_API_TOKEN=\"token1,token2\"\n# Instances are automatically named \"pipeline\" and \"scheduler\"\n```\n\n**Custom naming with `MCP_JENKINS_INSTANCES`:**\n\nUse `MCP_JENKINS_INSTANCES` when you want explicit names (e.g., the hostname isn't descriptive enough, or both instances share the same host):\n\n```bash\nexport MCP_JENKINS_INSTANCES=\"ci,prod\"\nexport MCP_JENKINS_URL=\"https://jenkins.yourcompany.com/ci,https://jenkins.yourcompany.com/prod\"\nexport MCP_JENKINS_USER=\"your_username,your_username\"\nexport MCP_JENKINS_API_TOKEN=\"token1,token2\"\n# Instances are named \"ci\" and \"prod\"\n```\n\nThe number of values in `MCP_JENKINS_INSTANCES` must match the number of URLs.\n\nThen pass `instance` in tool calls:\n\n```\n\"Trigger a build for 'deploy' on the scheduler instance\"\n\"List jobs on ci\"\n```\n\nThe first instance is always the default — tools work without `instance` if you only have one server.\n\n\u003e **Note:** Use `|` as delimiter instead of `,` if any value might contain a comma (e.g., unusual URLs).\n\n---\n\n### Tool Filtering\n\nControl which tools are exposed to the AI using an allowlist or blocklist.\n\n**Allowlist** — expose only specific tools:\n\n```bash\nexport MCP_JENKINS_ALLOW_TOOLS=\"jenkins_list_jobs,jenkins_get_job_status,jenkins_get_build_status\"\n```\n\n**Blocklist** — hide specific tools (all others remain available):\n\n```bash\nexport MCP_JENKINS_BLOCK_TOOLS=\"jenkins_delete_job,jenkins_trigger_build,jenkins_safe_restart\"\n```\n\nIf both are set, `MCP_JENKINS_ALLOW_TOOLS` takes precedence.\n\n**Read-only monitoring preset** — block all write/destructive tools:\n\n```bash\nexport MCP_JENKINS_BLOCK_TOOLS=\"jenkins_trigger_build,jenkins_stop_build,jenkins_delete_build,jenkins_cancel_queue,jenkins_enable_job,jenkins_disable_job,jenkins_delete_job,jenkins_create_job,jenkins_update_job_config,jenkins_rename_job,jenkins_copy_job,jenkins_toggle_node_offline,jenkins_quiet_down,jenkins_cancel_quiet_down,jenkins_safe_restart,jenkins_replay_build\"\n```\n\n---\n\n### Examples\n\n**All CLI args:**\n\n```bash\nnode dist/index.js --url https://jenkins.com --user admin --api-token abc123\n```\n\n**Mixed (CLI overrides env):**\n\n```bash\nMCP_JENKINS_USER=dev_user node dist/index.js --url https://jenkins.com --api-token xyz789\n# Uses: URL from CLI, token from CLI, user from env\n```\n\n---\n\n## 🔐 Authentication\n\n### Get Your Jenkins API Token\n\nFollow these steps to create an API token for the MCP server:\n\n#### Step 1: Access Security Settings\n\n1. Log in to your Jenkins instance\n2. Click your **username** in the top-right corner\n3. Select **Configure** from the dropdown menu\n4. In the left sidebar, click **Security**\n\n#### Step 2: Create API Token\n\n1. Scroll to the **API Token** section\n2. Under \"Current token(s)\", click the **Add new token** button\n3. Enter a descriptive name (e.g., \"Jenkins MCP\" or \"AI Assistant\")\n4. Click **Generate**\n5. **⚠️ IMPORTANT:** Copy the token immediately - it will only be shown once!\n\n#### Step 3: Save the Token\n\nStore the token securely - you'll need it for configuration:\n\n- For Bearer Token auth: Use it as `MCP_JENKINS_BEARER_TOKEN`\n- For Basic auth: Use it as `MCP_JENKINS_API_TOKEN` (along with `MCP_JENKINS_USER`)\n\n**Example token format:** `11abcd1234567890abcdef1234567890ab`\n\n\u003e 💡 **Tip:** You can see all your active tokens in the \"Current token(s)\" list. Each shows when it was created and last used, helping you manage and rotate tokens regularly.\n\n### Bearer Token vs Basic Auth\n\n**Bearer Token (Recommended):**\n\n```bash\n--env MCP_JENKINS_BEARER_TOKEN=your_token\n```\n\n**Basic Auth:**\n\n```bash\n--env MCP_JENKINS_USER=your_username\n--env MCP_JENKINS_API_TOKEN=your_token\n```\n\n### OAuth Support\n\nThis server forwards any `Authorization` header to Jenkins. If your Jenkins uses OAuth (via plugins), just pass the OAuth token as `MCP_JENKINS_BEARER_TOKEN`.\n\n---\n\n## 🐛 Troubleshooting\n\n### Server Not Showing in Claude\n\n1. ✅ Check path is absolute\n2. ✅ Run `npm install \u0026\u0026 npm run build`\n3. ✅ Verify environment variables\n4. ✅ Restart Claude completely\n\n### Authentication Errors\n\n```bash\n# Test your credentials\ncurl -u username:token https://your-jenkins.com/api/json\n```\n\nIf this returns JSON, your credentials are valid!\n\n### Build Errors\n\n```bash\n# Clean rebuild\nnpm run clean \u0026\u0026 npm run build\n```\n\n### Check Logs\n\n**Claude Desktop logs:**\n\n- macOS: `~/Library/Logs/Claude/mcp*.log`\n- Windows: `%APPDATA%\\Claude\\logs\\mcp*.log`\n\n**Claude Code CLI logs:**\n\n```bash\nclaude mcp get jenkins\n```\n\n---\n\n## 🔒 Security Best Practices\n\n- ✅ Use environment variables (never hardcode tokens)\n- ✅ Use bearer tokens over basic auth when possible\n- ✅ Rotate tokens regularly\n- ✅ Use restricted tokens (limit permissions in Jenkins)\n- ✅ Never commit tokens to version control\n- ✅ Protect config files (`claude_desktop_config.json`)\n\n---\n\n## 📊 Tech Stack\n\n- **Runtime:** Node.js 20+\n- **Language:** TypeScript 5.3+\n- **Target:** ES2023\n- **Protocol:** MCP 1.0 (stdio transport)\n- **HTTP Client:** Native Fetch API\n- **Module System:** ESM\n\n---\n\n## 🤝 Contributing\n\nContributions welcome! Please ensure:\n\n1. TypeScript strict mode compliance\n2. All tools properly typed\n3. Build passes: `npm run build`\n4. Tools registered in both `tools` array and `toolHandlers`\n\n---\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) file\n\n---\n\n## 🙏 Acknowledgments\n\n- Built with [Model Context Protocol](https://modelcontextprotocol.io/)\n- Jenkins REST API by [Jenkins Project](https://www.jenkins.io/)\n\n---\n\n## 📮 Support\n\n- 🐛 **Issues:** [GitHub Issues](https://github.com/kud/mcp-jenkins/issues)\n- 💬 **Discussions:** [GitHub Discussions](https://github.com/kud/mcp-jenkins/discussions)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Made with ❤️ for the DevOps \u0026 AI community**\n\n⭐ Star this repo if it helped you!\n\n[Back to Top](#jenkins-mcp-server)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkud%2Fmcp-jenkins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkud%2Fmcp-jenkins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkud%2Fmcp-jenkins/lists"}