Description:
The rpg-mcp-server currently receives its project root as a CLI argument. When MCP clients (like Antigravity or opencode) pass ${workspaceFolder} without expanding it, the server receives the literal string and fails to find any source files.
This PR adds a resolve_project_root function that:
- Detects
${workspaceFolder} in the CLI argument
- Resolves it to
std::env::current_dir() (the MCP client launches the server in the workspace directory)
- Handles partial patterns like
${workspaceFolder}/subdir
- Logs the resolution to stderr so users know what happened
This allows the rpg-mcp-server to be configured in global MCP configs rather than requiring per-project local configs with hardcoded paths.
Description:
The rpg-mcp-server currently receives its project root as a CLI argument. When MCP clients (like Antigravity or opencode) pass
${workspaceFolder}without expanding it, the server receives the literal string and fails to find any source files.This PR adds a
resolve_project_rootfunction that:${workspaceFolder}in the CLI argumentstd::env::current_dir()(the MCP client launches the server in the workspace directory)${workspaceFolder}/subdirThis allows the rpg-mcp-server to be configured in global MCP configs rather than requiring per-project local configs with hardcoded paths.