KosmoKrator

productivity

Jenkins MCP Integration for OpenAI Agents SDK

Connect Jenkins to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.

7 functions 6 read 1 write API token auth

Connect Jenkins to OpenAI Agents SDK

Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.

Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with --write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.

Jenkins MCP Config for OpenAI Agents SDK

Use headless JSON commands for CI-style execution and MCP for agent tool discovery.

{
  "mcpServers": {
    "kosmokrator-jenkins": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=jenkins",
        "--write=deny"
      ]
    }
  }
}

Run the Gateway Manually

kosmokrator mcp:serve --integration=jenkins --write=deny

Why Use KosmoKrator Here

Scoped tools

Expose only Jenkins instead of a broad multi-service tool list.

Local credentials

Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.

Write policy

Start read-only, then opt into ask or allow for trusted workspaces.

Jenkins Tools Visible to OpenAI Agents

OpenAI Agents sees stable MCP tool names generated from the Jenkins integration catalog.

MCP toolSource functionTypeDescription
integration__jenkins__jenkins_list_jobs jenkins.jenkins_list_jobs Read List all Jenkins jobs. Returns job names, URLs, colors (build status), and basic metadata.
integration__jenkins__jenkins_get_job jenkins.jenkins_get_job Read Get detailed information about a specific Jenkins job, including description, last build, health reports, and parameters.
integration__jenkins__jenkins_create_job jenkins.jenkins_create_job Write Create a new Jenkins job. Requires a job name and configuration.
integration__jenkins__jenkins_list_builds jenkins.jenkins_list_builds Read List builds for a specific Jenkins job, including build numbers, results, durations, and timestamps.
integration__jenkins__jenkins_get_build jenkins.jenkins_get_build Read Get detailed information about a specific Jenkins build, including result, duration, console output, artifacts, and change sets.
integration__jenkins__jenkins_list_nodes jenkins.jenkins_list_nodes Read List all Jenkins nodes (agents), including name, offline status, and executor count.
integration__jenkins__jenkins_get_current_user jenkins.jenkins_get_current_user Read Get the authenticated Jenkins user's profile information, including user ID, full name, and email.

Related Jenkins Pages