quick-test.bat•1.71 kB
@echo off
echo ========================================
echo MCP Quoting System - Quick Test
echo ========================================
echo.
echo This will:
echo 1. Start the server in the background
echo 2. Run test client with sample RFQs
echo 3. Show results
echo.
pause
REM Start server in background
echo Starting server...
start /B npm run dev > server.log 2>&1
REM Wait for server to start
echo Waiting for server to initialize...
timeout /t 5 /nobreak > nul
REM Check if server is running
curl -s http://localhost:3789/health > nul 2>&1
if errorlevel 1 (
echo ERROR: Server failed to start
echo Check server.log for details
pause
exit /b 1
)
echo Server is running!
echo.
echo Running test client...
echo.
REM Run test client (if it exists)
if exist "src\test-client.ts" (
npx ts-node src/test-client.ts
) else (
echo Test client not found, sending sample request...
echo.
curl -X POST http://localhost:3789/mcp/invoke/evaluateRfpAndDraftQuote ^
-H "Content-Type: application/json" ^
-d "{\"rfp\":{\"rawText\":\"We need 200 pcs of a 6061-T6 aluminum widget, CNC machined, anodize finish, tolerance +/-0.005\",\"qty\":200,\"contactEmail\":\"test@example.com\"}}"
)
echo.
echo.
echo Test complete! Check the output above.
echo Server is still running in the background.
echo.
choice /C YN /M "Stop the server"
if errorlevel 2 goto :keep_running
if errorlevel 1 goto :stop_server
:stop_server
echo Stopping server...
taskkill /F /IM node.exe /FI "WINDOWTITLE eq MCP*" > nul 2>&1
echo Server stopped.
goto :end
:keep_running
echo Server will continue running in the background.
echo To stop it later, run: taskkill /F /IM node.exe
:end
pause