Jenkins MCP Server

Integrate with Jenkins CI/CD pipelines through your AI assistant - trigger builds, check status, and manage jobs.

April 14, 2026
MCP ServerDevelopment Tools & DevOpsJenkins MCP Server

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

ToolPurposeCategory
list_jobsList Jenkins jobs with folder structureJobs
get_jobGet job configuration and detailsJobs
trigger_buildTrigger a parameterized or non-parameterized buildBuilds
get_buildGet build details and statusBuilds
get_build_logRetrieve build console outputDebugging
list_buildsList recent builds for a jobBuilds
list_nodesList Jenkins agent nodesInfrastructure
get_nodeGet agent node details and statusInfrastructure

Common Workflows

Debugging a Failed Build

  1. List recent builds for the failing job
  2. Get details on the specific failed build
  3. Retrieve the console log for analysis
  4. Check which stage or step caused the failure
  5. Ask "Summarize what caused this build failure based on the log"

Monitoring Deployment Pipelines

  1. List all jobs in the deployment folder
  2. Check the latest build status for each job
  3. Identify any running or queued builds
  4. Monitor build progress as it executes through stages
  5. Notify the team when deployment completes

Jenkins Health Check

  1. List all agent nodes and their status
  2. Check for offline or disconnected agents
  3. Review recent build failures across critical jobs
  4. Inspect disk space and resource usage on key nodes
  5. 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

IssueLikely CauseSolution
"Connection refused"Jenkins URL is unreachableVerify Jenkins URL and network connectivity
"Authentication failed"Invalid API token or credentialsGenerate a new API token in Jenkins UI
"CSRF protection"Missing CSRF token in requestsEnsure the MCP server handles Jenkins CRUMB token
"Job not found"Wrong job name or pathUse 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