Jenkins Server MCP
Provides tools for interacting with CloudBees CI, including checking build status, triggering and stopping builds, listing recent builds, and retrieving build logs.
Provides tools for interacting with Jenkins CI/CD servers, including checking build status, triggering and stopping builds, listing recent builds, and retrieving console logs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Jenkins Server MCP trigger the deploy job for main and show me the build status"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Jenkins Server MCP
A Model Context Protocol (MCP) server that provides tools for interacting with Jenkins CI/CD servers (including CloudBees CI). This server enables AI assistants to check build statuses, trigger builds, stop builds, and retrieve build logs through a standardized interface.
Features
✅ Get Build Status - Retrieve detailed build information including build number, status, timing, and results
✅ Trigger Builds - Start builds with or without parameters (automatically detects build type)
✅ Stop Builds - Stop currently running builds
✅ List Builds - Get a list of recent builds for any job
✅ Get Build Logs - Retrieve console output from builds
✅ CloudBees CI Support - Works with both standard Jenkins and CloudBees CI
Related MCP server: Jenkins MCP Server
Installation
Clone this repository:
git clone https://github.com/grysonbaltazar/jenkins-server-mcp.git
cd jenkins-server-mcpInstall dependencies:
npm installBuild the project:
npm run buildThe built server will be available at build/index.js.
Configuration
The server requires the following environment variables:
JENKINS_URL: The URL of your Jenkins server (e.g.,https://jenkins.example.com)JENKINS_USER: Jenkins username for authenticationJENKINS_TOKEN: Jenkins API token for authentication
Getting Your Jenkins API Token
Log in to your Jenkins server
Click your username in the top-right corner
Click "Configure" (or go to User → Configure)
Scroll down to the "API Token" section
Click "Add new token" or "Generate"
Give it a name (e.g., "mcp-server")
Click "Generate" and copy the token immediately (it won't be shown again)
For Cursor IDE
Edit ~/.cursor/mcp_config.json (create it if it doesn't exist):
{
"mcpServers": {
"jenkins-server": {
"command": "node",
"args": ["/path/to/jenkins-server-mcp/build/index.js"],
"env": {
"JENKINS_URL": "https://your-jenkins-server.com",
"JENKINS_USER": "your-username",
"JENKINS_TOKEN": "your-api-token"
}
}
}
}After saving the config file, restart Cursor for changes to take effect.
For Claude Desktop
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"jenkins-server": {
"command": "node",
"args": ["/path/to/jenkins-server-mcp/build/index.js"],
"env": {
"JENKINS_URL": "https://your-jenkins-server.com",
"JENKINS_USER": "your-username",
"JENKINS_TOKEN": "your-api-token"
}
}
}
}After saving the config file, restart Claude Desktop for changes to take effect.
Tools and Usage
Once configured, you can use the Jenkins tools in your AI assistant:
1. Get Build Status
Get detailed status information about a Jenkins build, including build number, status, result, timing, and more.
2. Trigger Build
Trigger a new Jenkins build. Supports both parameterized and non-parameterized builds.
3. Stop Build
Stop a currently running Jenkins build.
4. List Builds
List recent builds for a Jenkins job.
5. Get Build Log
Retrieve the console output of a Jenkins build.
Development
Building
npm run buildDevelopment with auto-rebuild
npm run watchDebugging
Since MCP servers communicate over stdio, you can use the MCP Inspector for debugging:
npm run inspectorThis will provide a URL to access debugging tools in your browser.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Available Tools
5 toolsget_build_logC
Get the console output of a Jenkins build
Inputs: jobPath (required), buildNumber (required).
get_build_statusB
Get the status of a Jenkins build
Inputs: jobPath (required), buildNumber.
list_buildsC
List builds for a Jenkins job
Inputs: jobPath (required), limit.
stop_buildC
Stop a running Jenkins build
Inputs: jobPath (required), buildNumber (required).
trigger_buildB
Trigger a new Jenkins build. Use parameters for parameterized builds, or omit for simple builds
Inputs: jobPath (required), parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: status retrieval, triggering, stopping, listing, and log retrieval. There is little risk of confusing one action for another.
All tools follow a consistent snake_case verb_noun pattern: get_build_status, trigger_build, stop_build, list_builds, get_build_log. The convention is predictable throughout.
Five tools are well-scoped for a Jenkins build-operation server. Each tool earns its place and covers a distinct part of the build lifecycle without bloat.
The core build lifecycle is covered: list builds, trigger, stop, check status, and retrieve logs. Minor gaps remain around job discovery and job-level metadata, but agents can work around them if job names are known.
Maintenance
Related MCP Connectors
Connect AI agents to CloudBees Unify: feature flags, CI/CD, release orchestration, and security
Plan Salesforce deploys, open pull requests and trigger pipelines from your AI client.
Inspect and control your Northflank projects, services, jobs, and builds from your AI assistant.
Direct access to Cypress tests results and accessibility reports in your AI workflow.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Jenkins CI/CD systems through natural language, providing build management, job monitoring, log analysis, and debugging capabilities.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Jenkins CI/CD systems for build management, job monitoring, console log analysis, and debugging through natural language commands.2MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Jenkins CI/CD servers, including checking build status, triggering builds, and retrieving build logs.8MIT
- AlicenseBqualityDmaintenanceProvides AI assistants with full access to Jenkins CI/CD systems, enabling querying, managing, and controlling Jenkins jobs, builds, nodes, and queues through natural language.222,121 npm2MIT