refactor(paths): use relative paths in configs and launch scripts
- Update README.md to reflect relative path usage. - Change MCP server commands in claude_desktop_config.json to relative paths. - Modify launch scripts to use `cd "$(dirname "$0")"` and relative paths, removing OS-specific absolute prefixes.
This commit is contained in:
parent
b8aa12c37c
commit
2de32fe1e6
@ -54,7 +54,7 @@ The root `.mcp.json` registers all MCP servers for clients that support it (e.g.
|
||||
- **For Grok CLI Agent mode**: Many MCPs are available as pre-registered tools (prefixed `mcp_dicom-mcp__*`, `mcp_filesystem-mcp__*`, `mcp_playwright-mcp__*`, `mcp_selenium-mcp__*`, `mcp_us-weather-mcp__*`, etc.). The servers are now located at `~/Projects/local/mcp_servers/`. Use the `mcp_*` tools directly via function calls, or leverage `task` (for sub-agents like `general`, `explore`, `verify`, `computer`), `delegate`, and built-in tools like `computer_*` for desktop interaction. No extra registration needed in most cases.
|
||||
- **General**: See individual MCP READMEs for Poetry setup, launch commands (stdio vs HTTP), and platform-specific config examples. Most support the official MCP spec (https://modelcontextprotocol.info/docs/).
|
||||
|
||||
**Note on paths**: The `config/claude_desktop_config.json` has hardcoded absolute paths from a previous location (`/Users/.../pd/claude-tools`). Update these to match your current directory (`/Users/gregory.gauthier/Projects/local/llm-tools`) or generalize with environment variables/`~`.
|
||||
**Note on paths**: All path references in configs and launch scripts are now relative to the repository root (`$PWD`).
|
||||
|
||||
### Skills
|
||||
|
||||
|
||||
@ -1,24 +1,24 @@
|
||||
{
|
||||
"mcpServers": {
|
||||
"dicom-mcp": {
|
||||
"command": "/Users/gregory.gauthier/Projects/local/mcp_servers/dicom_mcp/run_dicom_mcp_server.sh"
|
||||
"command": "./mcps/dicom_mcp/run_dicom_mcp_server.sh"
|
||||
},
|
||||
"filesystem": {
|
||||
"command": "zsh",
|
||||
"args": ["/Users/gregory.gauthier/Projects/local/mcp_servers/filesystem_mcp/launch_filesystem_mcp.sh"],
|
||||
"args": ["./mcps/filesystem_mcp/launch_filesystem_mcp.sh"],
|
||||
"env": {
|
||||
"MCP_LOG_LEVEL": "debug",
|
||||
"MCP_TRANSPORT_TYPE": "stdio"
|
||||
}
|
||||
},
|
||||
"open-meteo-mcp": {
|
||||
"command": "/Users/gregory.gauthier/Projects/local/mcp_servers/open_meteo_mcp/run_open_meteo_mcp_server.sh"
|
||||
"command": "./mcps/open_meteo_mcp/run_open_meteo_mcp_server.sh"
|
||||
},
|
||||
"playwright-mcp": {
|
||||
"command": "/Users/gregory.gauthier/Projects/local/mcp_servers/playwright_mcp/launch_playwright_mcp.sh"
|
||||
"command": "./mcps/playwright_mcp/launch_playwright_mcp.sh"
|
||||
},
|
||||
"selenium-mcp": {
|
||||
"command": "/Users/gregory.gauthier/Projects/local/mcp_servers/selenium_mcp/launch_selenium_mcp_server.sh"
|
||||
"command": "./mcps/selenium_mcp/launch_selenium_mcp_server.sh"
|
||||
}
|
||||
},
|
||||
"preferences": {
|
||||
|
||||
@ -1,15 +1,5 @@
|
||||
#!/usr/bin/env zsh
|
||||
#
|
||||
if [[ "$(uname)" == "Linux" ]]; then
|
||||
PATH_PREFIX="/data/Projects"
|
||||
elif [[ "$(uname)" == "Darwin" ]]; then
|
||||
PATH_PREFIX="/Users/gregory.gauthier/Projects"
|
||||
else
|
||||
# Always fallback to the linux default
|
||||
PATH_PREFIX="/data/Projects"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2164
|
||||
cd "${PATH_PREFIX}/local/mcp_servers/dicom_mcp"
|
||||
cd "$(dirname "$0")"
|
||||
poetry run python ./dicom_mcp
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ if command -v node >/dev/null 2>&1; then
|
||||
|
||||
MCP_LOG_LEVEL=debug \
|
||||
MCP_TRANSPORT_TYPE=stdio \
|
||||
node "~/Projects/local/mcp_servers/filesystem_mcp/dist/index.js" \
|
||||
node "./dist/index.js" \
|
||||
2> filesystem_mcp.log
|
||||
else
|
||||
echo "Error: Node.js not found!" >&2
|
||||
|
||||
@ -1,14 +1,4 @@
|
||||
#!/usr/bin/env zsh
|
||||
#
|
||||
if [[ "$(uname)" == "Linux" ]]; then
|
||||
PATH_PREFIX="/data/Projects"
|
||||
elif [[ "$(uname)" == "Darwin" ]]; then
|
||||
PATH_PREFIX="/Users/gregory.gauthier/Projects"
|
||||
else
|
||||
# Default fallback is Linux
|
||||
PATH_PREFIX="/data/Projects"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2164
|
||||
cd "${PATH_PREFIX}/local/mcp_servers/open_meteo_mcp"
|
||||
cd "$(dirname "$0")"
|
||||
poetry run open-meteo-mcp-stdio
|
||||
|
||||
@ -1,16 +1,6 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
if [[ "$(uname)" == "Linux" ]]; then
|
||||
PATH_PREFIX="/data/Projects"
|
||||
elif [[ "$(uname)" == "Darwin" ]]; then
|
||||
PATH_PREFIX="/Users/gregory.gauthier/Projects"
|
||||
else
|
||||
# Default fallback
|
||||
PATH_PREFIX="/data/Projects"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2164
|
||||
cd "${PATH_PREFIX}/local/mcp_servers/playwright_mcp"
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Install dependencies if not present
|
||||
if [[ ! -d "node_modules" ]]; then
|
||||
|
||||
@ -1,14 +1,4 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
if [[ "$(uname)" == "Linux" ]]; then
|
||||
PATH_PREFIX="/data/Projects"
|
||||
elif [[ "$(uname)" == "Darwin" ]]; then
|
||||
PATH_PREFIX="/Users/gregory.gauthier/Projects"
|
||||
else
|
||||
# Default fallback is Linux
|
||||
PATH_PREFIX="/data/Projects"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2164
|
||||
cd "${PATH_PREFIX}/local/mcp_servers/selenium_mcp"
|
||||
cd "$(dirname "$0")"
|
||||
poetry run selenium-mcp-stdio
|
||||
|
||||
Loading…
Reference in New Issue
Block a user