Add MCP Servers to Claude Code on Windows with Git Bash

I’ve had some issues MCP servers to Claude Code on Windows via Git Bash.

For example the command to add Playwright MCP didn’t work.

claude mcp add playwright npx '@playwright/mcp@latest'

What did work was adding -- cmd /c before npx. At least for Playwright.

Playwright MCP

claude mcp add playwright -- cmd /c npx "@playwright/mcp@latest"

Context7 MCP

For Contex7, the above command didn’t work – I do not know why. But this did:

claude mcp add --transport http context7 https://mcp.context7.com/mcp

Notes:

  • cmd /c is required in Git Bash to run Windows commands properly.
  • claude mcp add context7 -- cmd /c npx @upstash/context7 did not work.

Leave a Reply

Your email address will not be published. Required fields are marked *