Skip to content

Commit 05b00e5

Browse files
authored
vMCP: Use proxy-mode instead of transport (#2413)
I got hit by this again... We should be using proxy mode when determining the transport to use for an MCP, and not the MCPs underlying transport which is not useful for this scenario. Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
1 parent 4ef4a16 commit 05b00e5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pkg/vmcp/aggregator/cli_discoverer.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,20 @@ func (d *cliBackendDiscoverer) Discover(ctx context.Context, groupRef string) ([
7474
healthStatus := mapWorkloadStatusToHealth(workload.Status)
7575

7676
// Convert core.Workload to vmcp.Backend
77+
// Use ProxyMode instead of TransportType to reflect how ToolHive is exposing the workload.
78+
// For stdio MCP servers, ToolHive proxies them via SSE or streamable-http.
79+
// ProxyMode tells us which transport the vmcp client should use.
80+
transportType := workload.ProxyMode
81+
if transportType == "" {
82+
// Fallback to TransportType if ProxyMode is not set (for direct transports)
83+
transportType = workload.TransportType.String()
84+
}
85+
7786
backend := vmcp.Backend{
7887
ID: name,
7988
Name: name,
8089
BaseURL: workload.URL,
81-
TransportType: workload.TransportType.String(),
90+
TransportType: transportType,
8291
HealthStatus: healthStatus,
8392
Metadata: make(map[string]string),
8493
}

0 commit comments

Comments
 (0)