-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAUTO-START-MCP.bat
More file actions
66 lines (58 loc) · 1.9 KB
/
Copy pathAUTO-START-MCP.bat
File metadata and controls
66 lines (58 loc) · 1.9 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
@echo off
title MCP Server Auto-Start
echo ============================================================
echo MCP SERVER - AUTO START SYSTEM
echo ============================================================
echo.
cd /d "%~dp0"
echo [1/4] Checking if servers are already running...
netstat -an | findstr ":8000" >nul
if %errorlevel% == 0 (
echo Backend server already running on port 8000
) else (
echo Starting Backend Server...
start "MCP Backend Server" /min cmd /c "cd backend && python minimal-server.py"
timeout /t 3 /nobreak >nul
)
netstat -an | findstr ":3001" >nul
if %errorlevel% == 0 (
echo Interface server already running on port 3001
) else (
echo Starting Interface Server...
start "MCP Interface Server" /min cmd /c "cd interface && python -m http.server 3001"
timeout /t 2 /nobreak >nul
)
echo [2/4] Waiting for servers to initialize...
timeout /t 5 /nobreak >nul
echo [3/4] Verifying servers are running...
:check_backend
curl -s http://localhost:8000/health >nul 2>&1
if %errorlevel% neq 0 (
echo Backend not ready, waiting...
timeout /t 2 /nobreak >nul
goto check_backend
)
echo Backend server is ready!
:check_interface
curl -s http://localhost:3001/mcp-interface.html >nul 2>&1
if %errorlevel% neq 0 (
echo Interface not ready, waiting...
timeout /t 2 /nobreak >nul
goto check_interface
)
echo Interface server is ready!
echo [4/4] Opening MCP Server Interface...
start http://localhost:3001/mcp-interface.html
echo.
echo ============================================================
echo MCP SERVER IS READY!
echo ============================================================
echo.
echo Backend: http://localhost:8000
echo Interface: http://localhost:3001/mcp-interface.html
echo.
echo Both servers are running in minimized windows.
echo To stop servers: Close the minimized windows or press Ctrl+C
echo.
echo Press any key to close this window...
pause >nul