-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSTART-MCP.bat
More file actions
63 lines (52 loc) · 1.73 KB
/
Copy pathSTART-MCP.bat
File metadata and controls
63 lines (52 loc) · 1.73 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
@echo off
title MCP Server - One Click Start
echo ============================================================
echo MCP SERVER - ONE CLICK START
echo ============================================================
echo.
cd /d "%~dp0"
echo Starting MCP Server...
echo.
REM Kill any existing Python processes on ports 8000 and 3001
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":8000"') do taskkill /f /pid %%a >nul 2>&1
for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":3001"') do taskkill /f /pid %%a >nul 2>&1
REM Start backend server
echo Starting Backend Server...
start "MCP Backend" /min cmd /c "cd backend && python minimal-server.py"
REM Wait for backend to start
timeout /t 5 /nobreak >nul
REM Start interface server
echo Starting Interface Server...
start "MCP Interface" /min cmd /c "cd interface && python -m http.server 3001"
REM Wait for interface to start
timeout /t 3 /nobreak >nul
REM Verify servers are running
echo Verifying servers...
:check_servers
curl -s http://localhost:8000/health >nul 2>&1
if %errorlevel% neq 0 (
echo Waiting for backend...
timeout /t 2 /nobreak >nul
goto check_servers
)
curl -s http://localhost:3001/mcp-interface.html >nul 2>&1
if %errorlevel% neq 0 (
echo Waiting for interface...
timeout /t 2 /nobreak >nul
goto check_servers
)
echo.
echo ============================================================
echo MCP SERVER IS READY!
echo ============================================================
echo.
echo Backend: http://localhost:8000
echo Interface: http://localhost:3001/mcp-interface.html
echo.
echo Opening browser...
start http://localhost:3001/mcp-interface.html
echo.
echo MCP Server is running!
echo To stop: Close the minimized windows or press Ctrl+C
echo.
pause