RemoteMcpToolsetConfig
Common configuration for a remote Streamable HTTP MCP toolset.
This is the portable MCP entry point for JVM and Android. Platform-specific transports and MCP SDKs are selected internally. JVM callers do not add an extra MCP SDK. On Android, ADK declares kotlin-sdk-client and ktor-client-okhttp as compileOnly, so the app must add those artifacts itself. JVM-only stdio and legacy SSE continue to use McpToolset.McpToolsetConfig.
A configured headerProvider is invoked before tool discovery and again before each tool call (matching ADK Python). An IllegalArgumentException from that provider or from a ToolFilter.Predicate during Toolset.getTools is wrapped in McpToolException.McpToolLoadingException.
val toolset =
RemoteMcpToolsetConfig(
transport = McpTransportConfig.StreamableHttp("https://example.com/mcp"),
)
.toToolset(headerProvider = { mapOf("Authorization" to "Bearer token") })Constructors
Types
Fluent builder for RemoteMcpToolsetConfig, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.
Properties
Functions
Returns a Builder initialized with this instance's properties, primarily for Java callers. Prefer it over copy from Java: copy takes every property positionally, so its signature changes whenever a property is added.
Creates an MCP Toolset.