{"_id":"@ashwinighuge/jenkins-mcp-server","_rev":"7-0656d16533fa773f4d7b60bbf9e40d6b","name":"@ashwinighuge/jenkins-mcp-server","dist-tags":{"latest":"1.0.7"},"versions":{"1.0.1":{"name":"@ashwinighuge/jenkins-mcp-server","version":"1.0.1","keywords":["mcp","jenkins","claude","ci-cd","automation","build","deployment"],"author":{"name":"Ashwini Ghuge","email":"your-email@example.com"},"license":"Apache-2.0","_id":"@ashwinighuge/jenkins-mcp-server@1.0.1","maintainers":[{"name":"ashwinighuge","email":"ashwinighuge1@gmail.com"}],"homepage":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server#readme","bugs":{"url":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server/issues"},"bin":{"jenkins-mcp":"bin/jenkins-mcp.js"},"dist":{"shasum":"c30eefed8e333a86ef0d51505f600214094d37b2","tarball":"https://registry.npmjs.org/@ashwinighuge/jenkins-mcp-server/-/jenkins-mcp-server-1.0.1.tgz","fileCount":4,"integrity":"sha512-g0vxqEl+P2ZqDROhR8VFWDcnEkT1Cuf8oXNF33Kva0xdHd0whyoz7dBnXA2850pws22yrVpCj432+Yyzv/OrMQ==","signatures":[{"sig":"MEUCIBPQzMZk+AYRBq+A/n/F388giy1UqANY2ASY8Hsd2lwlAiEA1J7fob7Y7WDpwWNGVBl0+rT3QSDQ7bDDp49+f1iPiAw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31633},"main":"bin/jenkins-mcp.js","engines":{"node":">=14.0.0"},"gitHead":"2d924f9a97e68e81120856f0648ee6a76d937f9a","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepare":"chmod +x bin/jenkins-mcp.js"},"_npmUser":{"name":"ashwinighuge","email":"ashwinighuge1@gmail.com"},"repository":{"url":"git+https://github.com/AshwiniGhuge3012/jenkins-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"An MCP server for interacting with a Jenkins CI/CD server. Allows you to trigger jobs, check build statuses, and manage your Jenkins instance through MCP.","directories":{},"_nodeVersion":"22.16.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"python3":">=3.12.0"},"_npmOperationalInternal":{"tmp":"tmp/jenkins-mcp-server_1.0.1_1754314037284_0.60773019741913","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@ashwinighuge/jenkins-mcp-server","version":"1.0.2","keywords":["mcp","jenkins","claude","ci-cd","automation","build","deployment"],"author":{"name":"Ashwini Ghuge","email":"your-email@example.com"},"license":"Apache-2.0","_id":"@ashwinighuge/jenkins-mcp-server@1.0.2","maintainers":[{"name":"ashwinighuge","email":"ashwinighuge1@gmail.com"}],"homepage":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server#readme","bugs":{"url":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server/issues"},"bin":{"jenkins-mcp":"bin/jenkins-mcp.js"},"dist":{"shasum":"07b0175a431e12b2785efc73dc9e53599573889b","tarball":"https://registry.npmjs.org/@ashwinighuge/jenkins-mcp-server/-/jenkins-mcp-server-1.0.2.tgz","fileCount":4,"integrity":"sha512-EFurB3YDpY4e76H2/IZWYBOcqyg1cEPJEaXN86K+9IwgjV8c8JNxX/GLqsq7vNZ8/MzSiriKU6AvvZELtcIe/w==","signatures":[{"sig":"MEUCIBMTIBT9QvrhTvIkH3WsM7Y0ahQaRmjBrNF6NcdEr9L/AiEAqUFLxTYH2cGAPgg6TUquqkq2yQ8X1XaykFojRMQLCM4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31634},"main":"bin/jenkins-mcp.js","engines":{"node":">=14.0.0"},"gitHead":"9ae5dc8db10e19929900fd2f88e3f041c10e9cf7","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepare":"chmod +x bin/jenkins-mcp.js"},"_npmUser":{"name":"ashwinighuge","email":"ashwinighuge1@gmail.com"},"repository":{"url":"git+https://github.com/AshwiniGhuge3012/jenkins-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"An MCP server for interacting with a Jenkins CI/CD server. Allows you to trigger jobs, check build statuses, and manage your Jenkins instance through MCP.","directories":{},"_nodeVersion":"22.16.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"python3":">=3.12.0"},"_npmOperationalInternal":{"tmp":"tmp/jenkins-mcp-server_1.0.2_1754315520358_0.14353927001696531","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@ashwinighuge/jenkins-mcp-server","version":"1.0.3","keywords":["mcp","jenkins","claude","ci-cd","automation","build","deployment"],"author":{"name":"Ashwini Ghuge","email":"your-email@example.com"},"license":"Apache-2.0","_id":"@ashwinighuge/jenkins-mcp-server@1.0.3","maintainers":[{"name":"ashwinighuge","email":"ashwinighuge1@gmail.com"}],"homepage":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server#readme","bugs":{"url":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server/issues"},"bin":{"jenkins-mcp":"bin/jenkins-mcp.js"},"dist":{"shasum":"c7bf1d6b0a0d00a0b584a7d311fd2f64d04a29eb","tarball":"https://registry.npmjs.org/@ashwinighuge/jenkins-mcp-server/-/jenkins-mcp-server-1.0.3.tgz","fileCount":4,"integrity":"sha512-WLMmkQ/5/xqed+gaLMhu8jfx6AaRzxK0oiBYYZwhG+Wm6nH8T30OeMQ4faq2YPPXjks7EbG+jeBKToallpwO/w==","signatures":[{"sig":"MEUCIBrM/hogcSFQgXOBj4BwziP3tEnOqFUTFrAU+ZUtZGP/AiEA2wjqFwKSBmen8jyLpgWRazU+MRp5qGXSbq6c1rnCREo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31621},"main":"bin/jenkins-mcp.js","engines":{"node":">=14.0.0"},"gitHead":"b13d5efb4cdbe741e092077836433d035f25a16e","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepare":"chmod +x bin/jenkins-mcp.js"},"_npmUser":{"name":"ashwinighuge","email":"ashwinighuge1@gmail.com"},"repository":{"url":"git+https://github.com/AshwiniGhuge3012/jenkins-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"An MCP server for interacting with a Jenkins CI/CD server. Allows you to trigger jobs, check build statuses, and manage your Jenkins instance through MCP.","directories":{},"_nodeVersion":"22.16.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"python":">=3.12.0"},"_npmOperationalInternal":{"tmp":"tmp/jenkins-mcp-server_1.0.3_1754316623999_0.3440307703964427","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@ashwinighuge/jenkins-mcp-server","version":"1.0.4","keywords":["mcp","jenkins","claude","ci-cd","automation","build","deployment"],"author":{"name":"Ashwini Ghuge","email":"your-email@example.com"},"license":"Apache-2.0","_id":"@ashwinighuge/jenkins-mcp-server@1.0.4","maintainers":[{"name":"ashwinighuge","email":"ashwinighuge1@gmail.com"}],"homepage":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server#readme","bugs":{"url":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server/issues"},"bin":{"jenkins-mcp":"bin/jenkins-mcp.js"},"dist":{"shasum":"fe85764ef3a501fa186c1352e8a6f2ce4f79cfce","tarball":"https://registry.npmjs.org/@ashwinighuge/jenkins-mcp-server/-/jenkins-mcp-server-1.0.4.tgz","fileCount":5,"integrity":"sha512-6fXQsvCA+CVWUt93Z6exdPI+rW8feIXt7invEzdfeWD7THJ0kQLor4w/+YNqcI2VwDwsFH2FUtoZJpr08iVTuQ==","signatures":[{"sig":"MEUCIAjjcX7ZcESjmNwODbSFofyNSs8OjIGOONYRH1Cr/xNBAiEA3zXfpGiNSLBEh2sXmgtWq4Wv6n+oMDarUbzpyf9YQ1g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34430},"main":"bin/jenkins-mcp.js","engines":{"node":">=14.0.0"},"gitHead":"d9227c49cc97a33d9f6e8624e084e8bff0d4eabd","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepare":"chmod +x bin/jenkins-mcp.js","postinstall":"node scripts/check-python.js"},"_npmUser":{"name":"ashwinighuge","email":"ashwinighuge1@gmail.com"},"repository":{"url":"git+https://github.com/AshwiniGhuge3012/jenkins-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"An MCP server for interacting with a Jenkins CI/CD server. Allows you to trigger jobs, check build statuses, and manage your Jenkins instance through MCP.","directories":{},"_nodeVersion":"22.16.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jenkins-mcp-server_1.0.4_1754322545157_0.8846392886000927","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@ashwinighuge/jenkins-mcp-server","version":"1.0.5","keywords":["mcp","jenkins","claude","ci-cd","automation","build","deployment"],"author":{"name":"Ashwini Ghuge","email":"your-email@example.com"},"license":"Apache-2.0","_id":"@ashwinighuge/jenkins-mcp-server@1.0.5","maintainers":[{"name":"ashwinighuge","email":"ashwinighuge1@gmail.com"}],"homepage":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server#readme","bugs":{"url":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server/issues"},"bin":{"jenkins-mcp":"bin/jenkins-mcp.js"},"dist":{"shasum":"47fc9b63f302b3f4bfd9134c0accfb0cd189a2d7","tarball":"https://registry.npmjs.org/@ashwinighuge/jenkins-mcp-server/-/jenkins-mcp-server-1.0.5.tgz","fileCount":5,"integrity":"sha512-aip+iVNYAwIRV3W50r8fuYo+83wQMohdXt90a2XKtf1Gl3y7g5lZzQfRsxRT4NaJMdKCFrF3+3tRe3inN/idaw==","signatures":[{"sig":"MEYCIQDGwBOzmTReZq8jTYYz1lCbvGjojcdF+S6eIKl209xd/QIhAMh8fRvM5TLAm0xZxfyzvUHKpcOUc0f5Uhy6s7KPTBOz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":34663},"main":"bin/jenkins-mcp.js","engines":{"node":">=14.0.0"},"gitHead":"75ba7b00eb56185ad710e22ca7ef75f768bcb1ec","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepare":"chmod +x bin/jenkins-mcp.js","postinstall":"node scripts/check-python.js"},"_npmUser":{"name":"ashwinighuge","email":"ashwinighuge1@gmail.com"},"repository":{"url":"git+https://github.com/AshwiniGhuge3012/jenkins-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"An MCP server for interacting with a Jenkins CI/CD server. Allows you to trigger jobs, check build statuses, and manage your Jenkins instance through MCP.","directories":{},"_nodeVersion":"22.16.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jenkins-mcp-server_1.0.5_1754324854647_0.26283229295179056","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@ashwinighuge/jenkins-mcp-server","version":"1.0.6","keywords":["mcp","jenkins","claude","ci-cd","automation","build","deployment"],"author":{"name":"Ashwini Ghuge","email":"your-email@example.com"},"license":"Apache-2.0","_id":"@ashwinighuge/jenkins-mcp-server@1.0.6","maintainers":[{"name":"ashwinighuge","email":"ashwinighuge1@gmail.com"}],"homepage":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server#readme","bugs":{"url":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server/issues"},"bin":{"jenkins-mcp":"bin/jenkins-mcp.js"},"dist":{"shasum":"6da15fc9f19c850e2b325989d17cc5757dcf32fb","tarball":"https://registry.npmjs.org/@ashwinighuge/jenkins-mcp-server/-/jenkins-mcp-server-1.0.6.tgz","fileCount":5,"integrity":"sha512-zA42MxMIzUYXeYLzxvJ+RaN/5BYs8Dg1mZpl7wYco99tSOPqKqohA6dnkG6Zu4HfwqzLYgqqFYr+qdm8Y+M78w==","signatures":[{"sig":"MEQCIG3knzDW26y5cPG0m+XpjGPVcVY1bBQiLwotE2kcBUi0AiBM4qeG4K7yzBGor3ncDKXgi8mRUboX9rsiqx8iRkPczA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35501},"main":"bin/jenkins-mcp.js","engines":{"node":">=14.0.0"},"gitHead":"ec1cca018264c66d6f33377ccfe34014f21ec6b2","scripts":{"test":"echo \"Error: no test specified\" && exit 1","prepare":"chmod +x bin/jenkins-mcp.js","postinstall":"node scripts/check-python.js"},"_npmUser":{"name":"ashwinighuge","email":"ashwinighuge1@gmail.com"},"repository":{"url":"git+https://github.com/AshwiniGhuge3012/jenkins-mcp-server.git","type":"git"},"_npmVersion":"10.9.2","description":"An MCP server for interacting with a Jenkins CI/CD server. Allows you to trigger jobs, check build statuses, and manage your Jenkins instance through MCP.","directories":{},"_nodeVersion":"22.16.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jenkins-mcp-server_1.0.6_1754326057191_0.9999610434831894","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@ashwinighuge/jenkins-mcp-server","version":"1.0.7","description":"An MCP server for interacting with a Jenkins CI/CD server. Allows you to trigger jobs, check build statuses, and manage your Jenkins instance through MCP.","main":"bin/jenkins-mcp.js","bin":{"jenkins-mcp":"bin/jenkins-mcp.js"},"scripts":{"test":"python -m pytest test/ -v","prepare":"chmod +x bin/jenkins-mcp.js","postinstall":"node scripts/check-python.js"},"keywords":["mcp","jenkins","claude","ci-cd","automation","build","deployment","model-context-protocol","llm","ai-assistant"],"author":{"name":"Ashwini Ghuge","email":"ashwini.ghuge@example.com"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/AshwiniGhuge3012/jenkins-mcp-server.git"},"bugs":{"url":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server/issues"},"homepage":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server#readme","engines":{"node":">=14.0.0"},"dependencies":{},"publishConfig":{"access":"public"},"os":["darwin","linux","win32"],"_id":"@ashwinighuge/jenkins-mcp-server@1.0.7","gitHead":"d1ea1067edf72e6f92674fce50f8cc158e926b62","_nodeVersion":"22.16.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-JlQiaZNhWRFzNIR8emAytyxeeMPMaBIydk+iHkFH8Brp2tBEbqbBwvOiLxbwm/CvY0snE8wZ5h5dEZykwiRkHA==","shasum":"ea6e002059d06f3f737d499731c77efc1c788c5f","tarball":"https://registry.npmjs.org/@ashwinighuge/jenkins-mcp-server/-/jenkins-mcp-server-1.0.7.tgz","fileCount":7,"unpackedSize":280915,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD/ZM+ky4Ivx5DGiVnZ0ByB2qYG5N5JLbnbJL91zHlZiwIgYnZrrFxoaJQJ0JKIad1rMW0OdtK9fyQEGTi+qew2gN8="}]},"_npmUser":{"name":"ashwinighuge","email":"ashwinighuge1@gmail.com"},"directories":{},"maintainers":[{"name":"ashwinighuge","email":"ashwinighuge1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/jenkins-mcp-server_1.0.7_1754814956819_0.1145403550061701"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-04T13:27:17.173Z","modified":"2025-08-10T08:35:57.324Z","1.0.1":"2025-08-04T13:27:17.465Z","1.0.2":"2025-08-04T13:52:00.573Z","1.0.3":"2025-08-04T14:10:24.192Z","1.0.4":"2025-08-04T15:49:05.344Z","1.0.5":"2025-08-04T16:27:34.878Z","1.0.6":"2025-08-04T16:47:37.384Z","1.0.7":"2025-08-10T08:35:57.143Z"},"bugs":{"url":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server/issues"},"author":{"name":"Ashwini Ghuge","email":"ashwini.ghuge@example.com"},"license":"Apache-2.0","homepage":"https://github.com/AshwiniGhuge3012/jenkins-mcp-server#readme","keywords":["mcp","jenkins","claude","ci-cd","automation","build","deployment","model-context-protocol","llm","ai-assistant"],"repository":{"type":"git","url":"git+https://github.com/AshwiniGhuge3012/jenkins-mcp-server.git"},"description":"An MCP server for interacting with a Jenkins CI/CD server. Allows you to trigger jobs, check build statuses, and manage your Jenkins instance through MCP.","maintainers":[{"name":"ashwinighuge","email":"ashwinighuge1@gmail.com"}],"readme":"# Jenkins MCP Server\n\n[![npm version](https://badge.fury.io/js/@ashwinighuge%2Fjenkins-mcp-server.svg)](https://badge.fury.io/js/@ashwinighuge%2Fjenkins-mcp-server)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nAn enterprise-grade MCP (Model Context Protocol) server for seamless Jenkins CI/CD integration. Enables AI assistants like Claude to interact with Jenkins through a comprehensive, production-ready API.\n\n## 🚀 Quick Start\n\n### npm Installation (Recommended)\n\n```bash\n# Global installation\nnpm install -g @ashwinighuge/jenkins-mcp-server\n\n# Or use directly with npx\nnpx @ashwinighuge/jenkins-mcp-server --help\n```\n\n### Claude Desktop Integration\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"jenkins\": {\n      \"command\": \"jenkins-mcp\",\n      \"env\": {\n        \"JENKINS_URL\": \"http://your-jenkins-server:8080\",\n        \"JENKINS_USER\": \"your-username\",\n        \"JENKINS_API_TOKEN\": \"your-api-token\"\n      }\n    }\n  }\n}\n```\n\n## ✨ Features\n\n- **🔧 Job Management**: Trigger, list, search, and monitor Jenkins jobs with full folder support\n- **📊 Build Status**: Real-time build status tracking and console log streaming\n- **🔄 Pipeline Support**: Stage-by-stage pipeline execution monitoring with detailed logs\n- **📦 Artifact Management**: List, download, and search build artifacts across multiple builds\n- **⚡ Batch Operations**: Parallel job execution with intelligent priority queuing\n- **🚀 Performance Caching**: Multi-tier intelligent caching system with automatic invalidation\n- **🔍 Advanced Filtering**: Filter jobs by status, results, dates, and more with regex support\n- **📋 Queue Management**: Real-time build queue monitoring and management\n- **🔒 Enterprise Security**: CSRF protection, 2FA support, and secure authentication\n- **🌐 Cross-Platform**: Works on Windows, macOS, and Linux\n- **🔄 Retry Logic**: Built-in exponential backoff for improved reliability\n- **📡 Transport Flexibility**: Supports both STDIO and HTTP transports\n- **✅ Input Validation**: Robust Pydantic-based validation and error handling\n\n## 📋 Prerequisites\n\n- **Node.js**: 14.0.0 or higher\n- **Python**: 3.12 or higher\n- **Jenkins**: 2.401+ (recommended)\n- **Jenkins API Token**: For authentication\n\n## 🛠 Installation Methods\n\n### Method 1: npm (Recommended)\n\n```bash\n# Install globally for system-wide access\nnpm install -g @ashwinighuge/jenkins-mcp-server\n\n# Verify installation\njenkins-mcp --help\n```\n\n### Method 2: Development Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/AshwiniGhuge3012/jenkins-mcp-server\ncd jenkins-mcp-server\n\n# Install Node.js dependencies\nnpm install\n\n# Install Python dependencies\npip install -r requirements.txt  # or use uv pip install\n\n# Run locally\nnode bin/jenkins-mcp.js --help\n```\n\n## 🔐 Configuration\n\n### Environment Variables\n\nCreate a `.env` file in your working directory:\n\n```bash\n# Required Jenkins Configuration\nJENKINS_URL=\"http://your-jenkins-server:8080\"\nJENKINS_USER=\"your-username\"\nJENKINS_API_TOKEN=\"your-api-token\"\n\n# Optional: Server Configuration\nMCP_PORT=8010\nMCP_HOST=0.0.0.0\n\n# Optional: Retry Configuration\nJENKINS_MAX_RETRIES=3\nJENKINS_RETRY_BASE_DELAY=1.0\nJENKINS_RETRY_MAX_DELAY=60.0\nJENKINS_RETRY_BACKOFF_MULTIPLIER=2.0\n\n# Optional: Performance Cache Configuration\nJENKINS_CACHE_STATIC_TTL=3600        # 1 hour\nJENKINS_CACHE_SEMI_STATIC_TTL=300    # 5 minutes\nJENKINS_CACHE_DYNAMIC_TTL=30         # 30 seconds\nJENKINS_CACHE_SHORT_TTL=10           # 10 seconds\nJENKINS_CACHE_STATIC_SIZE=1000       # Max cached items\nJENKINS_CACHE_SEMI_STATIC_SIZE=500\nJENKINS_CACHE_DYNAMIC_SIZE=200\nJENKINS_CACHE_PERMANENT_SIZE=2000\nJENKINS_CACHE_SHORT_SIZE=100\n```\n\n### Getting Jenkins API Token\n\n1. Log into your Jenkins instance\n2. Click your username → **Configure**\n3. Scroll to **API Token** section\n4. Click **Add new Token**\n5. Give it a name and click **Generate**\n6. Copy the generated token (save it securely!)\n\n## 🚀 Usage\n\n### Command Line Interface\n\n```bash\n# STDIO mode (default, for Claude Desktop)\njenkins-mcp\n\n# HTTP mode (for MCP Gateway)\njenkins-mcp --transport streamable-http --port 8010\n\n# Custom host and port\njenkins-mcp --transport streamable-http --host localhost --port 9000\n\n# Show help\njenkins-mcp --help\n```\n\n### Transport Modes\n\n| Mode | Use Case | Command |\n|------|----------|---------|\n| **STDIO** | Claude Desktop, direct MCP clients | `jenkins-mcp` |\n| **HTTP** | MCP Gateway, web integrations | `jenkins-mcp --transport streamable-http` |\n\n### Advanced Usage Examples\n\n```bash\n# Using with npx (no global installation)\nnpx @ashwinighuge/jenkins-mcp-server\n\n# Using environment variables\nJENKINS_URL=http://localhost:8080 JENKINS_USER=admin JENKINS_API_TOKEN=abc123 jenkins-mcp\n\n# HTTP mode with custom configuration\njenkins-mcp --transport streamable-http --host 0.0.0.0 --port 8080\n```\n\n## Available Tools\n\nHere is a list of the tools exposed by this MCP server:\n\n### `trigger_job`\n- **Description**: Triggers a Jenkins job with optional parameters.\n- **Parameters**:\n    - `job_name` (string): The name of the Jenkins job.\n    - `params` (object, optional): Job parameters as a JSON object. For multiselect parameters, pass an array of strings.\n- **Returns**: A confirmation message with the queue URL.\n\n### `get_job_info`\n- **Description**: Gets detailed information about a Jenkins job, including its parameters.\n- **Parameters**:\n    - `job_name` (string): The name of the Jenkins job.\n- **Returns**: An object containing the job's description, parameters, and last build number.\n\n### `get_build_status`\n- **Description**: Gets the status of a specific build.\n- **Parameters**:\n    - `job_name` (string): The name of the Jenkins job.\n    - `build_number` (integer): The build number.\n- **Returns**: An object with the build status, timestamp, duration, and URL.\n\n### `get_console_log`\n- **Description**: Retrieves the console log for a specific build.\n- **Parameters**:\n    - `job_name` (string): The name of the Jenkins job.\n    - `build_number` (integer): The build number.\n    - `start` (integer, optional): The starting byte position for fetching the log.\n- **Returns**: The console log text and information about whether more data is available.\n\n### `list_jobs`\n- **Description**: Lists all available jobs on the Jenkins server with advanced filtering capabilities.\n- **Parameters**:\n    - `recursive` (boolean, optional): If True, recursively traverse folders (default: True)\n    - `max_depth` (integer, optional): Maximum depth to recurse (default: 10)\n    - `include_folders` (boolean, optional): Whether to include folder items (default: False)\n    - `status_filter` (string, optional): Filter by job status: \"building\", \"queued\", \"idle\", \"disabled\"\n    - `last_build_result` (string, optional): Filter by last build result: \"SUCCESS\", \"FAILURE\", \"UNSTABLE\", \"ABORTED\", \"NOT_BUILT\"\n    - `days_since_last_build` (integer, optional): Only jobs built within the last N days\n    - `enabled_only` (boolean, optional): If True, only enabled jobs; if False, only disabled jobs\n- **Returns**: A list of jobs with enhanced metadata including build status and timestamps.\n\n### `search_jobs`\n- **Description**: Search for Jenkins jobs using pattern matching with advanced filtering.\n- **Parameters**:\n    - `pattern` (string): Pattern to match job names (supports wildcards like 'build*', '*test*', etc.)\n    - `job_type` (string, optional): Filter by type - \"job\", \"folder\", or \"all\" (default: \"job\")\n    - `max_depth` (integer, optional): Maximum depth to search (default: 10)\n    - `use_regex` (boolean, optional): If True, treat pattern as regex instead of wildcard (default: False)\n    - `status_filter` (string, optional): Filter by job status: \"building\", \"queued\", \"idle\", \"disabled\"\n    - `last_build_result` (string, optional): Filter by last build result: \"SUCCESS\", \"FAILURE\", \"UNSTABLE\", \"ABORTED\", \"NOT_BUILT\"\n    - `days_since_last_build` (integer, optional): Only jobs built within the last N days\n    - `enabled_only` (boolean, optional): If True, only enabled jobs; if False, only disabled jobs\n- **Returns**: A list of matching jobs with enhanced metadata and full paths.\n\n### `get_queue_info`\n- **Description**: Gets information about builds currently in the queue.\n- **Parameters**: None\n- **Returns**: A list of items in the queue.\n\n### `server_info`\n- **Description**: Gets basic information about the Jenkins server.\n- **Parameters**: None\n- **Returns**: The Jenkins version and URL.\n\n### `get_pipeline_status`\n- **Description**: Gets detailed pipeline stage status for Jenkins Pipeline job builds.\n- **Parameters**:\n    - `job_name` (string): The name of the Jenkins Pipeline job.\n    - `build_number` (integer): The build number.\n- **Returns**: Pipeline execution details including stage-by-stage status, timing, duration, and logs.\n\n### `list_build_artifacts`\n- **Description**: List all artifacts for a specific Jenkins build.\n- **Parameters**:\n    - `job_name` (string): Name of the Jenkins job.\n    - `build_number` (integer): Build number to list artifacts for.\n- **Returns**: Information about all artifacts including filenames, sizes, and download URLs.\n\n### `download_build_artifact`\n- **Description**: Download a specific build artifact content (text-based artifacts only for safety).\n- **Parameters**:\n    - `job_name` (string): Name of the Jenkins job.\n    - `build_number` (integer): Build number containing the artifact.\n    - `artifact_path` (string): Relative path to the artifact (from list_build_artifacts).\n    - `max_size_mb` (integer, optional): Maximum file size to download in MB (default: 50MB).\n- **Returns**: Artifact content (for text files) or download information.\n\n### `search_build_artifacts`\n- **Description**: Search for artifacts across recent builds of a job using pattern matching.\n- **Parameters**:\n    - `job_name` (string): Name of the Jenkins job to search.\n    - `pattern` (string): Pattern to match artifact names (wildcards or regex).\n    - `max_builds` (integer, optional): Maximum number of recent builds to search (default: 10).\n    - `use_regex` (boolean, optional): If True, treat pattern as regex instead of wildcard (default: False).\n- **Returns**: List of matching artifacts across builds with their metadata.\n\n### `batch_trigger_jobs`\n- **Description**: Trigger multiple Jenkins jobs in batch with parallel execution and priority queuing.\n- **Parameters**:\n    - `operations` (array): List of job operations, each containing:\n        - `job_name` (string): Name of the Jenkins job\n        - `params` (object, optional): Job parameters\n        - `priority` (integer, optional): Priority 1-10 (1=highest, default: 1)\n    - `max_concurrent` (integer, optional): Maximum concurrent job triggers (default: 5)\n    - `fail_fast` (boolean, optional): Stop processing on first failure (default: false)\n    - `wait_for_completion` (boolean, optional): Wait for all jobs to complete (default: false)\n- **Returns**: Batch operation response with operation ID, results, and execution statistics.\n\n### `batch_monitor_jobs`\n- **Description**: Monitor the status of a batch operation and its individual jobs.\n- **Parameters**:\n    - `operation_id` (string): The operation ID returned from batch_trigger_jobs.\n- **Returns**: Current status of the batch operation including progress and individual job statuses.\n\n### `batch_cancel_jobs`\n- **Description**: Cancel a batch operation and optionally cancel running builds.\n- **Parameters**:\n    - `operation_id` (string): The operation ID to cancel.\n    - `cancel_running_builds` (boolean, optional): Attempt to cancel running builds (default: false).\n- **Returns**: Cancellation status and results.\n\n### `get_cache_statistics`\n- **Description**: Get comprehensive cache performance metrics and utilization statistics.\n- **Parameters**: None\n- **Returns**: Cache hit rates, utilization percentages, and detailed statistics for all cache types.\n\n### `clear_cache`\n- **Description**: Clear caches with fine-grained control for performance management.\n- **Parameters**:\n    - `cache_type` (string, optional): Type of cache to clear ('all', 'static', 'semi_static', 'dynamic', 'permanent', 'short')\n    - `job_name` (string, optional): Clear caches for a specific job only\n- **Returns**: Confirmation of cache clearing operation.\n\n### `warm_cache`\n- **Description**: Pre-load frequently accessed data into caches for improved performance.\n- **Parameters**:\n    - `operations` (array, optional): Operations to warm ('server_info', 'job_list', 'queue_info')\n- **Returns**: Results of cache warming operations with success/failure status.\n\n### `summarize_build_log`\n- **Description**: (Demonstration) Summarizes a build log using a pre-configured LLM prompt.\n- **Parameters**:\n    - `job_name` (string): The name of the Jenkins job.\n    - `build_number` (integer): The build number.\n- **Returns**: A placeholder summary and the prompt that would be used.\n\n## 💡 Usage Examples\n\n### With Claude Desktop\n\nOnce configured in `claude_desktop_config.json`, you can ask Claude:\n\n> \"List all Jenkins jobs\"\n> \n> \"Trigger the deploy-prod job with version parameter 1.2.3\"\n> \n> \"Show me the console log for build #45 of the api-tests job\"\n> \n> \"What's the status of all jobs that failed in the last 24 hours?\"\n\n### With MCP Gateway\n\n```bash\n# Start server in HTTP mode\njenkins-mcp --transport streamable-http --port 8010\n\n# Example API calls (using curl)\ncurl -X POST http://localhost:8010/mcp \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"method\": \"tools/call\", \"params\": {\"name\": \"list_jobs\", \"arguments\": {}}}'\n```\n\n### Batch Operations Example\n\n```bash\n# Trigger multiple jobs with different priorities\njenkins-mcp # Then use batch_trigger_jobs tool with:\n{\n  \"operations\": [\n    {\"job_name\": \"unit-tests\", \"priority\": 1},\n    {\"job_name\": \"integration-tests\", \"priority\": 2},\n    {\"job_name\": \"deploy-staging\", \"priority\": 3}\n  ],\n  \"max_concurrent\": 3,\n  \"wait_for_completion\": true\n}\n```\n\n## 🔧 Troubleshooting\n\n### Common Issues\n\n**Python Dependencies**\n```bash\n# If Python packages fail to install automatically\npip install mcp[cli] pydantic requests python-dotenv fastapi cachetools\n\n# Or using uv (recommended)\nuv pip install mcp[cli] pydantic requests python-dotenv fastapi cachetools\n```\n\n**Permission Issues (Linux/macOS)**\n```bash\n# If permission denied\nsudo npm install -g @ashwinighuge/jenkins-mcp-server\n\n# Or use user-level installation\nnpm install -g @ashwinighuge/jenkins-mcp-server --prefix ~/.local\n```\n\n**Jenkins Connection Issues**\n- Verify `JENKINS_URL` is accessible\n- Ensure API token is valid and not expired\n- Check firewall/proxy settings\n- For HTTPS, verify SSL certificates\n\n**2FA/CSRF Issues**\n- The server handles CSRF tokens automatically\n- For 2FA environments, use API tokens (not passwords)\n- Email OTP and similar 2FA methods are supported\n\n### Debug Mode\n\n```bash\n# Enable verbose logging\nDEBUG=jenkins-mcp jenkins-mcp\n\n# Check Python dependencies\njenkins-mcp --help  # Will validate dependencies\n```\n\n## 📊 Performance Features\n\n- **Multi-tier Caching**: Intelligent caching with automatic invalidation\n- **Batch Processing**: Parallel job execution with priority queuing\n- **Retry Logic**: Exponential backoff for network reliability\n- **Connection Pooling**: Efficient HTTP connection management\n- **Memory Optimization**: Configurable cache sizes and TTL values\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/amazing-feature`\n3. Commit changes: `git commit -m 'Add amazing feature'`\n4. Push to branch: `git push origin feature/amazing-feature`\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.\n\n## 🙋‍♂️ Support\n\n- **Documentation**: [GitHub README](https://github.com/AshwiniGhuge3012/jenkins-mcp-server#readme)\n- **Issues**: [GitHub Issues](https://github.com/AshwiniGhuge3012/jenkins-mcp-server/issues)\n- **npm Package**: [@ashwinighuge/jenkins-mcp-server](https://www.npmjs.com/package/@ashwinighuge/jenkins-mcp-server)\n\n## 🏗️ Architecture\n\nBuilt with:\n- **Python 3.12+** - Core server implementation\n- **FastMCP** - MCP protocol handling\n- **Node.js** - Cross-platform wrapper and process management\n- **Pydantic** - Data validation and serialization\n- **Requests** - HTTP client with retry logic\n- **CacheTools** - Multi-tier performance caching\n\n---\n\nMade with ❤️ for the MCP and Jenkins communities\n","readmeFilename":"README.md"}