Skip to content

Conversation

yrobla
Copy link
Contributor

@yrobla yrobla commented Sep 19, 2025

when we run a server via stdio, we wrap it into a proxy, exposing via sse or streamable-http. So show this as the server type, instead of the stdio type

Closes: #1717

@yrobla yrobla requested a review from Copilot September 19, 2025 11:34
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modifies the server type display logic to show the effective transport type (proxy mode) instead of the underlying transport type when listing MCP servers that use stdio with a proxy. This provides more accurate information to users about what they're actually connecting to.

  • Adds logic to determine effective transport type based on proxy mode for stdio servers
  • Updates the display to show proxy mode (sse or streamable-http) instead of stdio when applicable
  • Adds comprehensive test coverage for the new transport type resolution logic

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
cmd/thv/app/list.go Implements getEffectiveTransportType function and updates server listing to use effective transport type
cmd/thv/app/list_test.go Adds comprehensive unit tests for the new transport type resolution logic

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

codecov bot commented Sep 19, 2025

Codecov Report

❌ Patch coverage is 21.05263% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.35%. Comparing base (8f1a7e9) to head (d240086).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/workloads/manager.go 0.00% 15 Missing ⚠️
pkg/workloads/types/types.go 34.78% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1975      +/-   ##
==========================================
+ Coverage   47.11%   47.35%   +0.23%     
==========================================
  Files         231      233       +2     
  Lines       28378    28665     +287     
==========================================
+ Hits        13369    13573     +204     
- Misses      14011    14076      +65     
- Partials      998     1016      +18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

when we run a server via stdio, we wrap it into a proxy,
exposing via sse or streamable-http. So show this as the
server type, instead of the stdio type

Closes: #1717
JAORMX
JAORMX previously approved these changes Sep 19, 2025
Copy link
Member

@dmjb dmjb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably should do this in the workload manager so that the behaviour is consistent across UI and API.

@yrobla
Copy link
Contributor Author

yrobla commented Sep 19, 2025

We probably should do this in the workload manager so that the behaviour is consistent across UI and API.

ok fixed

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@yrobla yrobla force-pushed the issue-1717 branch 3 times, most recently from 430f37e to fb87216 Compare September 19, 2025 14:12
Comment on lines +128 to +134
// For direct transports (sse, streamable-http), return the transport type as proxy mode
if transportType == types.TransportTypeSSE || transportType == types.TransportTypeStreamableHTTP {
return transportType.String()
}

// For stdio without proxy mode or other cases, return original proxy mode (could be empty)
return proxyMode
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop lines 128-131 and just return transportType.String()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong transport when listing MCP servers with JSON/mcpservers format
4 participants