Jenkins MCP Server
Description
MCP Jenkins is a Go-based integration layer designed to connect Model Context Protocol (MCP) tools with Jenkins CI/CD pipelines. This project provides a lightweight, high-performance bridge that enables automated pipeline execution, job management, and status retrieval through…
About
MCP Jenkins is a Go-based integration layer designed to connect Model Context Protocol (MCP) tools with Jenkins CI/CD pipelines. This project provides a lightweight, high-performance bridge that enables automated pipeline execution, job management, and status retrieval through MCP-driven workflows.
Details
- Author
- nithishnithi
- Categories
- Developer Tools, Other
Jump to
Setup
Install Jenkins MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/nithishnithi/go-jenkins-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
MCP Jenkins is a Go-based integration layer designed to connect Model Context Protocol (MCP) tools with Jenkins CI/CD pipelines. This project provides a lightweight, high-performance bridge that enables automated pipeline execution, job management, and status retrieval through MCP-driven workflows.
A Model Context Protocol (MCP) server implementation in Go that provides programmatic access to Jenkins CI/CD functionality. This server enables AI assistants and other MCP clients to interact with Jenkins instances through a standardized protocol interface.
- Complete Jenkins API Coverage: List jobs, trigger builds, monitor status, retrieve logs and artifacts
- MCP Protocol Compliant: Full implementation of the Model Context Protocol specification
- Secure Authentication: Username and API token authentication with TLS/SSL support
- Robust Error Handling: Automatic retry with exponential backoff for transient failures
- Production Ready: Comprehensive error handling, logging, and timeout management
- Multi-Instance Support: Optional tool prefixing for running multiple Jenkins servers
go install github.com/NithishNithi/go-jenkins-mcp/cmd/jenkins-mcp-server@latest
git clone https://github.com/NithishNithi/go-jenkins-mcp.git cd go-jenkins-mcp go build -o jenkins-mcp-server .
Download the latest release from thereleases page.
- Go 1.23.6 or later (for building from source)
- Access to a Jenkins instance
- Jenkins username and API token
# Required JENKINS_URL=https://jenkins.example.com JENKINS_USERNAME=your-username JENKINS_API_TOKEN=your-api-token-here # Optional JENKINS_TIMEOUT=30s # Request timeout (default: 30s) JENKINS_TLS_SKIP_VERIFY=false # Skip TLS verification (default: false) JENKINS_CA_CERT=/path/to/ca.crt # Custom CA certificate path JENKINS_MAX_RETRIES=3 # Maximum retry attempts (default: 3) JENKINS_RETRY_BACKOFF=1s # Initial retry backoff (default: 1s) JENKINS_TOOL_PREFIX=prod # Tool name prefix for multi-instance setups
Note:JENKINS_TOOL_PREFIXallows you to run multiple Jenkins MCP servers simultaneously by prefixing tool names (e.g.,prod_jenkins_list_jobs,staging_jenkins_list_jobs).
jenkins: url: https://jenkins.example.com username: your-username apiToken: your-api-token-here toolPrefix: prod # Optional prefix for tool names # Optional settings timeout: 30s tls: skipVerify: false caCert: /path/to/ca.crt retry: maxAttempts: 3 backoff: 1s
jenkins-mcp-server --config /path/to/config.yaml
- Log in to Jenkins
- Click your name in the top right corner
- Click "Configure"
- Under "API Token", click "Add new Token"
- Copy the generated token
# Using environment variables export JENKINS_URL=https://jenkins.example.com export JENKINS_USERNAME=your-username export JENKINS_API_TOKEN=your-token jenkins-mcp-server # Using configuration file jenkins-mcp-server --config config.yaml
- jenkins_list_jobs- List all accessible Jenkins jobs
- jenkins_get_job- Get detailed job information
- jenkins_trigger_build- Trigger a new build (supports parameters)
- jenkins_get_build- Get build status and details
- jenkins_get_build_log- Retrieve console output
- jenkins_get_running_builds- Get all currently running builds
- jenkins_stop_build- Stop a running build
- jenkins_list_artifacts- List build artifacts
- jenkins_get_artifact- Download specific artifacts
- jenkins_get_queue- View the build queue
- jenkins_get_queue_item- Get queue item details
- jenkins_cancel_queue_item- Cancel queued builds
- jenkins_list_views- List all views
- jenkins_get_view- Get jobs in a view
- jenkins_create_view- Create a new view
- jenkins_server_health- Check server health
- jenkins_list_nodes- List Jenkins nodes
- jenkins_get_pipeline_script- Retrieve Jenkinsfile content
Add to your Claude Desktop configuration file:
macOS:~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:%APPDATA%\Claude\claude_desktop_config.jsonLinux:~/.config/Claude/claude_desktop_config.json
{ "mcpServers": { "jenkins": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "JENKINS_URL=https://jenkins.example.com", "-e", "JENKINS_USERNAME=your-username", "-e", "JENKINS_API_TOKEN=your-api-token", "-e", "JENKINS_TOOL_PREFIX=prod", "ghcr.io/nithishnithi/jenkins-mcp-server:latest" ] } } }
- "List all Jenkins jobs"
- "Trigger a build for the main-pipeline job"
- "Show me the latest build status for my-app"
- "Get the build log for build #42"
- VerifyJENKINS_URLis correct and accessible
- Check network connectivity and firewall rules
- Ensure Jenkins is running
- Verify API token is valid
- Check username is correct
- Regenerate API token if needed
- SetJENKINS_TLS_SKIP_VERIFY=truefor testing only
- Provide custom CA certificate viaJENKINS_CA_CERT
- Update system CA certificates
- Verify Jenkins user has appropriate permissions
- Check job-level permissions in Jenkins
- IncreaseJENKINS_TIMEOUTvalue
- Check Jenkins server performance
- Verify network latency
- Verify binary path in configuration
- Check environment variables are properly set
- Restart MCP client after changes
- Ensure binary has execute permissions:chmod +x jenkins-mcp-server
export LOG_LEVEL=debug jenkins-mcp-server
. ├── internal/ │ ├── config/ # Configuration management │ ├── jenkins/ # Jenkins API client │ └── mcp/ # MCP server implementation ├── main.go # Application entry point ├── go.mod # Go module definition ├── Dockerfile # Docker image definition └── README.md # This file
- Fork the repository
- Create a feature branch
- Add tests for your changes
- Submit a pull request
MIT License - see LICENSE file for details.
- Issues:GitHub Issues
- MCP Protocol:Model Context Protocol
Built with theModel Context Protocol Go SDK
Creates commit messages from staged files in a local git repository.
An MCP server for interacting with the AtomGit API for version control and code hosting.
A portable MCP server for performing various GitHub operations on any repository.
Manage Forgejo repositories and execute commands through an MCP-compatible chat interface.
Integrates with the Gerrit code review system to review code changes and details.
Make git commits on behalf of AI to track AI contributions in your codebase.
Performs deep, file-level forensics on Git repositories to analyze file histories, changes, and patterns.
Interact with the GitHub API for file operations, repository management, and search.
Manage GitHub repositories using a personal access token via CLI or environment variables.
Allows AI assistants to interact with the GitHub API for repository management, code collaboration, and other development tasks.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





