Get the FREE Ultimate OpenClaw Setup Guide →

jenkins

MCP server from truxt-ai/jenkins-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio truxt-ai-jenkins-mcp-server uvx run mcp dev server.py \
  --env JENKINS_URL="https://your-jenkins-instance.com" \
  --env JENKINS_USERNAME="your_username" \
  --env JENKINS_API_TOKEN="your_api_token"

How to use

This MCP server exposes Jenkins data and operations through the MCP interface, enabling LLMs to read job configurations, build status, and history, as well as perform common Jenkins tasks via dedicated tools and prompts. Use the provided resources endpoint to fetch information about Jenkins jobs, builds, and configurations, and engage the built-in tools to trigger builds, update job settings, or manage tasks. The server is designed to be consumed by LLM-driven workflows, enabling natural language queries mapped to precise Jenkins operations.

To get started, configure your Jenkins connection using the environment variables (JENKINS_URL, JENKINS_USERNAME, JENKINS_API_TOKEN) in a .env file or your deployment environment. Run the MCP server with the UV environment, then interact with the MCP endpoints through your client or integrated tooling. The server exposes predefined prompts and tools tailored for Jenkins interactions, such as listing jobs, triggering builds, and updating job configurations, allowing you to build sophisticated automation flows with natural language guidance.

How to install

Prerequisites:

  • Python 3.8+
  • Access to a Jenkins instance

Installation with uv (recommended):

  1. Install Ultraviolet (uv) if you haven't already:
curl -sSf https://install.ultraviolet.dev | sh
  1. Create and enter your project:
uv init jenkins-mcp-server
cd jenkins-mcp-server
  1. Add the MCP CLI dependencies and a Jenkins client library:
uv add "mcp[cli]"
uv add python-jenkins
  1. Create a .env file with Jenkins connection details (adjust values accordingly):
cat > .env << EOL
JENKINS_URL=https://your-jenkins-instance.com
JENKINS_USERNAME=your_username
JENKINS_API_TOKEN=your_api_token
EOL
  1. Load the environment variables in your shell:
source .env

Running the server:

  • Start the MCP server in development mode (as shown in the README):
uv run mcp dev server.py

Note: Ensure the Jenkins credentials have the necessary permissions for the operations you intend to perform (trigger builds, read configs, etc.).

Additional notes

Tips:

  • Keep your Jenkins API token secure; rotate periodically and consider using scoped tokens.
  • If you encounter connection issues, verify that JENKINS_URL is reachable from the host running the MCP server and that the provided credentials are correct.
  • The MCP server exposes tools for triggering builds, listing jobs, and updating job configurations; customize prompts if you need more granular Jenkins actions.
  • For large Jenkins instances, consider caching frequently accessed data (like job lists) to reduce latency in LLM responses.
  • Ensure network access rules (firewalls, proxies) allow the MCP server to reach the Jenkins instance on the standard API endpoints.

Related MCP Servers

Sponsor this space

Reach thousands of developers