-
-
Notifications
You must be signed in to change notification settings - Fork 136
Windows Hybrid Backend Setup Example
Machine: Windows PC (heinrich.krupp) Date: October 6, 2025 Version: v8.3.0 Storage Backend: Hybrid (SQLite-vec + Cloudflare)
All three Claude environments are configured with identical hybrid backend settings:
Configuration File: C:\Users\heinrich.krupp\.claude.json (lines 2944-2967)
{
"memory": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"C:/REPOSITORIES/mcp-memory-service",
"run",
"python",
"-m",
"mcp_memory_service.server"
],
"env": {
"MCP_MEMORY_STORAGE_BACKEND": "hybrid",
"CLOUDFLARE_API_TOKEN": "<YOUR_CLOUDFLARE_API_TOKEN>",
"CLOUDFLARE_ACCOUNT_ID": "<YOUR_CLOUDFLARE_ACCOUNT_ID>",
"CLOUDFLARE_D1_DATABASE_ID": "<YOUR_CLOUDFLARE_D1_DATABASE_ID>",
"CLOUDFLARE_VECTORIZE_INDEX": "mcp-memory-index",
"MCP_HYBRID_SYNC_INTERVAL": "300",
"MCP_HYBRID_BATCH_SIZE": "50",
"MCP_HYBRID_SYNC_ON_STARTUP": "true",
"MCP_MEMORY_BACKUPS_PATH": "C:\\Users\\heinrich.krupp\\AppData\\Local\\mcp-memory\\backups",
"MCP_MEMORY_SQLITE_PATH": "C:\\Users\\heinrich.krupp\\AppData\\Local\\mcp-memory\\backups\\sqlite_vec.db"
}
}
}Status: ✅ Connected
Verification: claude mcp list shows memory server connected
Configuration File: C:\Users\heinrich.krupp\AppData\Roaming\Claude\claude_desktop_config.json (lines 3-20)
{
"mcpServers": {
"memory": {
"command": "uv",
"args": [
"--directory", "C:/REPOSITORIES/mcp-memory-service",
"run", "python", "-m", "mcp_memory_service.server"
],
"env": {
"MCP_MEMORY_BACKUPS_PATH": "C:\\Users\\heinrich.krupp\\AppData\\Local\\mcp-memory\\backups",
"MCP_MEMORY_STORAGE_BACKEND": "hybrid",
"MCP_MEMORY_SQLITE_PATH": "C:\\Users\\heinrich.krupp\\AppData\\Local\\mcp-memory\\backups\\sqlite_vec.db",
"CLOUDFLARE_API_TOKEN": "<YOUR_CLOUDFLARE_API_TOKEN>",
"CLOUDFLARE_ACCOUNT_ID": "<YOUR_CLOUDFLARE_ACCOUNT_ID>",
"CLOUDFLARE_D1_DATABASE_ID": "<YOUR_CLOUDFLARE_D1_DATABASE_ID>",
"CLOUDFLARE_VECTORIZE_INDEX": "mcp-memory-index",
"MCP_HYBRID_SYNC_INTERVAL": "300",
"MCP_HYBRID_BATCH_SIZE": "50",
"MCP_HYBRID_SYNC_ON_STARTUP": "true"
}
}
}
}Status: ✅ Configured Restart Required: After config changes
Configuration File: C:\REPOSITORIES\mcp-memory-service\.env
MCP_MEMORY_STORAGE_BACKEND=hybrid
# Cloudflare Configuration
CLOUDFLARE_API_TOKEN=<YOUR_CLOUDFLARE_API_TOKEN>
CLOUDFLARE_ACCOUNT_ID=<YOUR_CLOUDFLARE_ACCOUNT_ID>
CLOUDFLARE_D1_DATABASE_ID=<YOUR_CLOUDFLARE_D1_DATABASE_ID>
CLOUDFLARE_VECTORIZE_INDEX=mcp-memory-index
# Hybrid Backend Settings
MCP_HYBRID_SYNC_INTERVAL=300
MCP_HYBRID_BATCH_SIZE=50
MCP_HYBRID_SYNC_ON_STARTUP=true
# Paths
MCP_MEMORY_BACKUPS_PATH=C:\Users\heinrich.krupp\AppData\Local\mcp-memory\backups
MCP_MEMORY_SQLITE_PATH=C:\Users\heinrich.krupp\AppData\Local\mcp-memory\backups\sqlite_vec.dbStatus: ✅ Running on port 8000
Start Command: MCP_MEMORY_STORAGE_BACKEND=hybrid uv run python scripts/server/run_http_server.py
- URL: http://localhost:8000/
- API Docs: http://localhost:8000/api/docs
- Health Check: http://localhost:8000/api/health
Path: C:\Users\heinrich.krupp\AppData\Local\mcp-memory\backups\sqlite_vec.db
Type: Local, fast (5ms read/write)
Purpose: All user-facing operations
D1 Database: <YOUR_CLOUDFLARE_D1_DATABASE_ID>
Vectorize Index: mcp-memory-index
Account: <YOUR_CLOUDFLARE_ACCOUNT_ID>
Purpose: Cloud persistence, multi-device sync
- Cloudflare Total: 1,309 memories
- Local SQLite: 1,139 memories (86% complete)
- Synced: 81 memories since startup
- Remaining: 170 memories
- Status: ✅ Actively syncing in background
- Interval: 300 seconds (5 minutes)
- Batch Size: 50 memories per batch
- Startup Sync: Enabled
-
Max Empty Batches: 20 (configurable via
MCP_HYBRID_MAX_EMPTY_BATCHES) -
Min Check Count: 1000 (configurable via
MCP_HYBRID_MIN_CHECK_COUNT)
- Initial sync processes ~10 memories every 30-40 seconds
- Each memory requires embedding generation (all-MiniLM-L6-v2 model)
- Cloudflare API rate limiting may slow sync
- Background sync continues while server is accessible
- Expected completion time: ~5-10 minutes for 170 remaining memories
# Local SQLite count
python -c "import sqlite3; conn = sqlite3.connect(r'C:\Users\heinrich.krupp\AppData\Local\mcp-memory\backups\sqlite_vec.db'); cursor = conn.cursor(); cursor.execute('SELECT COUNT(*) FROM memories'); print(f'Local: {cursor.fetchone()[0]}'); conn.close()"
# Cloudflare count
curl -s "https://api.cloudflare.com/client/v4/accounts/<YOUR_CLOUDFLARE_ACCOUNT_ID>/d1/database/<YOUR_CLOUDFLARE_D1_DATABASE_ID>/query" -H "Authorization: Bearer <YOUR_CLOUDFLARE_API_TOKEN>" -H "Content-Type: application/json" -d '{"sql":"SELECT COUNT(*) as count FROM memories"}' | python -c "import sys, json; data = json.load(sys.stdin); print(f'Cloudflare: {data[\"result\"][0][\"results\"][0][\"count\"]}')"
# Dashboard API count
curl -s "http://127.0.0.1:8000/api/memories?page=1&page_size=1" | python -c "import sys, json; data = json.load(sys.stdin); print(f'Dashboard: {data[\"total\"]}')"curl -s http://127.0.0.1:8000/api/health | python -m json.toolclaude mcp list | grep memory- ✅ Verify HTTP server is running:
curl http://localhost:8000/api/health - ✅ Check sync is active: Look for "Initial sync progress" in server logs
- ✅ Wait for sync to complete: Background process takes 5-10 minutes
- ❌ Don't restart server - This will reset sync progress
- Check server logs for errors:
BashOutput <server-id> - Verify Cloudflare credentials are correct
- Check network connectivity
- Look for "Completed sync" or early break condition messages
- HTTP Server default port changed from 8888 to 8000 in v8.3.0
- Update any bookmarks or scripts to use port 8000
- Dashboard hooks may need endpoint update
- Upgraded from v7.4.0 to v8.3.0 (50 commits ahead)
- Reset to remote develop branch
- Reinstalled in editable mode:
uv pip install -e . - Restarted HTTP server with hybrid backend
- Verified all three environments use identical configuration
- ✅ All environments use
hybridbackend - ✅ Cloudflare credentials consistent across all configs
- ✅ SQLite path standardized to backups directory
- ✅ Sync settings unified (300s interval, 50 batch size)
- ⏳ Wait for initial sync to complete (170 memories remaining)
- 📝 Update memory awareness hooks to use correct endpoint
- ✅ Verify sync completion with count comparison
- 📊 Monitor dashboard for full memory availability