Class McpStreamableHttpToolProviderFactory

java.lang.Object
com.agentforge4j.mcp.integration.McpStreamableHttpToolProviderFactory
All Implemented Interfaces:
com.agentforge4j.core.spi.integration.IntegrationToolProviderFactory

public final class McpStreamableHttpToolProviderFactory extends Object implements com.agentforge4j.core.spi.integration.IntegrationToolProviderFactory
Realises IntegrationType.MCP_STREAMABLE_HTTP integrations: connects to a remote MCP server over Streamable HTTP. The config payload carries a required url plus optional requestTimeout (ISO-8601 duration; defaults to McpIntegrations.DEFAULT_REQUEST_TIMEOUT when omitted), staticHeaders (literal header name to value pairs) and secretHeaders (header name to secret-reference key, resolved via ToolProviderFactoryContext.secretResolver() at connect time) — mirroring the HTTP_TOOL integration's own header model. The resulting provider id is "mcp:" + definition.id().

Discovered via ServiceLoader; the connection is not started here — the provider connects lazily on first use.

  • Constructor Details

    • McpStreamableHttpToolProviderFactory

      public McpStreamableHttpToolProviderFactory()
  • Method Details

    • supportedType

      public com.agentforge4j.core.spi.integration.IntegrationType supportedType()
      Specified by:
      supportedType in interface com.agentforge4j.core.spi.integration.IntegrationToolProviderFactory
    • create

      public com.agentforge4j.core.spi.tool.ToolProvider create(com.agentforge4j.core.spi.integration.IntegrationDefinition definition, com.agentforge4j.core.spi.integration.ToolProviderFactoryContext context)
      Specified by:
      create in interface com.agentforge4j.core.spi.integration.IntegrationToolProviderFactory