[BUG] "Error: unknown option '-y'" when adding mcp with npx in native windows installation
Resolved 💬 3 comments Opened Jul 17, 2025 by BeeegZee Closed Jul 18, 2025
Environment
- Platform (select one):
- [ x ] Anthropic API
- Claude CLI version: 1.0.53 (Claude Code)
- Operating System: Windows 10 Pro 22H2
- Terminal: PowerShell
Bug Description
Trying to add mcp servers that work through npx locally, for exampleclaude mcp add context7 -- npx -y @upstash/context7-mcp
Result: error: unknown option '-y received, no server added
Tried reinstalling CC, rebooting terminal and PC, nothing works
Not sure if it's the problem in Claude Code or somewhere else
Steps to Reproduce
- CC installed natively on Windows
- run
claude mcp add context7 -- npx -y @upstash/context7-mcpin PowerShell
Expected Behavior
MCP server added successfully
Actual Behavior
error: unknown option '-y received, no server added
Additional Context
It seems HTTP and SSE transport work fine
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗