Skip to main content
Glama
Jenkins MCP
by kjozsa

ジェンキンスMCP

鍛冶屋のバッジ Jenkins 操作を管理するための MCP サーバー。

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の Jenkins MCP を自動的にインストールするには:

npx -y @smithery/cli install @kjozsa/jenkins-mcp --client claude

手動でインストールする

uvx install jenkins-mcp

Related MCP server: jenkins-mcp-server

構成

次の JSON 構成スニペットを使用して MCP サーバーを追加します。

{
  "mcpServers": {
    "jenkins-mcp": {
      "command": "uvx",
      "args": ["jenkins-mcp"],
      "env": {
        "JENKINS_URL": "https://your-jenkins-server/",
        "JENKINS_USERNAME": "your-username",
        "JENKINS_PASSWORD": "your-password",
        "JENKINS_USE_API_TOKEN": "false"
      }
    }
  }
}

CSRF クラム処理

Jenkinsは、POSTリクエストに含める必要があるトークンである「crumbs」を使用してCSRF保護を実装しています。このMCPサーバーは、CSRF crumbsを以下の2つの方法で処理します。

  1. デフォルトモード: CSRF クラムを自動的に取得してビルドリクエストに含める

    • ウェブセッションを維持するためにセッションCookieを使用します

    • すべてのCSRF保護を裏で処理します

  2. APIトークンモード:CSRF保護の対象外のJenkins APIトークンを使用します

    • JENKINS_USE_API_TOKEN=trueを設定する

    • JENKINS_PASSWORDパスワードではなく API トークンに設定します

    • APIトークン認証にcrumbsを必要としないJenkins 2.96以降で動作します

JenkinsでAPIトークンを生成するには、ユーザー→設定→APIトークン→新しいトークンの追加を選択します。

特徴

  • Jenkinsジョブの一覧

  • オプションパラメータでビルドをトリガーする

  • ビルドステータスを確認する

  • 安全な API アクセスのための CSRF クラム処理

発達

# Install dependencies
uv pip install -r requirements.txt

# Run in dev mode with Inspector
mcp dev jenkins_mcp/server.py

Available Tools

3 tools
get_build_statusB

Get build status

Args:
    job_name: Name of the job
    build_number: Build number to check, defaults to latest

Returns:
    Build information dictionary

Inputs: job_name (required), build_number.

list_jobsB

List all Jenkins jobs

Inputs: no named parameters. Returns: result

trigger_buildB

Trigger a Jenkins build

Args:
    job_name: Name of the job to build
    parameters: Optional build parameters as a dictionary (e.g. {"param1": "value1"})

Returns:
    Dictionary containing build information including the build number

Inputs: job_name (required), parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: get_build_status retrieves status information, list_jobs enumerates available jobs, and trigger_build initiates new builds. There is no overlap in functionality, making tool selection straightforward for an agent.

    Naming Consistency5/5

    All tools follow a consistent verb_noun naming pattern (get_build_status, list_jobs, trigger_build). The verbs are descriptive and appropriate for their actions, and snake_case is used uniformly throughout.

    Tool Count2/5

    With only 3 tools, the set feels thin for a Jenkins integration, which typically involves more operations like viewing logs, managing job configurations, or canceling builds. This limited scope may hinder agent workflows that require broader control.

    Completeness2/5

    The toolset is severely incomplete for Jenkins automation. It lacks essential operations such as viewing build logs, updating job configurations, canceling builds, or managing nodes/plugins. This creates significant gaps that will likely cause agent failures in common use cases.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers