@echo off
echo ๐ง MCP Memory System - Local Installation
echo =========================================
echo.
echo ๐ณ Checking Docker...
docker --version >nul 2>&1
if errorlevel 1 (
echo โ Docker not found. Please install Docker Desktop first.
echo Download: https://www.docker.com/products/docker-desktop
pause
exit /b 1
)
echo โ
Docker is available
echo.
echo ๐๏ธ Building MCP server image...
docker build -f Dockerfile.simple -t mem0mcp-simple:latest .
if errorlevel 1 (
echo โ Failed to build image
pause
exit /b 1
)
echo โ
Image built successfully
echo.
echo ๐ Starting infrastructure services...
docker-compose -f docker-compose.local.yml up -d postgres ollama
if errorlevel 1 (
echo โ Failed to start services
pause
exit /b 1
)
echo โ
Services started
echo.
echo โณ Waiting for services to initialize (30 seconds)...
timeout /t 30 /nobreak >nul
echo.
echo ๐ฆ Downloading AI models (this will take several minutes)...
echo Downloading phi3:mini (2.2GB)...
docker exec mem0-ollama ollama pull phi3:mini
if errorlevel 1 (
echo โ Failed to download phi3:mini
pause
exit /b 1
)
echo Downloading nomic-embed-text (274MB)...
docker exec mem0-ollama ollama pull nomic-embed-text
if errorlevel 1 (
echo โ Failed to download nomic-embed-text
pause
exit /b 1
)
echo.
echo ๐งช Testing installation...
echo {"jsonrpc": "2.0", "method": "initialize", "id": 1, "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0"}}} < /dev/null | docker run -i --rm --network host -e POSTGRES_HOST=localhost -e POSTGRES_PORT=5432 -e POSTGRES_DB=postgres -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e LLM_PROVIDER=basic -e OLLAMA_HOST=http://localhost:11434 mem0mcp-simple:latest >nul 2>&1
if errorlevel 1 (
echo โ ๏ธ Test had issues but services should be running
) else (
echo โ
Test passed
)
echo.
echo ๐ Installation Complete\!
echo =========================
echo.
echo โ
PostgreSQL with pgvector: Running on port 5432
echo โ
Ollama with AI models: Running on port 11434
echo โ
MCP Server: Built and ready
echo โ
Claude Desktop: Already configured in .claude.json
echo.
echo ๐ Next Steps:
echo 1. Restart Claude Desktop
echo 2. Test with: /mcp (should show 'mem0-local')
echo 3. Try: "Remember that I'm testing the MCP memory system"
echo 4. Verify: "What do you remember about me?"
echo.
echo ๐ง Troubleshooting:
echo - Check services: docker ps
echo - View logs: docker-compose -f docker-compose.local.yml logs
echo - Restart: docker-compose -f docker-compose.local.yml restart
echo.
pause