Class McpServer

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.McpServer

public abstract class McpServer extends JsonSerializable
A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 5. This data type is not supported in Vertex AI.
  • Constructor Details

    • McpServer

      public McpServer()
  • Method Details

    • name

      public abstract Optional<String> name()
      The name of the MCPServer.
    • streamableHttpTransport

      public abstract Optional<StreamableHttpTransport> streamableHttpTransport()
      A transport that can stream HTTP requests and responses.
    • builder

      public static McpServer.Builder builder()
      Instantiates a builder for McpServer.
    • toBuilder

      public abstract McpServer.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static McpServer fromJson(String jsonString)
      Deserializes a JSON string to a McpServer object.