Interface McpServer

All Superinterfaces:
BaseResource

public interface McpServer extends BaseResource

Represents an MCP Server configuration that exposes a set of tools to AI agents via the Model Context Protocol.


Example to create an instance using the builder pattern

     McpServer mcpServer = McpServer.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .key("{key}")
             .authenticationMode(McpServerAuthenticationMode.CLIENT_CREDENTIALS)
             .state(McpServerState.ENABLED)
             .mcpServer(mcpServerBuilder -> mcpServerBuilder)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the MCP Server.

      Specified by:
      getId in interface BaseResource
      Returns:
      id
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the MCP Server.

      Specified by:
      getVersion in interface BaseResource
      Returns:
      version
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the MCP Server was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Returns:
      createdAt
    • getLastModifiedAt

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the MCP Server was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      @Valid @Valid LastModifiedBy getLastModifiedBy()

      IDs and references that last modified the MCP Server.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Valid @Valid CreatedBy getCreatedBy()

      IDs and references that created the MCP Server.

      Returns:
      createdBy
    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier of the MCP Server within a Project.

      Returns:
      key
    • getName

      @Valid @Valid LocalizedString getName()

      Name of the MCP Server.

      Returns:
      name
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Description of the MCP Server.

      Returns:
      description
    • getAuthenticationMode

      @NotNull @NotNull McpServerAuthenticationMode getAuthenticationMode()

      Determines how AI agents authenticate when connecting to the MCP Server.

      Returns:
      authenticationMode
    • getState

      @NotNull @NotNull McpServerState getState()

      State of the MCP Server. A Disabled MCP Server rejects all AI agent tool requests.

      Returns:
      state
    • getMcpServer

      @NotNull @Valid @NotNull @Valid McpServerConfig getMcpServer()

      Configuration of the MCP Server connection.

      Returns:
      mcpServer
    • setId

      void setId(String id)

      Unique identifier of the MCP Server.

      Specified by:
      setId in interface BaseResource
      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the MCP Server.

      Specified by:
      setVersion in interface BaseResource
      Parameters:
      version - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the MCP Server was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

      Date and time (UTC) the MCP Server was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      void setLastModifiedBy(LastModifiedBy lastModifiedBy)

      IDs and references that last modified the MCP Server.

      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      void setCreatedBy(CreatedBy createdBy)

      IDs and references that created the MCP Server.

      Parameters:
      createdBy - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of the MCP Server within a Project.

      Parameters:
      key - value to be set
    • setName

      void setName(LocalizedString name)

      Name of the MCP Server.

      Parameters:
      name - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Description of the MCP Server.

      Parameters:
      description - value to be set
    • setAuthenticationMode

      void setAuthenticationMode(McpServerAuthenticationMode authenticationMode)

      Determines how AI agents authenticate when connecting to the MCP Server.

      Parameters:
      authenticationMode - value to be set
    • setState

      void setState(McpServerState state)

      State of the MCP Server. A Disabled MCP Server rejects all AI agent tool requests.

      Parameters:
      state - value to be set
    • setMcpServer

      void setMcpServer(McpServerConfig mcpServer)

      Configuration of the MCP Server connection.

      Parameters:
      mcpServer - value to be set
    • of

      static McpServer of()
      factory method
      Returns:
      instance of McpServer
    • of

      static McpServer of(McpServer template)
      factory method to create a shallow copy McpServer
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

      McpServer copyDeep()
      Specified by:
      copyDeep in interface BaseResource
    • deepCopy

      @Nullable static McpServer deepCopy(@Nullable McpServer template)
      factory method to create a deep copy of McpServer
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static McpServerBuilder builder()
      builder factory method for McpServer
      Returns:
      builder
    • builder

      static McpServerBuilder builder(McpServer template)
      create builder for McpServer instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withMcpServer

      default <T> T withMcpServer(Function<McpServer,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static tools.jackson.core.type.TypeReference<McpServer> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference