Jenkins MCP Server
An 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.
接入你的智能体
從發布者安裝。不是 PlugMCP 端點。
遠端 URL 還是本機指令? 兩種安裝方式的差異
來自發布者
An 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.
An MCP server for interacting with a Jenkins server. Allows you to trigger jobs, check build statuses, and manage your Jenkins instance through MCP.
# Global installation
npm install -g @ashwinighuge/jenkins-mcp-server
# Or use directly with npx
npx @ashwinighuge/jenkins-mcp-server --help
Add to your claude_desktop_config.json:
{
"mcpServers": {
"jenkins": {
"command": "jenkins-mcp",
"env": {
"JENKINS_URL": "http://your-jenkins-server:8080",
"JENKINS_USER": "your-username",
"JENKINS_API_TOKEN": "your-api-token"
}
}
}
}
# Install globally for system-wide access
npm install -g @ashwinighuge/jenkins-mcp-server
# Verify installation
jenkins-mcp --help
# Clone the repository
git clone https://github.com/AshwiniGhuge3012/jenkins-mcp-server
cd jenkins-mcp-server
# Install Node.js dependencies
npm install
# Install Python dependencies
pip install -r requirements.txt # or use uv pip install
# Run locally
node bin/jenkins-mcp.js --help
Create a .env file in your working directory:
# Required Jenkins Configuration
JENKINS_URL="http://your-jenkins-server:8080"
JENKINS_USER="your-username"
JENKINS_API_TOKEN="your-api-token"
# Optional: Server Configuration
MCP_PORT=8010
MCP_HOST=0.0.0.0
# Optional: Retry Configuration
JENKINS_MAX_RETRIES=3
JENKINS_RETRY_BASE_DELAY=1.0
JENKINS_RETRY_MAX_DELAY=60.0
JENKINS_RETRY_BACKOFF_MULTIPLIER=2.0
# Optional: Performance Cache Configuration
JENKINS_CACHE_STATIC_TTL=3600 # 1 hour
JENKINS_CACHE_SEMI_STATIC_TTL=300 # 5 minutes
JENKINS_CACHE_DYNAMIC_TTL=30 # 30 seconds
JENKINS_CACHE_SHORT_TTL=10 # 10 seconds
JENKINS_CACHE_STATIC_SIZE=1000 # Max cached items
JENKINS_CACHE_SEMI_STATIC_SIZE=500
JENKINS_CACHE_DYNAMIC_SIZE=200
JENKINS_CACHE_PERMANENT_SIZE=2000
JENKINS_CACHE_SHORT_SIZE=100
# STDIO mode (default, for Claude Desktop)
jenkins-mcp
# HTTP mode (for MCP Gateway)
jenkins-mcp --transport streamable-http --port 8010
# Custom host and port
jenkins-mcp --transport streamable-http --host localhost --port 9000
# Show help
jenkins-mcp --help
# Using with npx (no global installation)
npx @ashwinighuge/jenkins-mcp-server
# Using environment variables
JENKINS_URL=http://localhost:8080 JENKINS_USER=admin JENKINS_API_TOKEN=abc123 jenkins-mcp
# HTTP mode with custom configuration
jenkins-mcp --transport streamable-http --host 0.0.0.0 --port 8080
Here is a list of the tools exposed by this MCP server:
trigger_jobjob_name (string): The name of the Jenkins job.params (object, optional): Job parameters as a JSON object. For multiselect parameters, pass an array of strings.get_job_infojob_name (string): The name of the Jenkins job.get_build_statusjob_name (string): The name of the Jenkins job.build_number (integer): The build number.get_console_logjob_name (string): The name of the Jenkins job.build_number (integer): The build number.start (integer, optional): The starting byte position for fetching the log.list_jobsrecursive (boolean, optional): If True, recursively traverse folders (default: True)max_depth (integer, optional): Maximum depth to recurse (default: 10)include_folders (boolean, optional): Whether to include folder items (default: False)status_filter (string, optional): Filter by job status: "building", "queued", "idle", "disabled"last_build_result (string, optional): Filter by last build result: "SUCCESS", "FAILURE", "UNSTABLE", "ABORTED", "NOT_BUILT"days_since_last_build (integer, optional): Only jobs built within the last N daysenabled_only (boolean, optional): If True, only enabled jobs; if False, only disabled jobssearch_jobspattern (string): Pattern to match job names (supports wildcards like 'build*', 'test', etc.)job_type (string, optional): Filter by type - "job", "folder", or "all" (default: "job")max_depth (integer, optional): Maximum depth to search (default: 10)use_regex (boolean, optional): If True, treat pattern as regex instead of wildcard (default: False)status_filter (string, optional): Filter by job status: "building", "queued", "idle", "disabled"last_build_result (string, optional): Filter by last build result: "SUCCESS", "FAILURE", "UNSTABLE", "ABORTED", "NOT_BUILT"days_since_last_build (integer, optional): Only jobs built within the last N daysenabled_only (boolean, optional): If True, only enabled jobs; if False, only disabled jobsget_queue_infoserver_infoget_pipeline_statusjob_name (string): The name of the Jenkins Pipeline job.build_number (integer): The build number.list_build_artifactsjob_name (string): Name of the Jenkins job.build_number (integer): Build number to list artifacts for.download_build_artifactjob_name (string): Name of the Jenkins job.build_number (integer): Build number containing the artifact.artifact_path (string): Relative path to the artifact (from list_build_artifacts).max_size_mb (integer, optional): Maximum file size to download in MB (default: 50MB).search_build_artifactsjob_name (string): Name of the Jenkins job to search.pattern (string): Pattern to match artifact names (wildcards or regex).max_builds (integer, optional): Maximum number of recent builds to search (default: 10).use_regex (boolean, optional): If True, treat pattern as regex instead of wildcard (default: False).batch_trigger_jobsoperations (array): List of job operations, each containing:
job_name (string): Name of the Jenkins jobparams (object, optional): Job parameterspriority (integer, optional): Priority 1-10 (1=highest, default: 1)max_concurrent (integer, optional): Maximum concurrent job triggers (default: 5)fail_fast (boolean, optional): Stop processing on first failure (default: false)wait_for_completion (boolean, optional): Wait for all jobs to complete (default: false)batch_monitor_jobsoperation_id (string): The operation ID returned from batch_trigger_jobs.batch_cancel_jobsoperation_id (string): The operation ID to cancel.cancel_running_builds (boolean, optional): Attempt to cancel running builds (default: false).get_cache_statisticsclear_cachecache_type (string, optional): Type of cache to clear ('all', 'static', 'semi_static', 'dynamic', 'permanent', 'short')job_name (string, optional): Clear caches for a specific job onlywarm_cacheoperations (array, optional): Operations to warm ('server_info', 'job_list', 'queue_info')summarize_build_logjob_name (string): The name of the Jenkins job.build_number (integer): The build number.Once configured in claude_desktop_config.json, you can ask Claude:
"List all Jenkins jobs"
"Trigger the deploy-prod job with version parameter 1.2.3"
"Show me the console log for build #45 of the api-tests job"
"What's the status of all jobs that failed in the last 24 hours?"
# Start server in HTTP mode
jenkins-mcp --transport streamable-http --port 8010
# Example API calls (using curl)
curl -X POST http://localhost:8010/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/call", "params": {"name": "list_jobs", "arguments": {}}}'
# Trigger multiple jobs with different priorities
jenkins-mcp # Then use batch_trigger_jobs tool with:
{
"operations": [
{"job_name": "unit-tests", "priority": 1},
{"job_name": "integration-tests", "priority": 2},
{"job_name": "deploy-staging", "priority": 3}
],
"max_concurrent": 3,
"wait_for_completion": true
}
Python Dependencies
# If Python packages fail to install automatically
pip install mcp[cli] pydantic requests python-dotenv fastapi cachetools
# Or using uv (recommended)
uv pip install mcp[cli] pydantic requests python-dotenv fastapi cachetools
Permission Issues (Linux/macOS)
# If permission denied
sudo npm install -g @ashwinighuge/jenkins-mcp-server
# Or use user-level installation
npm install -g @ashwinighuge/jenkins-mcp-server --prefix ~/.local
Jenkins Connection Issues
JENKINS_URL is accessible2FA/CSRF Issues
# Enable verbose logging
DEBUG=jenkins-mcp jenkins-mcp
# Check Python dependencies
jenkins-mcp --help # Will validate dependencies
git checkout -b feature/amazing-featuregit commit -m 'Add amazing feature'git push origin feature/amazing-featureThis project is licensed under the Apache 2.0 License - see the LICENSE file for details.
Built with:
An MCP server for interacting with a Jenkins server. Allows you to trigger jobs, check build statuses, and manage your Jenkins instance through MCP.
工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
這筆記錄未列出必要的環境變數。
Jenkins 透過 stdio 在本機執行。
上次檢查時間:2026-10-28。 An MCP server for interacting with a Jenkins server. Allows you to trigger jobs, check build statuses, and manage your Jenkins instance through MCP.