Jenkins MCP Server
About
An MCP server for automating tasks and managing jobs on a Jenkins server.
Details
- Author
- ddang-jung
- Categories
- Developer Tools, Infrastructure
Jump to
Setup
Install Jenkins MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/ddang-jung/jenkins-mcp-server
Follow the installation instructions in the repository README, then restart your MCP client.
A Model Context Protocol (MCP) server that enables Claude to interact with Jenkins through various automation tools. This server provides comprehensive Jenkins management capabilities including job monitoring, build control, and queue management.
- Job Management: List jobs, get job configurations, and monitor job status
- Build Control: Trigger builds with parameters, stop running builds, and check build status
- Build History: Retrieve build history and detailed build information
- Console Logs: Access build console output for debugging
- Queue Management: Monitor Jenkins build queue and stuck builds
- Folder Support: Navigate Jenkins folders and organizational structures
git clone https://github.com/ddang-jung/jenkins-mcp-server.git cd jenkins-mcp-server
Set the following environment variables for Jenkins authentication:
- JENKINS_URL: Your Jenkins server URL (e.g.,http://localhost:8080)
- JENKINS_USER: Your Jenkins username
- JENKINS_TOKEN: Your Jenkins API token (recommended) or password
- Log into Jenkins
- Go toManage Jenkins→Manage Users→ Click your username
- ClickConfigure→API Token→Add new Token
- Copy the generated token
The project includes a comprehensive.gitignorefile that excludes:
- Build artifacts (build/,dist/)
- Dependencies (node_modules/)
- Environment variables (.env*)
- Jenkins credentials and configuration files
- IDE files (.vscode/,.idea/)
- System files (.DS_Store,Thumbs.db)
Important: Never commit Jenkins credentials or API tokens to version control.
Add this configuration to yourclaude_desktop_config.json:
{ "mcpServers": { "jenkins": { "command": "node", "args": ["/path/to/jenkins-mcp-server/build/index.js"], "env": { "JENKINS_URL": "http://your-jenkins-server:8080", "JENKINS_USER": "your-username", "JENKINS_TOKEN": "your-api-token" } } } }
The server runs on stdio and communicates with Claude through the MCP protocol.
Get the status of a specific Jenkins build.
- jobPath(required): Path to the Jenkins job (e.g., "job/MyProject/job/main")
- buildNumber(optional): Build number or "lastBuild" for most recent
{ "jobPath": "job/MyProject", "buildNumber": "lastBuild" }
Trigger a new Jenkins build with optional parameters.
- jobPath(required): Path to the Jenkins job
- parameters(optional): Build parameters as key-value pairs
{ "jobPath": "job/MyProject", "parameters": { "BRANCH": "main", "DEPLOY_ENV": "staging" } }
Retrieve the console output of a specific build.
- jobPath(required): Path to the Jenkins job
- buildNumber(required): Build number or "lastBuild"
List all Jenkins jobs in a folder or at root level.
- folderPath(optional): Path to folder (e.g., "job/MyFolder") or empty for root
Get build history for a specific Jenkins job.
- jobPath(required): Path to the Jenkins job
- limit(optional): Number of recent builds to retrieve (default: 10)
- jobPath(required): Path to the Jenkins job
- buildNumber(required): Build number or "lastBuild"
Get the current Jenkins build queue status.
Get the configuration details of a Jenkins job.
- jobPath(required): Path to the Jenkins job
- Root level job:job/JobName
- Folder job:job/FolderName/job/JobName
- Multi-level:job/Folder1/job/Folder2/job/JobName
The server provides comprehensive error handling:
- Authentication errors: Check your Jenkins credentials
- Job not found: Verify the job path format
- Permission errors: Ensure your Jenkins user has appropriate permissions
- Network errors: Check Jenkins server connectivity
jenkins-mcp-server/ ├── src/ │ └── index.ts # Main server implementation ├── build/ # Compiled JavaScript output ├── package.json # Project configuration ├── tsconfig.json # TypeScript configuration ├── .gitignore # Git ignore rules └── README.md # This file
- npm run build: Compile TypeScript to JavaScript
- npm run watch: Watch for changes and rebuild
- npm run inspector: Start MCP Inspector for debugging
- npm run prepare: Prepare build (runs automatically)
- npm run clean: Clean build artifacts and dependencies (macOS/Linux)
- npm run clean:win: Clean build artifacts and dependencies (Windows)
To reset the project to its initial state (remove build artifacts and dependencies):
npm run clean # or manually: rm -rf node_modules build package-lock.json
npm run clean:win # or manually: rmdir /s /q node_modules & rmdir /s /q build & del package-lock.json
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
- "Jenkins API error": Check your Jenkins URL and credentials
- "Job not found": Verify the job path format (usejob/prefix)
- "Permission denied": Ensure your Jenkins user has required permissions
- "Connection refused": Check if Jenkins server is running and accessible
For more information, visit theJenkins REST API documentation.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Access and interact with Harness platform data, including pipelines, repositories, logs, and artifact registries.
An SSE-based MCP server that allows LLM-powered applications to interact with OCI registries. It provides tools for retrieving information about container images, listing tags, and more.
The Octopus MCP Server provides your AI assistant with powerful tools that allow it to inspect, query, and diagnose problems within your Octopus instance, transforming it into your ultimate DevOps wingmate.
The Railway MCP Server enables natural language interaction with your Railway projects and infrastructure. Ask your IDE or AI assistant to create projects, deploy templates, manage environments, pull variables, redeploy services, and more.
The Shipyard CLI provides an MCP server for agents to manage Shipyard environments directly: by pulling logs, comparing branches, running tests, and stopping/starting environments..
MCP server for managing Unleash feature flags and automate best practices.
A server for automated provisioning, supporting both local and remote communication protocols.
Integrates with AWS CodePipeline to manage continuous integration and delivery pipelines.
Manage apps, builds, and artifacts on Bitrise, a Continuous Integration and Delivery (CI/CD) platform.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





