[FEATURE] Automatically detect when `cmd.exe /c` prefix is requried
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
We have created a command-line tool for our framework/tool which automatically detects Claude Code and configures the MCP server for it in the repository. Along with our own MCP server we also configure the Playwright MCP server because when used in conjunction with our MCP server it greatly smooths the agentic coding experience.
The problem is that the Playwright MCP server (like many MCP servers) are built on top of Node.js, and to run them you need to execute something like:
npx @playright/mcp@latest
The problem is that on Windows npx is actually a Windows shell script (npx.cmd) and does not launch. To make it launch you need to prepend cmd.exe /c ... making the actual command cmd.exe /c npx @playwright/mcp@latest.
In the case of repo-based MCP configs this makes them non-portable - even on a single developer machine (when the developer sometimes uses WSL).
Proposed Solution
I would like to see ClaudeCode automatically detect whether the target command is a shell script and automatically adjust the process launch so that configs can be portable.
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
MCP server integration
Use Case Example
This is required so that teams can create shared MCP server configurations in their repo but have it work across different operating systems.
Additional Context
Filed with ❤️ by the Aspire team, many of which are ClaudeCode fans.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗