home / mcp / jenkins mcp server
jenkins-mcp-langchain
Configuration
View docs{
"mcpServers": {
"anil-appari007-jenkins-mcp-langchain": {
"command": "jenkins-mcp-server",
"args": [
"--verbose"
],
"env": {
"JENKINS_URL": "http://your-jenkins-server:8080",
"JENKINS_TOKEN": "YOUR_TOKEN",
"JENKINS_PASSWORD": "your-password",
"JENKINS_USERNAME": "your-username"
}
}
}
}You can run a Python-based Jenkins MCP Server that lets an AI assistant interact with Jenkins for insights, build management, and debugging. It follows the Model Context Protocol (MCP), enabling seamless collaboration between your Jenkins setup and AI tools.
You will connect an MCP-capable AI assistant to your Jenkins environment and use built-in tools to list jobs, trigger builds, inspect build details, and analyze logs. Use the MCP server with a compatible client or editor extension to issue high-level prompts like listing all jobs, getting job status, triggering builds, and fetching build logs. The server exposes resources and tools that let you inspect Jenkins state and orchestrate builds from natural language prompts.
Prerequisites: you need Python and network access to your Jenkins instance. You will install the MCP server package, then run the server locally.
# Option 1: Install as a Python package (recommended)
pip install jenkins-mcp-server==0.1.6
# Run the server (stdio mode)
jenkins-mcp-server --verboseOr you can run it via a development path after cloning the project.
# Option 2: Clone and run
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 (stdio mode)
python -m jenkins_mcp_serverTo connect your MCP client to Jenkins, you configure the MCP server that runs locally. You can run the server directly or configure it to be launched by your editor or tooling via stdio. The server supports verbose mode for troubleshooting.
# Run the MCP server with verbose logging
jenkins-mcp-server --verbose
```
```bash
# Or start via Python module (alternative startup)
python -m jenkins_mcp_server --verboseTriggers a Jenkins job build with optional parameters and returns queue information for the started build.
Stops a running Jenkins build identified by job name and build number.
Fetches detailed information about a specific Jenkins job, including recent builds and configuration.
Lists all Jenkins jobs along with their current statuses.
Returns information about a specific build, including status, duration, and result.
Retrieves the console output from a specific build for debugging and analysis.
Provides information about the Jenkins build queue, including pending builds.
Returns status and configuration details for a Jenkins node/agent.
Lists all Jenkins nodes/agents and their current statuses.
Analyzes all Jenkins jobs, identifies potential issues, and suggests improvements.
Analyzes logs for a specific build to identify errors, warnings, and possible fixes.