Summary
#5729 migrates ToolHive from mark3labs/mcp-go to the go-sdk-backed mcpcompat shim (toolhive-core v0.0.27). An audit found functional regressions in the shim — tracked with fixes in stacklok/toolhive-core#156. To guarantee the migration lands with zero functional loss, ToolHive needs regression tests that pin the current (mcp-go) behavior: they should fail against shim v0.0.27 and pass once #5729 bumps to the fixed toolhive-core release.
These tests are the acceptance gate for toolhive-core#156 and merge-blocking evidence for #5729.
Test matrix
1. stdio bridge notification forwarding (end-to-end)
Backend emits → client of the bridge receives, over pkg/transport/bridge.go:
Currently ALL of these are dropped end-to-end under the shim (client half never registers progress/logging handlers; server half cannot send list_changed).
2. vMCP session lifecycle
3. Per-session tool projection (security-relevant)
Runtime validation that the shim's per-session go-sdk Server + live tool reconciliation preserves vMCP behavior:
4. SSE keep-alive
5. Pagination behavior
6. Local proxy Host-header behavior
7. Remote auth error mapping
Notes
Generated with Claude Code
Summary
#5729 migrates ToolHive from
mark3labs/mcp-goto the go-sdk-backedmcpcompatshim (toolhive-core v0.0.27). An audit found functional regressions in the shim — tracked with fixes in stacklok/toolhive-core#156. To guarantee the migration lands with zero functional loss, ToolHive needs regression tests that pin the current (mcp-go) behavior: they should fail against shim v0.0.27 and pass once #5729 bumps to the fixed toolhive-core release.These tests are the acceptance gate for toolhive-core#156 and merge-blocking evidence for #5729.
Test matrix
1. stdio bridge notification forwarding (end-to-end)
Backend emits → client of the bridge receives, over
pkg/transport/bridge.go:notifications/progress(withprogressTokencorrelation)notifications/message(logging)notifications/tools/list_changed— and a subsequenttools/listthrough the bridge reflects the changed tool setnotifications/resources/list_changed,notifications/prompts/list_changedCurrently ALL of these are dropped end-to-end under the shim (client half never registers progress/logging handlers; server half cannot send list_changed).
2. vMCP session lifecycle
Terminatevia shared Redis storage), then verify the origin pod rejects the next request on thatMcp-Session-Id(today the shim skipsValidatefor local sessions).3. Per-session tool projection (security-relevant)
Runtime validation that the shim's per-session go-sdk
Server+ live tool reconciliation preserves vMCP behavior:tools/listresults.tools/callwhile remaining callable in session B.SetSessionToolsreconciliation mid-session is reflected in the nexttools/list.4. SSE keep-alive
text/event-streamresponse from the vMCP server carries periodic keep-alive bytes (SSE comments or pings) at the configuredWithHeartbeatIntervalcadence (currently a silent no-op under the shim).5. Pagination behavior
6. Local proxy Host-header behavior
Hostheader behaves as before the migration (go-sdk's DNS-rebinding protection defaults on and returns 403; decide and pin the intended behavior).7. Remote auth error mapping
ErrUnauthorized/ErrAuthorizationRequiredsentinels consumed bypkg/vmcp/clientauth discovery.Notes
t.Context()in unit tests).Generated with Claude Code