[FEATURE] Support cross-platform MCP configuration in plugins
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
When developing Claude Code plugins that include MCP server configurations, there's no way to create a single .mcp.json that works across both Windows and Linux/macOS.
Windows requires:
{
"command": "cmd",
"args": ["/c", "npx", "-y", "@some/package", "server", "start"]
}
Linux/macOS requires:
{
"command": "npx",
"args": ["-y", "@some/package", "server", "start"]
}
This is because Windows npm executables (like npx) are actually .cmd batch files, and Node.js spawn() without a shell doesn't resolve .cmd extensions. Using cmd /c invokes the shell which properly resolves the command.
Currently, plugin developers must either pick one platform as default and document manual changes for others, or maintain separate installation instructions per platform. This creates friction for users and limits plugin portability.
Proposed Solution
Auto-transform MCP commands during plugin installation:
When installing a plugin, Claude Code could detect the current platform (process.platform) and automatically transform MCP configurations:
| Current Platform | Original Command | Transform To |
|------------------|------------------|----------------|
| win32 | npx ... | cmd /c npx ... |
| linux / darwin | cmd /c npx ... | npx ... |
This would be transparent to both users and plugin developers - write once, run anywhere.
Alternative: Support a shell option in MCP configuration:
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["-y", "@some/package"],
"shell": true
}
}
}
When shell: true, use spawn(command, args, { shell: true }) which handles platform differences automatically.
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗