-
Notifications
You must be signed in to change notification settings - Fork 154
Add Bun support for MCP Inspector resource builder #1079
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
Add Bun support for MCP Inspector resource builder #1079
Conversation
Introduces the WithBun extension method to allow configuring the MCP Inspector to use Bun (bunx) as the package manager. Updates argument handling logic, documentation, API surface, and adds corresponding unit tests to ensure correct command and argument setup for Bun.
|
@dotnet-policy-service agree |
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.
Pull request overview
This PR adds support for Bun as a package manager option for the MCP Inspector resource, complementing the existing npm, yarn, and pnpm support. The change introduces a WithBun() extension method that configures the inspector to use bunx for running the MCP Inspector package.
Key Changes
- Adds
WithBun()extension method to configure Bun/bunx as the package manager - Updates argument handling logic to support bunx command pattern (no additional flags needed beyond package name)
- Extends documentation with Bun usage examples
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/CommunityToolkit.Aspire.Hosting.McpInspector/McpInspectorResourceBuilderExtensions.cs | Implements WithBun() method and adds bunx case to argument handling logic |
| src/CommunityToolkit.Aspire.Hosting.McpInspector/README.md | Updates documentation to include Bun in supported package managers with usage example |
| src/CommunityToolkit.Aspire.Hosting.McpInspector/api/CommunityToolkit.Aspire.Hosting.McpInspector.cs | Adds new public API surface for WithBun, WithYarn, and WithPnpm methods |
| tests/CommunityToolkit.Aspire.Hosting.McpInspector.Tests/McpInspectorResourceBuilderExtensionsTests.cs | Adds comprehensive tests for WithBun functionality and refactors existing assertions for consistency |
...unityToolkit.Aspire.Hosting.McpInspector/api/CommunityToolkit.Aspire.Hosting.McpInspector.cs
Outdated
Show resolved
Hide resolved
...unityToolkit.Aspire.Hosting.McpInspector.Tests/McpInspectorResourceBuilderExtensionsTests.cs
Outdated
Show resolved
Hide resolved
...unityToolkit.Aspire.Hosting.McpInspector.Tests/McpInspectorResourceBuilderExtensionsTests.cs
Show resolved
Hide resolved
...unityToolkit.Aspire.Hosting.McpInspector.Tests/McpInspectorResourceBuilderExtensionsTests.cs
Outdated
Show resolved
Hide resolved
...unityToolkit.Aspire.Hosting.McpInspector.Tests/McpInspectorResourceBuilderExtensionsTests.cs
Outdated
Show resolved
Hide resolved
...unityToolkit.Aspire.Hosting.McpInspector.Tests/McpInspectorResourceBuilderExtensionsTests.cs
Show resolved
Hide resolved
Changed McpInspectorResource constructor to accept a packageName parameter. Refactored test cases to use the new constructor signature and introduced a helper method GetArgsAsync to streamline argument extraction and assertions.
Eliminated the .WithNpm() method call from the AddMcpInspector extension method, simplifying the resource builder configuration.
aaronpowell
left a comment
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.
just need to revert some changes to a generated file.
Closes #1008 (follow on)
Introduces the WithBun extension method to allow configuring the MCP Inspector to use Bun (bunx) as the package manager. Updates argument handling logic, documentation, API surface, and adds corresponding unit tests to ensure correct command and argument setup for Bun. Effectively a +1 to the existing pnpm and yarn extensions.
PR Checklist
Other information