.mcp.json hardcodes the checkout path (breaks on any other machine) #2

Open
opened 2026-08-14 23:56:58 +02:00 by Grovy311 · 0 comments
Collaborator

.mcp.json (commit 09fbd6a, dev/jappel) registers the versapad MCP server with an absolute path:

"args": ["C:\\Users\\Julian\\Documents\\__CODE\\VersaGUI-py\\versapad_mcp_server.py"]

Works on this one machine's checkout, breaks for anyone else who clones the repo. Claude Code's .mcp.json doesn't reliably support workspace-relative variables across environments (noted in the commit message itself), but a couple of options that would make it portable:

  • Ship .mcp.json as .mcp.json.example and let each user fill in their own path (matches the existing "claude mcp add -s user" fallback documented in README)
  • Or resolve the path at the command/args level via a wrapper script that finds its own directory (e.g. a tiny .cmd/.sh next to versapad_mcp_server.py using %~dp0/$(dirname "$0")) instead of hardcoding it in .mcp.json itself

Happy to send a PR for whichever direction you'd prefer.

`.mcp.json` (commit 09fbd6a, dev/jappel) registers the versapad MCP server with an absolute path: "args": ["C:\\Users\\Julian\\Documents\\__CODE\\VersaGUI-py\\versapad_mcp_server.py"] Works on this one machine's checkout, breaks for anyone else who clones the repo. Claude Code's `.mcp.json` doesn't reliably support workspace-relative variables across environments (noted in the commit message itself), but a couple of options that would make it portable: - Ship `.mcp.json` as `.mcp.json.example` and let each user fill in their own path (matches the existing "claude mcp add -s user" fallback documented in README) - Or resolve the path at the `command`/`args` level via a wrapper script that finds its own directory (e.g. a tiny `.cmd`/`.sh` next to `versapad_mcp_server.py` using `%~dp0`/`$(dirname "$0")`) instead of hardcoding it in `.mcp.json` itself Happy to send a PR for whichever direction you'd prefer.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: jappel/VersaGUI-py#2
No description provided.