Jenkins MCP
Jenkins MCP
Servidor MCP para administrar operaciones de Jenkins.
Instalación
Instalación mediante herrería
Para instalar Jenkins MCP para Claude Desktop automáticamente a través de Smithery :
npx -y @smithery/cli install @kjozsa/jenkins-mcp --client claudeInstalación manual
uvx install jenkins-mcpRelated MCP server: jenkins-mcp-server
Configuración
Agregue el servidor MCP utilizando el siguiente fragmento de configuración JSON:
{
"mcpServers": {
"jenkins-mcp": {
"command": "uvx",
"args": ["jenkins-mcp"],
"env": {
"JENKINS_URL": "https://your-jenkins-server/",
"JENKINS_USERNAME": "your-username",
"JENKINS_PASSWORD": "your-password",
"JENKINS_USE_API_TOKEN": "false"
}
}
}
}Manejo de migajas CSRF
Jenkins implementa la protección CSRF mediante "crumbs", tokens que deben incluirse en las solicitudes POST. Este servidor MCP gestiona las migajas CSRF de dos maneras:
Modo predeterminado : obtiene e incluye automáticamente fragmentos CSRF con solicitudes de compilación
Utiliza cookies de sesión para mantener la sesión web.
Maneja toda la protección CSRF detrás de escena
Modo de token de API : utiliza tokens de API de Jenkins que están exentos de la protección CSRF
Establezca
JENKINS_USE_API_TOKEN=trueEstablezca
JENKINS_PASSWORDen su token de API en lugar de la contraseñaFunciona con Jenkins 2.96+, que no requiere migas para la autenticación del token API
Puede generar un token de API en Jenkins en: Usuario → Configurar → Token de API → Agregar nuevo token
Características
Lista de trabajos de Jenkins
Desencadenadores de compilaciones con parámetros opcionales
Comprobar el estado de la compilación
Manejo de fragmentos CSRF para acceso seguro a la API
Desarrollo
# Install dependencies
uv pip install -r requirements.txt
# Run in dev mode with Inspector
mcp dev jenkins_mcp/server.pyAvailable Tools
3 toolsget_build_statusB
Get build status
Args:
job_name: Name of the job
build_number: Build number to check, defaults to latest
Returns:
Build information dictionary
Inputs: job_name (required), build_number.
list_jobsB
List all Jenkins jobs
Inputs: no named parameters. Returns: result
trigger_buildB
Trigger a Jenkins build
Args:
job_name: Name of the job to build
parameters: Optional build parameters as a dictionary (e.g. {"param1": "value1"})
Returns:
Dictionary containing build information including the build number
Inputs: job_name (required), parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: get_build_status retrieves status information, list_jobs enumerates available jobs, and trigger_build initiates new builds. There is no overlap in functionality, making tool selection straightforward for an agent.
All tools follow a consistent verb_noun naming pattern (get_build_status, list_jobs, trigger_build). The verbs are descriptive and appropriate for their actions, and snake_case is used uniformly throughout.
With only 3 tools, the set feels thin for a Jenkins integration, which typically involves more operations like viewing logs, managing job configurations, or canceling builds. This limited scope may hinder agent workflows that require broader control.
The toolset is severely incomplete for Jenkins automation. It lacks essential operations such as viewing build logs, updating job configurations, canceling builds, or managing nodes/plugins. This creates significant gaps that will likely cause agent failures in common use cases.
Maintenance
Related MCP Connectors
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for interacting with a Jenkins CI/CD server. Allows you to trigger jobs, check build statuses, and manage your Jenkins instance through MCP.46 npm14Apache 2.0
- FlicenseAqualityDmaintenanceExposes a Jenkins controller's REST API to MCP-compatible clients, enabling job management, build triggering, and log retrieval through natural language.114-
- AlicenseNot gradedqualityDmaintenanceEnables Jenkins CI/CD integration with job management, pipeline monitoring, artifact handling, and batch operations via MCP.4Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables AI agents and external systems to programmatically trigger and monitor Jenkins jobs, retrieve build status and logs via MCP standards.-