-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_local_simple.bat
More file actions
31 lines (25 loc) · 840 Bytes
/
run_local_simple.bat
File metadata and controls
31 lines (25 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@echo off
REM Simple Windows batch script for MCP server in LOCAL_MODE
REM Assumes packages are already installed
REM All diagnostic output goes to stderr to avoid interfering with MCP JSON protocol
REM Set environment variable
set LOCAL_MODE=true
REM Get the directory where this batch file is located
set SCRIPT_DIR=%~dp0
cd /d "%SCRIPT_DIR%"
REM Check if we're in the right directory
if not exist "server.py" (
echo ERROR: server.py not found in directory %SCRIPT_DIR% >&2
echo Current directory: %CD% >&2
dir /b *.py >&2
exit /b 1
)
REM Run with Python directly (assumes correct packages already installed)
python server.py
REM If Python fails, try with uv
if %ERRORLEVEL% neq 0 (
echo Python failed, trying uv... >&2
uv run python server.py
)
REM Exit with the same code as the server
exit /b %ERRORLEVEL%