Class DefaultMcpServer

java.lang.Object
io.jenkins.plugins.mcp.server.extensions.DefaultMcpServer
All Implemented Interfaces:
ExtensionPoint, McpServerExtension

@Extension public class DefaultMcpServer extends Object implements McpServerExtension
  • Field Details

  • Constructor Details

    • DefaultMcpServer

      public DefaultMcpServer()
  • Method Details

    • getBuild

      @Tool(description="Get a specific build or the last build of a Jenkins job") public Run getBuild(@ToolParam(description="Job full name of the Jenkins job (e.g., \'folder/job-name\')") String jobFullName, @Nullable @ToolParam(description="Build number (optional, if not provided, returns the last build)",required=false) Integer buildNumber)
    • getJob

      @Tool(description="Get a Jenkins job by its full path") public Job getJob(@ToolParam(description="Job full name of the Jenkins job (e.g., \'folder/job-name\')") String jobFullName)
    • triggerBuild

      @Tool(description="Trigger a build for a Jenkins job") public boolean triggerBuild(@ToolParam(description="Full path of the Jenkins job (e.g., \'folder/job-name\')") String jobFullName, @ToolParam(description="Build parameters (optional, e.g., {key1=value1,key2=value2})",required=false) Map<String,Object> parameters)
    • getJobs

      @Tool(description="Get a paginated list of Jenkins jobs, sorted by name. Returns up to \'limit\' jobs starting from the \'skip\' index. If no jobs are available in the requested range, returns an empty list.") public List<Job> getJobs(@ToolParam(description="The full path of the Jenkins folder (e.g., \'folder\'), if not specified, it returns the items under root",required=false) String parentFullName, @ToolParam(description="The 0 based started index, if not specified, then start from the first (0)",required=false) Integer skip, @ToolParam(description="The maximum number of items to return. If not specified, returns 10 items. Cannot exceed 10 items.",required=false) Integer limit)
    • updateBuild

      @Tool(description="Update build display name and/or description") public boolean updateBuild(@ToolParam(description="Full path of the Jenkins job (e.g., \'folder/job-name\')") String jobFullName, @Nullable @ToolParam(description="Build number (optional, if not provided, updates the last build)",required=false) Integer buildNumber, @Nullable @ToolParam(description="New display name for the build",required=false) String displayName, @Nullable @ToolParam(description="New description for the build",required=false) String description)
    • whoAmI

      @Tool(description="Get information about the currently authenticated user, including their full name or \'anonymous\' if not authenticated") public Map<String,String> whoAmI()
    • getStatus

      @Tool(description="Checks the health and readiness status of a Jenkins instance, including whether it\'s in quiet mode, has active administrative monitors, current queue size, and available executor capacity. This tool provides a comprehensive overview of the controller\'s operational state to determine if it\'s stable and ready to build. Use this tool to assess Jenkins instance health rather than simple up/down status.") public Map<String,Object> getStatus()