fix: correct broken batch file paths and update README
- start-llama-server.bat: fix LLAMA_DIR to bin\llama (was bin\ollama), fix model to qwen2.5-coder-1.5b (was Llama-3.2-1B), use correct GPU (llama-server.exe) and CPU (cpu\llama-server-cpu.exe) binaries - start-windows-mcp.bat: remove dead python313\ tier, use single embedded Python 3.13 at python\python.exe - run-hermes.bat: use Scripts\hermes.exe instead of -m hermes_cli (no __main__.py in package), fix offline mode to use single config.yaml instead of non-existent config.offline.yaml - run-hermes.ps1: same hermes_cli → hermes.exe fix - README.txt: update to match actual USB state (Python 3.13, 142 wheels, Qwen2.5-Coder-1.5B 1117MB model, correct dir structure)
This commit is contained in:
@@ -7,10 +7,8 @@ cd /d "%~dp0"
|
||||
set MCP_PORT=8000
|
||||
set MCP_HOST=127.0.0.1
|
||||
set WHEELS_DIR=%~dp0bin\wheels-windows-mcp
|
||||
set PYTHON_MAIN=%~dp0python\python.exe
|
||||
set PYTHON313=%~dp0python313\python.exe
|
||||
set PYTHON=%~dp0python\python.exe
|
||||
set MARKER=%~dp0bin\.windows-mcp-installed
|
||||
set PYTHON_CMD=
|
||||
|
||||
echo.
|
||||
echo ============================================
|
||||
@@ -33,57 +31,24 @@ echo.
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
:: --- Find Python 3.13+ -------------------------------------------------------
|
||||
echo [*] Looking for Python 3.13+...
|
||||
|
||||
:: Tier 1: Dedicated python313\ directory
|
||||
if exist "!PYTHON313!" (
|
||||
"!PYTHON313!" --version 2>nul | findstr /r /c:"Python 3\.1[3-9]" >nul
|
||||
if !errorlevel! equ 0 (
|
||||
echo [OK] Found dedicated Python 3.13: !PYTHON313!
|
||||
set PYTHON_CMD=!PYTHON313!
|
||||
goto install_and_run
|
||||
)
|
||||
:: --- Check Python exists -----------------------------------------------------
|
||||
if not exist "!PYTHON!" (
|
||||
echo [ERROR] Embedded Python 3.13 not found at !PYTHON!
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Tier 2: Main portable Python (if 3.13+)
|
||||
if exist "!PYTHON_MAIN!" (
|
||||
"!PYTHON_MAIN!" --version 2>nul | findstr /r /c:"Python 3\.1[3-9]" >nul
|
||||
if !errorlevel! equ 0 (
|
||||
echo [OK] Found Python 3.13: !PYTHON_MAIN!
|
||||
set PYTHON_CMD=!PYTHON_MAIN!
|
||||
goto install_and_run
|
||||
) else (
|
||||
"!PYTHON_MAIN!" --version 2>nul
|
||||
echo [INFO] Main Python version is not 3.13+ (need >=3.13 for windows-mcp)
|
||||
)
|
||||
:: Verify it's 3.13+
|
||||
"!PYTHON!" --version 2>nul | findstr /r /c:"Python 3\.1[3-9]" >nul
|
||||
if !errorlevel! neq 0 (
|
||||
echo [ERROR] Embedded Python is not 3.13+ (need >=3.13 for windows-mcp)
|
||||
"!PYTHON!" --version
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Tier 3: uv/uvx (handles its own Python)
|
||||
where uvx >nul 2>&1
|
||||
if !errorlevel! equ 0 (
|
||||
echo [OK] Using uvx (auto-manages Python)
|
||||
goto use_uvx
|
||||
)
|
||||
where uvx.exe >nul 2>&1
|
||||
if !errorlevel! equ 0 (
|
||||
echo [OK] Using uvx (auto-manages Python)
|
||||
goto use_uvx
|
||||
)
|
||||
|
||||
:: No Python 3.13+ found
|
||||
echo.
|
||||
echo [ERROR] No Python 3.13+ found and uvx is not available.
|
||||
echo.
|
||||
echo To use Windows-MCP, you need one of:
|
||||
echo A) Place Python 3.13 portable in: python313\
|
||||
echo (Download from https://www.python.org/downloads/)
|
||||
echo B) Install uv and ensure it's in PATH:
|
||||
echo winget install astral.uv
|
||||
echo or: npm install -g uv
|
||||
echo.
|
||||
pause
|
||||
exit /b 1
|
||||
echo [OK] Found Python 3.13: !PYTHON!
|
||||
|
||||
:: --- Install from local wheels -----------------------------------------------
|
||||
:install_and_run
|
||||
@@ -94,10 +59,10 @@ if not exist "!WHEELS_DIR!\windows_mcp-*-py3-none-any.whl" (
|
||||
) else (
|
||||
if not exist "!MARKER!" (
|
||||
echo [*] Installing Windows-MCP from local wheels...
|
||||
"!PYTHON_CMD!" -m pip install --no-index --find-links "!WHEELS_DIR!" --quiet windows-mcp 2>&1
|
||||
"!PYTHON!" -m pip install --no-index --find-links "!WHEELS_DIR!" --quiet windows-mcp 2>&1
|
||||
if errorlevel 1 (
|
||||
echo [WARN] Offline install failed, trying online...
|
||||
"!PYTHON_CMD!" -m pip install --quiet windows-mcp 2>&1
|
||||
"!PYTHON!" -m pip install --quiet windows-mcp 2>&1
|
||||
)
|
||||
if errorlevel 1 (
|
||||
echo [ERROR] Failed to install windows-mcp.
|
||||
@@ -112,18 +77,6 @@ if not exist "!WHEELS_DIR!\windows_mcp-*-py3-none-any.whl" (
|
||||
)
|
||||
goto run_server
|
||||
|
||||
:: --- Use uvx -----------------------------------------------------------------
|
||||
:use_uvx
|
||||
echo [*] Starting via uvx (auto-manages dependencies)...
|
||||
echo.
|
||||
echo [*] Press Ctrl+C to stop the server.
|
||||
echo.
|
||||
uvx windows-mcp serve --transport sse --host %MCP_HOST% --port %MCP_PORT% --exclude-tools PowerShell,Registry
|
||||
echo.
|
||||
echo [*] Server exited with code !errorlevel!
|
||||
pause
|
||||
exit /b 0
|
||||
|
||||
:: --- Run server --------------------------------------------------------------
|
||||
:run_server
|
||||
echo.
|
||||
@@ -140,7 +93,7 @@ echo.
|
||||
echo [*] Press Ctrl+C to stop the server.
|
||||
echo.
|
||||
|
||||
"!PYTHON_CMD!" -m windows_mcp serve --transport sse --host %MCP_HOST% --port %MCP_PORT% --exclude-tools PowerShell,Registry
|
||||
"!PYTHON!" -m windows_mcp serve --transport sse --host %MCP_HOST% --port %MCP_PORT% --exclude-tools PowerShell,Registry
|
||||
|
||||
echo.
|
||||
echo [*] Server exited with code !errorlevel!
|
||||
|
||||
Reference in New Issue
Block a user