Jenkins Server MCP
A tool for interacting with Jenkins CI/CD servers, requiring environment variables for configuration.
Jenkins Server MCP
A Model Context Protocol (MCP) server that provides tools for interacting with Jenkins CI/CD servers. This server enables AI assistants to check build statuses, trigger builds, and retrieve build logs through a standardized interface.
Installation
- Clone this repository:
git clone https://github.com/hekmon8/jenkins-server-mcp.git cd jenkins-server-mcp
- Install dependencies:
npm install
- Build the project:
npm run build
Configuration
The server requires the following environment variables:
JENKINS_URL: The URL of your Jenkins serverJENKINS_USER: Jenkins username for authenticationJENKINS_TOKEN: Jenkins API token for authentication
Configure these in your MCP settings file:
For Claude Desktop
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.jsonWindows: %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" } } } }
Tools and Usage
1. Get Build Status
Get the status of a Jenkins build:
// Example usage const result = await mcpClient.useTool("jenkins-server", "get_build_status", { jobPath: "view/xxx_debug", buildNumber: "lastBuild" // Optional, defaults to lastBuild });
Input Schema:
{ "jobPath": "string", // Path to Jenkins job "buildNumber": "string" // Optional, build number or "lastBuild" }
2. Trigger Build
Trigger a new Jenkins build with parameters:
// Example usage const result = await mcpClient.useTool("jenkins-server", "trigger_build", { jobPath: "view/xxx_debug", parameters: { BRANCH: "main", BUILD_TYPE: "debug" } });
Input Schema:
{ "jobPath": "string", // Path to Jenkins job "parameters": { // Build parameters as key-value pairs } }
3. Get Build Log
Retrieve the console output of a Jenkins build:
// Example usage const result = await mcpClient.useTool("jenkins-server", "get_build_log", { jobPath: "view/xxx_debug", buildNumber: "lastBuild" });
Input Schema:
{ "jobPath": "string", // Path to Jenkins job "buildNumber": "string" // Build number or "lastBuild" }
Development
For development with auto-rebuild:
npm run watch
Debugging
Since MCP servers communicate over stdio, you can use the MCP Inspector for debugging:
npm run inspector
This will provide a URL to access debugging tools in your browser.
Thanks
Thanks AIMCP(https://www.aimcp.info).
License
This project is licensed under the MIT License - see the LICENSE file for details.
Related Servers
Chrome Debug MCP Server
Control Chrome with debugging capabilities, userscript injection, and extension support.
ADB Friend
A CLI tool for developers to manage Android devices via ADB.
Manual Tests MCP Server
A YAML-based server for managing manual test cases with tools for test automation workflows.
Remote MCP Server (Authless)
A template for deploying a remote, auth-less MCP server on Cloudflare Workers.
OriginUI MCP Server
Search and install OriginUI components, with details fetched dynamically from the OriginUI JSON registry.
MCP Think Tool Server
An MCP server implementing the 'think' tool to improve Claude's complex reasoning capabilities.
Luskad MCP
Provides access to coding rules and examples for your projects.
Jenkins
A server for integrating with Jenkins CI/CD to manage and trigger builds.
MCP-Haskell
A complete Model Context Protocol (MCP) implementation for Haskell, supporting both StdIO and HTTP transport.
MCP Image Generator
An MCP server for generating images using Together AI or Replicate models.