Skip to main content
Glama

Jenkins MCP

An MCP Server based on the Jenkins REST API, targeting compatibility with Jenkins 2.332.2, 2.356, and later versions.

It does not install Jenkins plugins, so it is not subject to the minimum Jenkins core version requirement of the official mcp-server plugin. A single MCP Server can manage multiple Jenkins instances in its configuration at the same time, and select the target instance via jenkins_name.

Implemented Capabilities

  • Query Jenkins version and compatibility capabilities

  • Query the currently authenticated user

  • Query Jobs under the root directory or a Folder

  • Query Jobs and Builds

  • Fetch build logs, with a limit on the number of returned lines

  • Query Queue, Queue Items, and nodes

  • Trigger builds, stop builds, cancel queued builds

  • Username + API Token authentication

  • Automatically fetch and retry Jenkins CSRF Crumb

  • Read-only by default; write operations require explicitly setting read_only: false

Related MCP server: Jenkins MCP Server

Installation

Python 3.10 or higher is recommended:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[dev]'

Multi-Jenkins Configuration

Create jenkins-mcp.json:

{
  "instances": [
    {
      "name": "jenkins-233",
      "base_url": "https://jenkins-233.example.com",
      "username": "mcp-user",
      "api_token": "replace-me",
      "read_only": true,
      "verify_ssl": true,
      "timeout_seconds": 30,
      "max_log_lines": 2000
    },
    {
      "name": "jenkins-356",
      "base_url": "https://jenkins-356.example.com/jenkins",
      "username": "mcp-user",
      "api_token": "replace-me",
      "read_only": false
    }
  ],
  "server": {
    "transport": "stdio",
    "log_level": "INFO"
  }
}

Start:

jenkins-mcp --config jenkins-mcp.json

In production, it is recommended to inject configuration via environment variables or a secrets management system; do not commit API Tokens to Git.

Single Jenkins Environment Variable Configuration

You can also use the following variables:

export JENKINS_URL='https://jenkins.example.com'
export JENKINS_USERNAME='mcp-user'
export JENKINS_API_TOKEN='replace-me'
export JENKINS_READ_ONLY='true'
jenkins-mcp

For multiple instances, place a JSON array in JENKINS_INSTANCES_JSON, or use JENKINS_CONFIG_FILE to point to a JSON configuration file.

MCP Client Configuration

stdio example:

{
  "mcpServers": {
    "jenkins": {
      "command": "/absolute/path/to/.venv/bin/jenkins-mcp",
      "args": ["--config", "/absolute/path/to/jenkins-mcp.json"]
    }
  }
}

Use jenkins_name when invoking tools, for example:

list_jobs(jenkins_name="jenkins-233")
get_build_log(jenkins_name="jenkins-356", job_name="team/app", build_number=123)

Version Compatibility Strategy

The service detects the version through Jenkins' X-Jenkins response header. 2.332.2 is the current minimum compatibility baseline, and 2.356 uses the same underlying REST API capabilities. Version-related differences are placed in the capability model in versioning.py; the MCP tool layer does not write version checks directly.

The base REST API is more suitable for cross-version use than the Jenkins plugin API, but plugin-specific features, advanced Pipeline information, and credential management are not part of the current cross-version guarantee.

Development

pytest
ruff check .
A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables managing Jenkins operations like listing jobs, triggering builds, and checking build statuses through a configurable MCP server.
    3
    10
    Apache 2.0

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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/programsummer/jenkins-mcp'

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