Jenkins MCP Server
About
Integrates with Jenkins CI/CD systems for AI-powered insights, build management, and debugging.
Details
- Author
- akhilthomas236
- Categories
- Developer Tools
Jump to
Option 1: Install as a Python Package (Recommended)
The easiest way to install and run this server is as a Python package:
# Install from PyPI pip install jenkins-mcp-server==0.1.6 # Or install with uv uv pip install jenkins-mcp-server==0.1.6 # Run the server jenkins-mcp-server --verbose
# Clone the repository git clone https://github.com/yourusername/jenkins-mcp-server.git cd jenkins-mcp-server # Create a virtual environment and install dependencies uv venv uv pip install -e . # Run the server python -m jenkins_mcp_server
For quick installation, use one of the one-click install buttons below:
- Install the Model Context Protocol (MCP) extension for VS Code
- Create a.vscode/mcp.jsonfile in your workspace with the following configuration:
{ "servers": { "jenkins-mcp-server": { "type": "stdio", "command": "jenkins-mcp-server", "args": ](https://modelcontextprotocol.io/)["--verbose"], "env": { "JENKINS_URL": "http://your-jenkins-server:8080", "JENKINS_USERNAME": "your-username", "JENKINS_TOKEN": "your-api-token" // Or use JENKINS_PASSWORD instead of JENKINS_TOKEN if using password authentication } } } }
- Recommended: Use API token authentication by settingJENKINS_TOKEN
- Alternatively: Use password authentication by settingJENKINS_PASSWORD
Connect any AI assistant that supports MCP (like GitHub Copilot) to your Jenkins environment
The server provides access to Jenkins jobs as resources:
- Custom jenkins:// URI scheme for accessing individual jobs
- Each job resource contains details about the job and its builds in JSON format
- Job status is reflected in the resource description
The server provides prompts for Jenkins data analysis:
-
analyze-job-status: Creates analysis of all Jenkins jobs
- Optional "detail_level" argument to control analysis depth (brief/detailed)
- Analyzes job statuses, identifies potential issues, and suggests improvements
analyze-build-logs: Analyzes build logs for a specific job
- Required "job_name" argument to specify which job to analyze
- Optional "build_number" argument (defaults to latest build)
- Examines build logs to identify issues, errors, warnings, and suggests fixes
The server implements the following tools for Jenkins operations:
-
trigger-build: Triggers a Jenkins job build
- Required "job_name" argument to specify which job to build
- Optional "parameters" object containing job parameters
- Returns build queue information
stop-build: Stops a running Jenkins build
- Required "job_name" and "build_number" arguments
- Halts an in-progress build execution
get-job-details: Gets detailed information about a specific job
- Required "job_name" argument
- Returns comprehensive job information including recent builds
- Returns a list of all Jenkins jobs with their statuses
get-build-info: Gets information about a specific build
- Required "job_name" and "build_number" arguments
- Returns build status, duration, and other details
get-build-console: Gets console output from a build
- Required "job_name" and "build_number" arguments
- Returns the console log output from a specific build
get-queue-info: Gets information about the Jenkins build queue
- Returns information about pending builds in the queue
get-node-info: Gets information about a Jenkins node/agent
- Required "node_name" argument
- Returns node status and configuration details
list-nodes: Lists all Jenkins nodes/agents
- Returns a list of all Jenkins nodes/agents and their statuses
A Python-based Jenkins MCP server using the Model Context Protocol Python SDK. This server integrates with Jenkins CI/CD systems to provide AI-powered insights, build management, and debugging capabilities.
Note:This server follows theModel Context Protocol (MCP), enabling AI assistants to interact with Jenkins systems directly.
Option 1: Install as a Python Package (Recommended)
The easiest way to install and run this server is as a Python package:
# Install from PyPI pip install jenkins-mcp-server==0.1.6 # Or install with uv uv pip install jenkins-mcp-server==0.1.6 # Run the server jenkins-mcp-server --verbose
# Clone the repository git clone https://github.com/yourusername/jenkins-mcp-server.git cd jenkins-mcp-server # Create a virtual environment and install dependencies uv venv uv pip install -e . # Run the server python -m jenkins_mcp_server
For quick installation, use one of the one-click install buttons below:
- Install the Model Context Protocol (MCP) extension for VS Code
- Create a.vscode/mcp.jsonfile in your workspace with the following configuration:
{ "servers": { "jenkins-mcp-server": { "type": "stdio", "command": "jenkins-mcp-server", "args": ["--verbose"], "env": { "JENKINS_URL": "http://your-jenkins-server:8080", "JENKINS_USERNAME": "your-username", "JENKINS_TOKEN": "your-api-token" // Or use JENKINS_PASSWORD instead of JENKINS_TOKEN if using password authentication } } } }
- Recommended: Use API token authentication by settingJENKINS_TOKEN
- Alternatively: Use password authentication by settingJENKINS_PASSWORD
Connect any AI assistant that supports MCP (like GitHub Copilot) to your Jenkins environment
The server provides access to Jenkins jobs as resources:
- Custom jenkins:// URI scheme for accessing individual jobs
- Each job resource contains details about the job and its builds in JSON format
- Job status is reflected in the resource description
The server provides prompts for Jenkins data analysis:
-
analyze-job-status: Creates analysis of all Jenkins jobs
- Optional "detail_level" argument to control analysis depth (brief/detailed)
- Analyzes job statuses, identifies potential issues, and suggests improvements
analyze-build-logs: Analyzes build logs for a specific job
- Required "job_name" argument to specify which job to analyze
- Optional "build_number" argument (defaults to latest build)
- Examines build logs to identify issues, errors, warnings, and suggests fixes
The server implements the following tools for Jenkins operations:
-
trigger-build: Triggers a Jenkins job build
- Required "job_name" argument to specify which job to build
- Optional "parameters" object containing job parameters
- Returns build queue information
stop-build: Stops a running Jenkins build
- Required "job_name" and "build_number" arguments
- Halts an in-progress build execution
get-job-details: Gets detailed information about a specific job
- Required "job_name" argument
- Returns comprehensive job information including recent builds
- Returns a list of all Jenkins jobs with their statuses
get-build-info: Gets information about a specific build
- Required "job_name" and "build_number" arguments
- Returns build status, duration, and other details
get-build-console: Gets console output from a build
- Required "job_name" and "build_number" arguments
- Returns the console log output from a specific build
get-queue-info: Gets information about the Jenkins build queue
- Returns information about pending builds in the queue
get-node-info: Gets information about a Jenkins node/agent
- Required "node_name" argument
- Returns node status and configuration details
list-nodes: Lists all Jenkins nodes/agents
- Returns a list of all Jenkins nodes/agents and their statuses
Option 1: VS Code Settings (Recommended)
Configure your Jenkins connection in VS Code settings:
- Open VS Code Settings (PressCmd+,on Mac orCtrl+,on Windows/Linux)
- Click on the "Open Settings (JSON)" button in the top right
- Add these settings:
{ "mcp.servers": { "jenkins": { "type": "stdio", "command": "uvx", "args": ["jenkins-mcp-server"] } }, "jenkins-mcp-server.jenkins": { "url": "http://your-jenkins-server:8080", "username": "your-username", "token": "" // Replace with your Jenkins API token } }
Create a file at.vscode/mcp.jsonwith these contents:
{ "servers": { "jenkins-mcp-server": { "type": "stdio", "command": "jenkins-mcp-server", "args": [ "--verbose" ] } } }
{ "jenkins-mcp-server.jenkins": { "url": "http://your-jenkins-server:8080", "username": "your-username", "token": "" // Replace with your Jenkins API token } }
- Registers the MCP server in VS Code
- Stores your Jenkins credentials securely in VS Code settings
- Usesuvxto run the server automatically when needed
Alternatively, configure your Jenkins connection by setting environment variables:
-
Copy the.env.examplefile to create a.envfile:
Edit the.envfile with your Jenkins details:
JENKINS_URL=http://your-jenkins-server:8080 JENKINS_USERNAME=your-username JENKINS_PASSWORD=your-password # OR use an API token instead of password (recommended) JENKINS_TOKEN=your-api-token
Security Note:Using VS Code settings is more secure as they are stored encrypted. Environment variables in a.envfile are stored in plain text.
Once configured, AI assistants that support MCP can now interact with your Jenkins server through natural language. Here are some examples of what you can do:
- Open GitHub Copilot Chat in VS Code
- Type prompts like:
- "List all my Jenkins jobs"
- "What's the status of my 'deployment' job?"
- "Show me the build logs for the failed build in 'test-project'"
- "Trigger a new build for 'deploy-api'"
You can also run the server directly from the command line:
# Run the MCP server uvx jenkins-mcp-server # In another terminal, use curl to test it: curl -X POST http://localhost:8080/mcp/v1/listResources -H "Content-Type: application/json" -d '{}'
Theuvxcommand makes it easy to use the MCP server in command-line environments without VS Code:
# Install UVX if you don't have it yet pip install uv # Install the Jenkins MCP server uvx install jenkins-mcp-server bash # Install UVX if you don't have it yet pip install uv # Install the Jenkins MCP server from PyPI uvx install jenkins-mcp-server==0.1.6 # Run the server with verbose output uvx jenkins-mcp-server --verbose
You can manually send JSON-RPC requests:
echo '{"jsonrpc":"2.0","id":1,"method":"listResources","params":{}}' | uvx jenkins-mcp-server
If you're developing this MCP server:
- Clone this repository
- Install dependencies:
uv venv uv pip install -e ".[dev]"
"mcp": { "servers": { "jenkins-mcp-server": { "type": "stdio", "command": "bash", "args": [ "-c", "cd ${workspaceFolder} && python -m jenkins_mcp_server --verbose" ] } } }
- Install the GitHub Copilot Chat extension
- Enable MCP in Copilot settings
- Start a new chat with Copilot and interact with your Jenkins server!
On MacOS:~/Library/Application\ Support/Claude/claude_desktop_config.jsonOn Windows:%APPDATA%/Claude/claude_desktop_config.json
"mcpServers": { "jenkins-mcp-server": { "command": "uv", "args": [ "run", "jenkins-mcp-server" ] } }
"mcpServers": { "jenkins-mcp-server": { "command": "uvx", "args": [ "jenkins-mcp-server" ] } }
To prepare the package for distribution:
This will create source and wheel distributions in thedist/directory.
Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token:--tokenorUV_PUBLISH_TOKEN
- Or username/password:--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using theMCP Inspector.
You can launch the MCP Inspector vianpmwith this command:
# If installed globally with uvx npx @modelcontextprotocol/inspector uvx jenkins-mcp-server # If installed in development mode npx @modelcontextprotocol/inspector python -m jenkins_mcp_server```
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
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.
AI-powered live runtime debugging with Lightrun production context.
Run, debug, and triage tests via natural language across HyperExecute, Automation, SmartUI, and Accessibility on the TestMu AI cloud.
Understand, develop, and debug authorization policies in Oso Cloud.
A comprehensive proxy that combines multiple MCP servers into a single MCP. It provides discovery and management of tools, prompts, resources, and templates across servers, plus a playground for debugging when building MCP servers.
Proxyman MCP allows AI to inspect HTTP traffic, create debugging rules, and control Proxyman - all through natural language conversations.
Debug your remote Node.js and Next.js applications directly from your AI IDE like Cursor.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





