Jenkins MCP Server

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

October 19, 2026
MCP ServerDevelopment Tools & DevOpsJenkins MCP Server

Jenkins MCP Server

This page documents the community server lanbaoshen/mcp-jenkins. It is published on PyPI as mcp-jenkins and as the container image ghcr.io/lanbaoshen/mcp-jenkins.

The server bridges Jenkins with MCP clients, covering jobs, builds, queues, nodes, views, and plugins.

What it Does

  • Job inspection: List and query items, read item configuration and parameters
  • Build control: Trigger builds, stop builds, and inspect running builds
  • Log access: Retrieve build console output
  • Queue management: List, inspect, and cancel queue items
  • Node and view inspection: List nodes, node configuration, and views
  • Plugin inspection: List installed plugins and available updates

Installation

# Using uv (recommended)
uvx mcp-jenkins

# Using pip
pip install mcp-jenkins
mcp-jenkins

Docker:

docker pull ghcr.io/lanbaoshen/mcp-jenkins:latest
docker run -p 9887:9887 --rm ghcr.io/lanbaoshen/mcp-jenkins:latest --transport streamable-http

Configuration

{
  "mcpServers": {
    "jenkins": {
      "command": "uvx",
      "args": ["mcp-jenkins"],
      "env": {
        "JENKINS_URL": "https://jenkins.example.com",
        "JENKINS_USERNAME": "alice",
        "JENKINS_PASSWORD": "your-api-token"
      }
    }
  }
}

JENKINS_PASSWORD accepts a password or an API token. The server also supports JENKINS_TIMEOUT and JENKINS_VERIFY_SSL.

Available Tools

ToolPurposeCategory
get_all_itemsGet all items in JenkinsJobs
get_itemGet a specific item by nameJobs
get_item_configGet the configuration of an itemJobs
get_item_parametersGet the parameters of an itemJobs
query_itemsQuery items based on a patternJobs
build_itemBuild an itemBuilds
get_buildGet a build by job name and build numberBuilds
get_build_console_outputGet the console output of a buildDebugging
get_running_buildsGet all currently running buildsBuilds
stop_buildStop a buildBuilds
get_all_nodesGet all nodes in JenkinsInfrastructure
get_nodeGet a specific node by nameInfrastructure
get_node_configGet the configuration of a nodeInfrastructure
get_all_queue_itemsGet all queue itemsQueue
get_queue_itemGet a queue item by IDQueue
cancel_queue_itemCancel a queue item by IDQueue
get_all_viewsGet all viewsViews
get_all_pluginsGet all installed pluginsPlugins
get_plugins_with_updatesGet plugins with available updatesPlugins

The full tool list is in the upstream README.

Common Workflows

Debugging a Failed Build

  1. Use get_all_items or query_items to find the job
  2. Use get_build to get the failed build
  3. Use get_build_console_output to retrieve the console log
  4. Ask "Summarize what caused this build failure based on the log"

Monitoring Running Builds

  1. Use get_running_builds to list active builds
  2. Use get_all_queue_items to check queued items
  3. Use get_build to inspect a specific build
  4. Use get_build_console_output for progress details
  5. Notify the team when the build completes

Jenkins Health Check

  1. Use get_all_nodes to list agent nodes
  2. Use get_node and get_node_config to inspect a specific node
  3. Use get_plugins_with_updates to review available updates
  4. 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 the console output for the latest build"
  • "List all items 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 username, password, or API tokenSet JENKINS_USERNAME and JENKINS_PASSWORD; use an API token if required
TLS certificate errorJenkins uses a certificate the client does not trustSet JENKINS_VERIFY_SSL=false
Request timeoutJenkins API is slowIncrease JENKINS_TIMEOUT
Job not foundWrong job name or pathUse get_all_items or query_items to verify the item name

Security Notes

  • Use an API token instead of a password
  • Keep certificate verification enabled unless you have a specific reason to disable it
  • Use a dedicated Jenkins account with minimal permissions
  • Use HTTPS for the Jenkins URL

Sources