Bug
thv inspector generates an incorrect MCP Inspector URL for servers that use stdio transport but are proxied as streamable-http. The URL uses transport=sse with a /sse path instead of transport=streamable-http with /mcp.
Steps to reproduce
- Run a server that uses stdio transport with streamable-http proxy mode (e.g.,
thv run github)
- Run
thv inspector github
- Observe the generated URL
Expected
http://localhost:6274?transport=streamable-http&serverUrl=http://host.docker.internal:56677/mcp&MCP_PROXY_AUTH_TOKEN=...
Actual
http://localhost:6274?transport=sse&serverUrl=http://host.docker.internal:56677/sse&MCP_PROXY_AUTH_TOKEN=...
Opening the inspector requires manually changing the protocol from SSE to HTTP and fixing the URL path from /sse to /mcp.
Root cause
getServerPortAndTransport in cmd/thv/app/inspector.go reads c.TransportType (the server's native transport, e.g. stdio) instead of c.ProxyMode (how the proxy actually exposes the server, e.g. streamable-http).
Then the URL-building logic at line 176 treats stdio the same as sse:
if transportType == types.TransportTypeSSE || transportType == types.TransportTypeStdio {
suffix = sseSuffix // "sse"
transportTypeStr = sseSuffix // "sse"
}
The fix should use ProxyMode (or the effective proxy mode) to determine the inspector URL transport and path, similar to how pkg/workloads/manager.go:204-209 already uses ProxyMode instead of TransportType for client-facing transport decisions.
Bug
thv inspectorgenerates an incorrect MCP Inspector URL for servers that usestdiotransport but are proxied asstreamable-http. The URL usestransport=ssewith a/ssepath instead oftransport=streamable-httpwith/mcp.Steps to reproduce
thv run github)thv inspector githubExpected
Actual
Opening the inspector requires manually changing the protocol from SSE to HTTP and fixing the URL path from
/sseto/mcp.Root cause
getServerPortAndTransportincmd/thv/app/inspector.goreadsc.TransportType(the server's native transport, e.g.stdio) instead ofc.ProxyMode(how the proxy actually exposes the server, e.g.streamable-http).Then the URL-building logic at line 176 treats
stdiothe same assse:The fix should use
ProxyMode(or the effective proxy mode) to determine the inspector URL transport and path, similar to howpkg/workloads/manager.go:204-209already usesProxyModeinstead ofTransportTypefor client-facing transport decisions.