Skip to content

Conversation

@krubenok
Copy link
Contributor

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

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

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.
Copilot AI review requested due to automatic review settings December 30, 2025 06:12
@krubenok
Copy link
Contributor Author

@dotnet-policy-service agree

Copy link
Contributor

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 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

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.
@github-actions github-actions bot added the Stale label Jan 9, 2026
@github-actions github-actions bot closed this Jan 11, 2026
@aaronpowell aaronpowell removed the Stale label Jan 12, 2026
@aaronpowell aaronpowell reopened this Jan 12, 2026
Copy link
Member

@aaronpowell aaronpowell left a 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.

@krubenok krubenok requested a review from aaronpowell January 12, 2026 03:21
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.

Support alternative package managers in MCP Inspector integration

2 participants