-
Notifications
You must be signed in to change notification settings - Fork 154
Support alternative package managers in MCP Inspector integration #1009
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 all commits
cc1c17e
c03f3c7
3915676
811cf19
c582369
5ba462e
ee999b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -6,10 +6,16 @@ namespace Aspire.Hosting.ApplicationModel; | |||||
| /// Resource for the MCP Inspector server. | ||||||
| /// </summary> | ||||||
| /// <param name="name">The name of the resource.</param> | ||||||
| public class McpInspectorResource(string name) : JavaScriptAppResource(name, "npx", "") | ||||||
| /// <param name="packageName">The npm package name for the MCP Inspector.</param> | ||||||
| public class McpInspectorResource(string name, string packageName) : JavaScriptAppResource(name, "npx", "") | ||||||
|
||||||
| public class McpInspectorResource(string name, string packageName) : JavaScriptAppResource(name, "npx", "") | |
| public class McpInspectorResource(string name, string packageName = "@modelcontextprotocol/inspector@" + InspectorVersion) : JavaScriptAppResource(name, "npx", "") |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,6 @@ | ||||||||||
| using Aspire.Hosting; | ||||||||||
| using Aspire.Hosting.ApplicationModel; | ||||||||||
| using Aspire.Hosting.JavaScript; | ||||||||||
|
|
||||||||||
| namespace CommunityToolkit.Aspire.Hosting.McpInspector.Tests; | ||||||||||
|
|
||||||||||
|
|
@@ -491,4 +492,167 @@ public void WithMcpServerWithBothEndpointsUsesHttps() | |||||||||
| // Verify the endpoint is the https one (preferred when both exist) | ||||||||||
| Assert.Equal("https", serverMetadata.Endpoint.EndpointName); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| [Fact] | ||||||||||
| public void AddMcpInspectorDefaultsToNpx() | ||||||||||
| { | ||||||||||
| // Arrange | ||||||||||
| var appBuilder = DistributedApplication.CreateBuilder(); | ||||||||||
|
|
||||||||||
| // Act | ||||||||||
| var inspector = appBuilder.AddMcpInspector("inspector"); | ||||||||||
|
||||||||||
| var inspector = appBuilder.AddMcpInspector("inspector"); | |
| var inspector = appBuilder.AddMcpInspectorResource("inspector"); |
Copilot
AI
Dec 1, 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
Dec 1, 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
Dec 1, 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
Dec 1, 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
Dec 1, 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
Dec 1, 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
Dec 1, 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.
Copilot
AI
Dec 1, 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
Dec 1, 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.
Copilot
AI
Dec 1, 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
Dec 1, 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.
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.
Trailing comma after
falseshould be removed. JSON doesn't allow trailing commas in object properties.