[BUG] Adding a local MCP server with additional arguments does not work in PowerShell (on Windows)

Resolved 💬 4 comments Opened Dec 22, 2025 by josmartin Closed Feb 28, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

I am using Claude Code version 2.0.69

> claude --version
2.0.69 (Claude Code)

I am trying to add MCP servers to my workflow. I will use one of your example to show the issue. A trivial example of an MCP server that needs extra arguments is

claude mcp add --transport stdio myserver -- python server.py --port 8080

On linux and on windows in a CMD terminal this works as expected with a response like

> claude mcp add --transport stdio myserver -- python server.py --port 8080
Added stdio MCP server myserver with command: python server.py --port 8080 to local config
File modified: C:\Users\*******\.claude.json [project: C:\Users\*******]

However, if you run exactly the same command in PowerShell (either the default, old, built-in windows one OR an up-to-date 7.5.4) it does not work

> claude mcp add --transport stdio myserver -- python server.py --port 8080
error: unknown option '--port'

What Should Happen?

claude should work correctly in either CMD or PowerShell - or it should indicate that it does NOT work in PowerShell.

Error Messages/Logs

In PowerShell you get the following error

> claude mcp add --transport stdio myserver -- python server.py --port 8080
error: unknown option '--port'

Steps to Reproduce

Open PowerShell on windows and ensure you have installed claude.

Execute

claude mcp add --transport stdio myserver -- python server.py --port 8080

See it fail ...

Do the same but now in CMD - see it succeed.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.69

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗