Skip to main content
Glama

Jenkins MCP Server

by umishra1504

Jenkins MCP Server

🚀 AI-powered Jenkins management via Model Context Protocol. Trigger builds, manage jobs, and monitor CI/CD pipelines through your favorite AI assistant.

� Installation

npm install -g jenkins-mcp-server

Option 2: Local Installation

npm install jenkins-mcp-server

Option 3: Use with npx (No Installation)

npx jenkins-mcp-server

⚙️ Configuration

Set required environment variables:

export JENKINS_URL="http://your-jenkins-instance:8080" export JENKINS_USERNAME="your-username" export JENKINS_API_TOKEN="your-api-token"

Getting Jenkins API Token

  1. Login to Jenkins → Click your username → Configure
  2. Under "API Token" → Add new Token → Generate
  3. Copy the token and use it as JENKINS_API_TOKEN

🤖 MCP Client Setup

GitHub Copilot (VS Code)

Add to mcp.json:

{ "servers": { "jenkins": { "command": "npx", "args": ["jenkins-mcp-server"], "env": { "JENKINS_URL": "http://your-jenkins-instance:8080", "JENKINS_USERNAME": "your-username", "JENKINS_API_TOKEN": "your-api-token" // "ALLOW_ABSOLUTE_FILE_PARAMS": 1 // for file parameters with absolute paths } } } }

Claude Desktop

Add to claude_desktop_config.json:

{ "mcpServers": { "jenkins": { "command": "npx", "args": ["jenkins-mcp-server"], "env": { "JENKINS_URL": "http://your-jenkins-instance:8080", "JENKINS_USERNAME": "your-username", "JENKINS_API_TOKEN": "your-api-token", // "ALLOW_ABSOLUTE_FILE_PARAMS": 1 // for file parameters with absolute paths } } } }

🛠️ Available Tools

Each tool returns a JSON result with success plus additional fields. Provide arguments as an object when invoking via an MCP client.

Build Management

triggerBuild – Start a job build (supports file + regular parameters) Inputs:

  • jobFullName (string, required)
  • parameters (object, optional) – Key/value map. Any value that is a valid local file path is uploaded as a file parameter.

File Parameter Security: By default, only relative file paths are allowed. To enable absolute file paths, set ALLOW_ABSOLUTE_FILE_PARAMS=1 in your environment variables.

Returns: { success, queueId, queueUrl, statusCode, message }

stopBuild – Stop (or force kill) the running build Inputs:

  • jobFullName (string, required)
  • buildNumber (integer, optional) Returns: { success, action: "stop"|"kill", buildNumber, buildUrl, message }

scheduleBuild – Schedule a build in the future Inputs:

  • jobFullName (string, required)
  • scheduleTime (string, required) – e.g. 22:15, 10:30 PM, or 2025-12-24 14:30
  • parameters (object, optional)

File Parameter Security: By default, only relative file paths are allowed. To enable absolute file paths, set ALLOW_ABSOLUTE_FILE_PARAMS=1 in your environment variables.

Returns: { status, queueUrl }

updateBuild – Update build description (display name not supported via REST) Inputs:

  • jobFullName (string, required)
  • buildNumber (integer, optional)
  • description (string, optional)
  • displayName (string, optional, ignored) Returns: { success, buildNumber, updates: [ { field, success, ... } ] }

Job Information

getJob – Job metadata Inputs: jobFullName (string, required)

getBuild – Build details (specific or last) Inputs:

  • jobFullName (string, required)
  • buildNumber (integer, optional)

getJobs – Paginated job list Inputs:

  • parentFullName (string, optional)
  • skip (integer, optional, default 0)
  • limit (integer, optional, default 10, max 10)

System Monitoring

whoAmI – Current authenticated user Inputs: none

getStatus – Jenkins instance status / health Inputs: none

Artifact Management

listBuildArtifacts – List artifacts for build Inputs:

  • jobFullName (string, required)
  • buildNumber (integer, optional)

readBuildArtifact – Read artifact content (text or base64) Inputs:

  • jobFullName (string, required)
  • artifactPath (string, required)
  • buildNumber (integer, optional)
  • format (string, optional: text | base64)

Queue Operations

cancelQueuedBuild – Cancel queued item(s) Inputs:

  • jobFullName (string, required)
  • queueId (integer, optional)

getQueueInfo – List queued builds (optionally filtered) Inputs:

  • jobFullName (string, optional)

Tip: Ask your AI assistant: "Trigger a build for job X with BRANCH=main" or "List artifacts for latest job X build".

⚡ Usage

After configuration, ask your AI assistant:

  • "Check my Jenkins server status"
  • "Trigger a build for my-app"
  • "Show me the latest build information"
  • "List all Jenkins jobs"

📄 License

MIT License - see LICENSE file for details.


Deploy Server
-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables comprehensive Jenkins automation through MCP interface, allowing users to manage builds, jobs, artifacts, and queues with natural language commands. Supports build triggering, monitoring, artifact retrieval, and system status checks with automatic CSRF protection and authentication.

  1. � Installation
    1. Option 1: Global Installation (Recommended)
    2. Option 2: Local Installation
    3. Option 3: Use with npx (No Installation)
  2. ⚙️ Configuration
    1. Getting Jenkins API Token
  3. 🤖 MCP Client Setup
    1. GitHub Copilot (VS Code)
    2. Claude Desktop
  4. 🛠️ Available Tools
    1. Build Management
    2. Job Information
    3. System Monitoring
    4. Artifact Management
    5. Queue Operations
  5. ⚡ Usage
    1. 📄 License

      MCP directory API

      We provide all the information about MCP servers via our MCP API.

      curl -X GET 'https://glama.ai/api/mcp/v1/servers/umishra1504/Jenkins-mcp-server'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server