Class McpServer.Builder

java.lang.Object
com.google.genai.types.McpServer.Builder
Enclosing class:
McpServer

public abstract static class McpServer.Builder extends Object
Builder for McpServer.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

      public abstract McpServer.Builder name(String name)
      Setter for name.

      name: The name of the MCPServer.

    • clearName

      @CanIgnoreReturnValue public McpServer.Builder clearName()
      Clears the value of name field.
    • streamableHttpTransport

      public abstract McpServer.Builder streamableHttpTransport(StreamableHttpTransport streamableHttpTransport)
      Setter for streamableHttpTransport.

      streamableHttpTransport: A transport that can stream HTTP requests and responses.

    • streamableHttpTransport

      @CanIgnoreReturnValue public McpServer.Builder streamableHttpTransport(StreamableHttpTransport.Builder streamableHttpTransportBuilder)
      Setter for streamableHttpTransport builder.

      streamableHttpTransport: A transport that can stream HTTP requests and responses.

    • clearStreamableHttpTransport

      @CanIgnoreReturnValue public McpServer.Builder clearStreamableHttpTransport()
      Clears the value of streamableHttpTransport field.
    • build

      public abstract McpServer build()