Server started through a shell command

Medium shell-wrapper

bash -c, sh -c, cmd /c or powershell -Command hide what actually runs inside a string: it is hard to review, and easy to change unnoticed.

Why it matters

Starting a server with bash -c "..." (or cmd /c, powershell -Command) hides the real command inside a string. Reviewers and tools see "bash", not what runs, and a small change to the string (an extra && curl ...) is easy to miss.

How to fix it

Call the program directly with "command" and "args", one argument per item.

Use "command" for the program and "args" for its arguments. If you need several steps, put them in a script in your repository, where changes are reviewed like code.

Before

"command": "bash", "args": ["-c", "cd ~/srv && npm start"]

After

"command": "node", "args": ["/Users/me/srv/index.js"]

Applies to every MCP client that reads a JSON config: Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and others.

Other checks

Published ; awaiting review.