Content
# Jenkins MCP Server
A Jenkins management tool based on the FastMCP framework.
## Quick Start
### 1. Configure Environment Variables
Copy `.env.example` to `.env` and fill in the configuration:
```bash
cp jenkins_mcp/.env.example jenkins_mcp/.env
# Edit .env file, fill in JENKINS_URL, JENKINS_USERNAME, JENKINS_PASSWORD
```
### 2. Start the Service
```bash
# Set PYTHONPATH and start
set PYTHONPATH=jenkins_mcp\src
python -m jenkins_mcp.server
# Or run directly
set PYTHONPATH=jenkins_mcp\src && python jenkins_mcp\src\jenkins_mcp\server.py
```
### 3. Optional: Specify Configuration File
```bash
set PYTHONPATH=jenkins_mcp\src
python -m jenkins_mcp.server --config jenkins_mcp\.env
```
## Command Line Arguments
| Argument | Description | Default |
|------|------|--------|
| `-t, --transport` | Transport mode (`stdio`, `sse`, `streamable-http`) | `stdio` |
| `-p, --port` | Local listening port | `8000` |
| `--host` | Local listening address | `0.0.0.0` |
| `-c, --config` | .env configuration file path | `.env` |
## Environment Variables (.env file)
| Variable | Description | Default |
|------|------|--------|
| `JENKINS_URL` | Jenkins server URL | `http://localhost:8080` |
| `JENKINS_USERNAME` | Username | `admin` |
| `JENKINS_PASSWORD` | Password or API Token | (empty) |
| `JENKINS_TIMEOUT` | Timeout (seconds) | `30` |
| `JENKINS_VERIFY_SSL` | Verify SSL | `true` |
| `JENKINS_READ_ONLY` | Read-only mode | `false` |
| `MCP_TRANSPORT` | Transport mode (`stdio`, `sse`, `streamable-http`) | `stdio` |
| `MCP_HOST` | Local listening address | `0.0.0.0` |
| `MCP_PORT` | Local listening port | `8000` |
## Tool List
### Job Management (15)
- `get_all_jobs` - Get all jobs
- `get_job` - Get job details
- `get_job_config` - Get job configuration
- `set_job_config` - Set job configuration
- `create_job` - Create a job
- `delete_job` - Delete a job
- `copy_job` - Copy a job
- `rename_job` - Rename a job
- `enable_job` - Enable a job
- `disable_job` - Disable a job
- `build_job` - Trigger a build
- `set_next_build_number` - Set the next build number
- `wipeout_workspace` - Wipe out the workspace
- `job_exists` - Check if a job exists
- `check_jenkinsfile_syntax` - Check Pipeline syntax
### Build Management (10)
- `get_build` - Get build information
- `get_build_console_output` - Get build console output
- `get_running_builds` - Get running builds
- `stop_build` - Stop a build
- `delete_build` - Delete a build
- `stop_all_builds` - Stop all running builds
- `get_build_artifacts` - Get build artifacts list
- `get_build_artifact` - Get build artifact content
- `download_build_artifact` - Download build artifact
- `download_all_artifacts` - Download all artifacts
### Queue Management (6)
- `get_all_queue_items` - Get all queue items
- `get_queue_item` - Get queue item details
- `get_queue_items_by_job` - Get queue items by job
- `cancel_queue_item` - Cancel a queue item
- `cancel_job_queue` - Cancel job queue
- `cancel_all_queue` - Cancel all queues
### Node Management (9)
- `get_all_nodes` - Get all nodes
- `get_node` - Get node details
- `get_node_config` - Get node configuration
- `set_node_config` - Set node configuration
- `create_node` - Create a node
- `delete_node` - Delete a node
- `set_node_offline` - Set node offline
- `set_node_online` - Set node online
- `node_exists` - Check if a node exists
### Plugin Management (3)
- `get_all_plugins` - Get all plugins
- `get_plugin` - Get plugin details
- `get_plugins_with_problems` - Get plugins with problems
### Label Management (4)
- `get_all_labels` - Get all labels
- `get_label` - Get label details
- `get_nodes_by_label` - Get nodes by label
- `get_label_load` - Get label load information
### Cloud Management (15)
- `get_all_clouds` - Get all cloud configurations
- `get_cloud_config` - Get cloud configuration details
- `get_cloud_templates` - Get cloud templates list
- `analyze_cloud_nodes` - Analyze cloud nodes
- `analyze_cloud_availability` - Analyze cloud availability
- `get_provisioning_stats` - Get provisioning statistics
- `get_kubernetes_pods` - Get Kubernetes pods information
- `disable_cloud` - Disable cloud
- `enable_cloud` - Enable cloud
- `delete_cloud` - Delete cloud configuration
- `delete_template` - Delete cloud template
- `create_kubernetes_cloud` - Create Kubernetes cloud
- `add_pod_template` - Add pod template
- `update_cloud_config` - Update cloud configuration
- `get_nodes_by_label` - Get nodes by label
### Script Management (4)
- `run_groovy_script` - Run an arbitrary Groovy script
- `get_jenkins_info` - Get Jenkins system information
- `get_jenkins_version` - Get Jenkins version
- `get_whoami` - Get current authentication user information
## Authorization Control
Set `JENKINS_READ_ONLY=true` to enable read-only mode, blocking all write operations.
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.