From 8f71f1629d267484dc698f44748eb7fb5634feee Mon Sep 17 00:00:00 2001 From: Devid HW Date: Wed, 22 Apr 2026 05:17:20 +0700 Subject: [PATCH] docs: unify all docs to use single installation path ~/.local/bin/mt5-quant - Update WINDSURF.md: Use registry name io.github.masdevid/mt5-quant - Update CURSOR.md: Use ~/.local/bin/mt5-quant path - Update QUICKSTART.md: Use standard path for all clients - Update VSCODE.md: Use standard path - Update setup.sh: Prefer ~/.local/bin/mt5-quant over project path - Add fallback warning in setup.sh if project path used Single source of truth: ~/.local/bin/mt5-quant --- docs/CURSOR.md | 4 ++-- docs/QUICKSTART.md | 10 ++++++---- docs/VSCODE.md | 8 ++++---- docs/WINDSURF.md | 10 ++++++++-- scripts/setup.sh | 22 +++++++++++++++------- 5 files changed, 35 insertions(+), 19 deletions(-) diff --git a/docs/CURSOR.md b/docs/CURSOR.md index 90fdc12..78c7004 100644 --- a/docs/CURSOR.md +++ b/docs/CURSOR.md @@ -29,7 +29,7 @@ cargo build --release 3. Click **Add Custom MCP** 4. Enter: - **Name**: `mt5-quant` - - **Command**: Full path to binary (e.g., `/Users/name/mt5-quant/target/release/mt5-quant`) + - **Command**: `~/.local/bin/mt5-quant` - **Type**: `stdio` ### Method 2: Edit mcp.json Directly @@ -41,7 +41,7 @@ Add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project): "mcpServers": { "mt5-quant": { "type": "stdio", - "command": "/absolute/path/to/mt5-quant" + "command": "~/.local/bin/mt5-quant" } } } diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.md index bf04b40..0e86ecd 100644 --- a/docs/QUICKSTART.md +++ b/docs/QUICKSTART.md @@ -81,7 +81,7 @@ terminal_dir: "~/Library/Application Support/net.metaquotes.wine.metatrader5/dri ### Claude Code ```bash -claude mcp add MT5-Quant -- /path/to/mt5-quant/target/release/mt5-quant +claude mcp add io.github.masdevid/mt5-quant -- ~/.local/bin/mt5-quant ``` Verify: @@ -96,8 +96,10 @@ Add to `~/.codeium/windsurf/mcp_config.json`: ```json { "mcpServers": { - "mt5-quant": { - "command": "/path/to/mt5-quant" + "io.github.masdevid/mt5-quant": { + "command": "~/.local/bin/mt5-quant", + "disabled": false, + "registry": "io.github.masdevid/mt5-quant" } } } @@ -111,7 +113,7 @@ Add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project): { "mcpServers": { "mt5-quant": { - "command": "/path/to/mt5-quant" + "command": "~/.local/bin/mt5-quant" } } } diff --git a/docs/VSCODE.md b/docs/VSCODE.md index 801bc84..79642b2 100644 --- a/docs/VSCODE.md +++ b/docs/VSCODE.md @@ -28,7 +28,7 @@ cargo build --release 2. Run `MCP: Add Server` 3. Choose **Workspace** or **User** scope 4. Enter server name: `mt5-quant` -5. Enter command: Full path to binary (e.g., `/Users/name/mt5-quant/target/release/mt5-quant`) +5. Enter command: `~/.local/bin/mt5-quant` ### Method 2: Edit mcp.json Directly @@ -38,7 +38,7 @@ Add to `.vscode/mcp.json` in your workspace: { "servers": { "mt5-quant": { - "command": "/absolute/path/to/mt5-quant" + "command": "~/.local/bin/mt5-quant" } } } @@ -52,7 +52,7 @@ cat > .vscode/mcp.json << 'EOF' { "servers": { "mt5-quant": { - "command": "/path/to/mt5-quant" + "command": "~/.local/bin/mt5-quant" } } } @@ -62,7 +62,7 @@ EOF ### Method 3: VS Code CLI ```bash -code --add-mcp '{"name":"mt5-quant","command":"/path/to/mt5-quant"}' +code --add-mcp '{"name":"mt5-quant","command":"~/.local/bin/mt5-quant"}' ``` ## Verify Setup diff --git a/docs/WINDSURF.md b/docs/WINDSURF.md index 78c88bd..cf0777f 100644 --- a/docs/WINDSURF.md +++ b/docs/WINDSURF.md @@ -27,8 +27,10 @@ Edit `~/.codeium/windsurf/mcp_config.json`: ```json { "mcpServers": { - "mt5-quant": { - "command": "/Users/masdevid/jobs/mt5-quant/target/release/mt5-quant" + "io.github.masdevid/mt5-quant": { + "command": "~/.local/bin/mt5-quant", + "disabled": false, + "registry": "io.github.masdevid/mt5-quant" } } } @@ -37,6 +39,10 @@ Edit `~/.codeium/windsurf/mcp_config.json`: Or use the automated setup: ```bash +# Install binary to standard location +cp target/release/mt5-quant ~/.local/bin/ + +# Then configure bash scripts/setup.sh ``` diff --git a/scripts/setup.sh b/scripts/setup.sh index de97d03..3ff7711 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -1024,14 +1024,20 @@ _register_with_platform() { local platform="$1" local use_binary="${2:-false}" - # Determine command path (binary for Windsurf/Cursor, Python for Claude) + # Determine command path - use standard installation location local cmd_path - if $use_binary && [[ -f "${REPO_DIR}/target/release/mt5-quant" ]]; then + local default_install="$HOME/.local/bin/mt5-quant" + + if [[ -f "$default_install" ]]; then + cmd_path="$default_install" + elif [[ -f "${REPO_DIR}/target/release/mt5-quant" ]]; then + # Fallback to project build if standard location not found cmd_path="${REPO_DIR}/target/release/mt5-quant" - elif [[ -f "${REPO_DIR}/mt5-quant" ]]; then - cmd_path="${REPO_DIR}/mt5-quant" + _warn "Using project build at $cmd_path" + _warn "Consider installing to standard location: cp $cmd_path ~/.local/bin/" else - cmd_path="python3 ${REPO_DIR}/server/main.py" + _fail "mt5-quant not found at $default_install or ${REPO_DIR}/target/release/" + return 1 fi case "$platform" in @@ -1066,8 +1072,10 @@ if os.path.exists(config_path): if 'mcpServers' not in data: data['mcpServers'] = {} -data['mcpServers']['mt5-quant'] = { - 'command': '$cmd_path' +data['mcpServers']['io.github.masdevid/mt5-quant'] = { + 'command': '$cmd_path', + 'disabled': False, + 'registry': 'io.github.masdevid/mt5-quant' } with open(config_path, 'w') as f: