@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