Context
While writing regression tests for the mcp-go → go-sdk migration (#5742), two shim limitations were discovered in github.com/stacklok/toolhive-core/mcpcompat v0.0.27:
Finding 1: Client shim drops progress and logging notifications
The mcpcompat client shim's installNotificationHandlers (client.go:417-429) only wires the three *_list_changed handlers. It does NOT install ProgressNotificationHandler or LoggingMessageHandler (both exist in go-sdk v1.6.1 ClientOptions).
Impact: notifications/progress and notifications/message from an upstream backend are silently dropped at the shim boundary. The ToolHive stdio bridge's OnNotification handler never sees them, so they can never be forwarded to stdio clients.
This is tracked as finding 1a in stacklok/toolhive-core#156.
Finding 2: SendNotificationToAllClients drops list_changed notifications
The shim's SendNotificationToAllClients (notifications.go:32-76) only forwards notifications/progress and notifications/message. All other methods (including notifications/tools/list_changed, notifications/resources/list_changed, notifications/prompts/list_changed) hit the default branch and are dropped.
Impact: Even though the bridge's OnNotification handler re-runs forwardAll on *_list_changed (the fix in #5742), the notification itself is never forwarded to the stdio client. The client doesn't know to re-issue tools/list — it only sees the updated set when it happens to list again.
This is tracked as finding 1b in stacklok/toolhive-core#156.
Regression test coverage
TestBridge_ToolsListChanged_TriggersReSync in pkg/transport/bridge_test.go — verifies the forwardAll re-sync works (the bridge's local server picks up the new tools)
TestBridge_ProgressAndLoggingNotifications_DroppedByShim — skipped test documenting both findings as regression anchors
Acceptance criteria
When the shim is fixed (toolhive-core#156 items 1a and 1b):
- The skipped test should be un-skipped and pass
- Progress and logging notifications should be forwarded end-to-end through the bridge
*_list_changed notifications should be forwarded to stdio clients
Context
While writing regression tests for the mcp-go → go-sdk migration (#5742), two shim limitations were discovered in
github.com/stacklok/toolhive-core/mcpcompatv0.0.27:Finding 1: Client shim drops progress and logging notifications
The mcpcompat client shim's
installNotificationHandlers(client.go:417-429) only wires the three*_list_changedhandlers. It does NOT installProgressNotificationHandlerorLoggingMessageHandler(both exist in go-sdk v1.6.1ClientOptions).Impact:
notifications/progressandnotifications/messagefrom an upstream backend are silently dropped at the shim boundary. The ToolHive stdio bridge'sOnNotificationhandler never sees them, so they can never be forwarded to stdio clients.This is tracked as finding 1a in stacklok/toolhive-core#156.
Finding 2: SendNotificationToAllClients drops list_changed notifications
The shim's
SendNotificationToAllClients(notifications.go:32-76) only forwardsnotifications/progressandnotifications/message. All other methods (includingnotifications/tools/list_changed,notifications/resources/list_changed,notifications/prompts/list_changed) hit thedefaultbranch and are dropped.Impact: Even though the bridge's
OnNotificationhandler re-runsforwardAllon*_list_changed(the fix in #5742), the notification itself is never forwarded to the stdio client. The client doesn't know to re-issuetools/list— it only sees the updated set when it happens to list again.This is tracked as finding 1b in stacklok/toolhive-core#156.
Regression test coverage
TestBridge_ToolsListChanged_TriggersReSyncinpkg/transport/bridge_test.go— verifies theforwardAllre-sync works (the bridge's local server picks up the new tools)TestBridge_ProgressAndLoggingNotifications_DroppedByShim— skipped test documenting both findings as regression anchorsAcceptance criteria
When the shim is fixed (toolhive-core#156 items 1a and 1b):
*_list_changednotifications should be forwarded to stdio clients