Jenkins MCP Server
Integrate with Jenkins CI/CD pipelines through your AI assistant - trigger builds, check status, and manage jobs.
Jenkins MCP Server
Manage Jenkins pipelines and jobs from your AI assistant. The Jenkins MCP server enables natural language interaction with your Jenkins CI/CD infrastructure, from inspecting job status and triggering builds to debugging pipeline failures and managing build nodes.
This server is designed for DevOps engineers managing large Jenkins installations, developers troubleshooting build failures, and platform teams maintaining CI/CD standards across their organization.
What it Does
- Job Management: List, create, and configure Jenkins jobs
- Build Control: Trigger builds and monitor progress
- Pipeline Inspection: View pipeline stages and status
- Log Access: Retrieve and search build logs
- Node Management: View agent nodes and their status
Installation
# Using npx
npx -y @anthropic-ai/mcp-server-jenkins
# Using Docker
docker run -i --rm mcp/jenkins
Configuration
{
"mcpServers": {
"jenkins": {
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-server-jenkins"],
"env": {
"JENKINS_URL": "https://jenkins.example.com",
"JENKINS_USERNAME": "${JENKINS_USERNAME}",
"JENKINS_API_TOKEN": "${JENKINS_API_TOKEN}"
}
}
}
}
Available Tools
| Tool | Purpose | Category |
|---|---|---|
list_jobs | List Jenkins jobs with folder structure | Jobs |
get_job | Get job configuration and details | Jobs |
trigger_build | Trigger a parameterized or non-parameterized build | Builds |
get_build | Get build details and status | Builds |
get_build_log | Retrieve build console output | Debugging |
list_builds | List recent builds for a job | Builds |
list_nodes | List Jenkins agent nodes | Infrastructure |
get_node | Get agent node details and status | Infrastructure |
Common Workflows
Debugging a Failed Build
- List recent builds for the failing job
- Get details on the specific failed build
- Retrieve the console log for analysis
- Check which stage or step caused the failure
- Ask "Summarize what caused this build failure based on the log"
Monitoring Deployment Pipelines
- List all jobs in the deployment folder
- Check the latest build status for each job
- Identify any running or queued builds
- Monitor build progress as it executes through stages
- Notify the team when deployment completes
Jenkins Health Check
- List all agent nodes and their status
- Check for offline or disconnected agents
- Review recent build failures across critical jobs
- Inspect disk space and resource usage on key nodes
- Generate a Jenkins infrastructure health report
Example Prompts
- "Show me the last 5 builds for the api-service job"
- "Why did build #1234 fail?"
- "Trigger the deploy-to-staging job"
- "Show logs from the test stage"
- "List all jobs in the frontend folder"
- "Which Jenkins agents are currently offline?"
Troubleshooting
| Issue | Likely Cause | Solution |
|---|---|---|
| "Connection refused" | Jenkins URL is unreachable | Verify Jenkins URL and network connectivity |
| "Authentication failed" | Invalid API token or credentials | Generate a new API token in Jenkins UI |
| "CSRF protection" | Missing CSRF token in requests | Ensure the MCP server handles Jenkins CRUMB token |
| "Job not found" | Wrong job name or path | Use list_jobs to verify the full job path |
Security Notes
- Use API tokens instead of passwords
- Create a dedicated service account with minimal permissions
- Use HTTPS for Jenkins URL
- Rotate API tokens regularly
Related Articles
Linear MCP Server
Linear MCP server enables AI models to interact with Linear's project management system, providing capabilities for issue tracking, project management, team collaboration, and workflow automation.
Finance & Trading MCP Servers: Market Data & Trading
Explore MCP servers for finance and trading, providing standardized interfaces for AI models to access stock market data, cryptocurrency prices, technical analysis, and trading platforms.
Slack MCP Server
Slack MCP server provides AI assistants with full Slack workspace integration including channel management, messaging, threads, reactions, and user presence.