Skip to content

Support alternative package managers in MCP Inspector integration #1008

@krubenok

Description

@krubenok

Related to an existing integration?

Yes

Existing integration

McpInspector

Overview

Currently, the Aspire MCP Inspector integration defaults to using npx for Node.js tooling invocation. However, developers who prefer or require alternative package managers like pnpm or yarn (using their respective pnpm dlx or yarn dlx commands) are unable to leverage their tool of choice directly when working with this integration. The Node.js Aspire extension, as documented at https://aspire.dev/integrations/frameworks/nodejs-extensions/, already provides the ability to specify which package manager should be used, falling back to npx if none is supplied. Ensuring consistent extensibility between the MCP Inspector and the Node.js Aspire framework will improve usability and flexibility for projects leveraging different JS package managers.

Usage example

Add an option or configuration property to the MCP Inspector integration, such as PackageManager, allowing the user to select their preferred Node.js package manager. For instance:

  • If PackageManager is set to pnpm, run commands using pnpm dlx.
  • If set to yarn, use yarn dlx.
  • If not specified, default to using npx for compatibility with current behavior.

Example API usage:

{
.WithPnpm()
}

This would translate command invocations to use pnpm dlx under the hood when the MCP Inspector runs Node.js-based tools.

Breaking change?

No

Alternatives

Currently, the only approach is to use the default NPX-based invocation, or roll your own model context protocol inspector integration into Aspire.

Additional context

Reference for Node.js Aspire extension's implementation: https://aspire.dev/integrations/frameworks/nodejs-extensions/

Help us help you

Yes, I'd like to be assigned to work on this item

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions