KernelServerHostFactory typedef
KernelServerHostFactory =
KernelServerHost Function({bool debugMode, required String name, required String version, Set<ToolScope> visibility})
Factory the host supplies to create one KernelServerHost per
endpoint. The reference impl McpServerKernelHost.factory
(package:brain_kernel/mcp_host.dart) wraps mcp.Server + stdio /
Streamable HTTP / SSE transports. Hosts that never expose a network
surface leave KernelApp.boot's serverHostFactory null — the
kernel falls back to InProcessKernelServerHost for in-process
dispatch.
Implementation
typedef KernelServerHostFactory = KernelServerHost Function({
required String name,
required String version,
Set<ToolScope> visibility,
bool debugMode,
});