home / mcp / jenkins mcp server
An MCP server for interacting with a Jenkins server. Allows you to trigger jobs, check build statuses, and manage your Jenkins instance through MCP.
Configuration
View docs{
"mcpServers": {
"ashwinighuge3012-jenkins-mcp-server": {
"command": "jenkins-mcp",
"args": [],
"env": {
"JENKINS_URL": "http://your-jenkins-server:8080",
"JENKINS_USER": "your-username",
"JENKINS_API_TOKEN": "your-api-token"
}
}
}
}You deploy and run a production-ready MCP server to manage Jenkins CI/CD workflows through a programmable API. This server lets AI assistants and automation tools trigger jobs, monitor builds, fetch logs, manage artifacts, and perform advanced queries against your Jenkins instance in a scalable, secure way.
You run the MCP server locally or in your environment and connect your MCP client to it. Use the provided tools to trigger jobs, check build statuses, stream console logs, manage artifacts, and monitor queues. If you enable HTTP transport, you can expose the MCP API over HTTP for integration with gateways or webhooks. The server handles authentication, validation, and retries to ensure reliable interactions with Jenkins.
Prerequisites: Node.js 14.0.0 or higher, Python 3.12 or higher, and Jenkins 2.401+ with an API token.
# Global installation (recommended)
npm install -g @ashwinighuge/jenkins-mcp-server
# Or use directly with npx
npx @ashwinighuge/jenkins-mcp-server --helpConfigure access to Jenkins by setting the required environment variables when you start the server. The MCP server reads Jenkins connection details from these variables and uses them to authenticate and interact with Jenkins.
# Claude Desktop integration snippet
{
"mcpServers": {
"jenkins": {
"command": "jenkins-mcp",
"env": {
"JENKINS_URL": "http://your-jenkins-server:8080",
"JENKINS_USER": "your-username",
"JENKINS_API_TOKEN": "your-api-token"
}
}
}
}You can operate the Jenkins MCP server from an MCP client to perform a wide range of actions. The server exposes a set of endpoints for job control, status retrieval, artifact management, batch operations, caching controls, and more. Use the client to call these endpoints in your automation scripts, chat assistants, or workflow orchestrators.
When running in STDIO mode, you interact with the server via standard input/output, which is ideal for local desktop integrations. In HTTP mode, you expose the MCP API over a port and can integrate with MCP Gateways or web services.
If you encounter connection issues to Jenkins, verify the URL, the API tokenβs validity, and your network access. For 2FA or CSRF challenges, prefer using API tokens and ensure the MCP server handles CSRF protection automatically.
Enable verbose logging during setup to diagnose issues: set DEBUG=jenkins-mcp and run the server to view detailed output.
Triggers a Jenkins job with optional parameters and returns a queue reference for monitoring.
Retrieves detailed information about a Jenkins job, including parameters and last build.
Fetches the status, timestamp, duration, and URL for a specific build.
Retrieves the console output for a specific build, with optional start offset.
Lists all Jenkins jobs with filtering options like status, last build result, and date ranges.
Searches for Jenkins jobs by pattern with options for depth and regex matching.
Returns information about builds currently waiting in the queue.
Provides basic information about the Jenkins server, including version and URL.
Gathers detailed stage-by-stage status for Jenkins Pipeline builds.
Lists all artifacts for a specified build.
Downloads a specific build artifact, with safety limits for text-based artifacts.
Searches for artifacts across recent builds of a job using patterns.
Triggers multiple Jenkins jobs in parallel with priority and concurrency controls.
Monitors the status of a batch operation and its individual jobs.
Cancels a batch operation and optionally running builds.
Returns cache performance metrics for all cache types.
Clears caches by type or for a specific job.
Warms frequently accessed data into caches to speed up responses.
Demonstrates log summarization using a pre-configured prompt.