-
Notifications
You must be signed in to change notification settings - Fork 147
Fix MCP Inspector to support HTTPS endpoints #993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Co-authored-by: aaronpowell <[email protected]>
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -407,4 +407,88 @@ public void CombineHandlesMultipleSegmentsAndDoesNotEncodeSlashes() | |||||||||
| var expected = new Uri("http://localhost:1234/route/mcp/nested/path"); | ||||||||||
| Assert.Equal(expected, result); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| [Fact] | ||||||||||
| public void WithMcpServerSupportsHttpsEndpoint() | ||||||||||
| { | ||||||||||
| // Arrange | ||||||||||
| var appBuilder = DistributedApplication.CreateBuilder(); | ||||||||||
|
|
||||||||||
| // Create a mock MCP server resource with https endpoint (uses name "https") | ||||||||||
| var mockServer = appBuilder.AddProject<Projects.CommunityToolkit_Aspire_Hosting_McpInspector_McpServer>("mcpServer") | ||||||||||
| .WithHttpsEndpoint(name: "https"); | ||||||||||
|
|
||||||||||
| // Act | ||||||||||
| var inspector = appBuilder.AddMcpInspector("inspector") | ||||||||||
|
||||||||||
| var inspector = appBuilder.AddMcpInspector("inspector") | |
| var inspector = appBuilder.AddMcpInspectorResource("inspector") |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assignment to inspector is useless, since its value is never read.
| var inspector = appBuilder.AddMcpInspector("inspector") | |
| appBuilder.AddMcpInspector("inspector") |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call to obsolete method AddMcpInspector.
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assignment to inspector is useless, since its value is never read.
| var inspector = appBuilder.AddMcpInspector("inspector") | |
| appBuilder.AddMcpInspector("inspector") |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment states "AddProject creates both http and https endpoints by default", but this is inconsistent with the comment in the test above (line 450) which states "AddProject creates 'http' by default". This creates confusion about the actual behavior. Please verify the behavior and update comments consistently. Based on the code context, AddProject typically creates an HTTP endpoint by default, and HTTPS needs to be added explicitly with WithHttpsEndpoint().
| // AddProject creates both http and https endpoints by default | |
| // AddProject creates "http" endpoint by default |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call to obsolete method AddMcpInspector.
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assignment to inspector is useless, since its value is never read.
| var inspector = appBuilder.AddMcpInspector("inspector") | |
| appBuilder.AddMcpInspector("inspector") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This never returns null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if there's no registered HTTPS endpoint though?