Class McpToolsetBridge

java.lang.Object
com.xebialabs.xlrelease.mcp.config.McpToolsetBridge

@Component public class McpToolsetBridge extends Object
Bridges McpToolset extensions - whichever plugin contributed them, and however it authored the contribution (a Spring plugin context bean or a Declarative Services component) - out into the running McpSyncServer, live and without restart, by subscribing to PluginExtensionRegistryImpl's add/remove events. Adding/removing a tool on the server already pushes tools/list_changed (listChanged capability), so this class does not notify explicitly.

Keyed by extension instance identity, not by any feeder-specific id: the registry's notifications carry the HostExtensionPoint bean itself, never a feeder-internal reference, since a Spring-plugin-context contribution never had one. Releasing whatever tracking state a service-backed extension needed released is the concern of whichever registry feeder tracked it (PluginExtensionServiceTracker), not of this class.

  • Constructor Details

    • McpToolsetBridge

      public McpToolsetBridge(io.modelcontextprotocol.server.McpSyncServer mcpSyncServer, McpToolSpecifications toolSpecifications, McpReadOnlyToolReconciler readOnlyToolReconciler, com.xebialabs.xlrelease.osgi.spring.PluginExtensionRegistryImpl extensionRegistry)