Package com.google.genkit.plugins.mcp
Class MCPServerConfig.Builder
java.lang.Object
com.google.genkit.plugins.mcp.MCPServerConfig.Builder
- Enclosing class:
MCPServerConfig
Builder for MCPServerConfig.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the command arguments.Sets the command arguments.build()Builds the MCPServerConfig.Sets the command for STDIO transport.disabled(boolean disabled) Sets whether this server is disabled.Adds an environment variable.Sets all environment variables.transportType(MCPServerConfig.TransportType transportType) Sets the transport type.Sets the URL for HTTP transport.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
transportType
Sets the transport type.- Parameters:
transportType- the transport type- Returns:
- this builder
-
command
Sets the command for STDIO transport.- Parameters:
command- the command to execute- Returns:
- this builder
-
args
Sets the command arguments.- Parameters:
args- the arguments- Returns:
- this builder
-
args
Sets the command arguments.- Parameters:
args- the arguments- Returns:
- this builder
-
env
Adds an environment variable.- Parameters:
key- the variable namevalue- the variable value- Returns:
- this builder
-
env
Sets all environment variables.- Parameters:
env- the environment variables- Returns:
- this builder
-
url
Sets the URL for HTTP transport.- Parameters:
url- the server URL- Returns:
- this builder
-
disabled
Sets whether this server is disabled.- Parameters:
disabled- true to disable- Returns:
- this builder
-
build
Builds the MCPServerConfig.- Returns:
- the built configuration
-