Keep/mcp-server/start-sse.ps1
sepehr 8d95f34fcc fix: Add debounced Undo/Redo system to avoid character-by-character history
- Add debounced state updates for title and content (500ms delay)
- Immediate UI updates with delayed history saving
- Prevent one-letter-per-undo issue
- Add cleanup for debounce timers on unmount
2026-01-04 14:28:11 +01:00

49 lines
2.1 KiB
PowerShell

# Script to start MCP SSE Server for Memento
Write-Host "`n╔═══════════════════════════════════════════════════════════╗" -ForegroundColor Cyan
Write-Host "║ Starting Memento MCP SSE Server ║" -ForegroundColor Cyan
Write-Host "╚═══════════════════════════════════════════════════════════╝`n" -ForegroundColor Cyan
# Check if running from correct directory
$currentDir = Get-Location
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
if ($scriptDir) {
Push-Location $scriptDir
}
# Ensure we have node_modules
if (-not (Test-Path "node_modules")) {
Write-Host "📦 Installing dependencies..." -ForegroundColor Yellow
npm install
}
# Check if Prisma Client exists in parent keep-notes
$prismaClientPath = "..\keep-notes\node_modules\.prisma\client"
if (Test-Path $prismaClientPath) {
Write-Host "✅ Prisma Client found in keep-notes" -ForegroundColor Green
} else {
Write-Host "⚠️ Prisma Client not found. Run: cd ..\keep-notes && npx prisma generate" -ForegroundColor Yellow
Write-Host " Then restart this script." -ForegroundColor Yellow
exit 1
}
# Get local IP address
Write-Host "`n🔍 Detecting network configuration..." -ForegroundColor Cyan
$ipAddresses = Get-NetIPAddress -AddressFamily IPv4 | Where-Object { $_.InterfaceAlias -notlike "*Loopback*" -and $_.IPAddress -notlike "169.*" }
$mainIP = $ipAddresses | Select-Object -First 1 -ExpandProperty IPAddress
Write-Host "`n📡 Your IP addresses:" -ForegroundColor Cyan
foreach ($ip in $ipAddresses) {
Write-Host " - $($ip.IPAddress)" -ForegroundColor White
}
Write-Host "`n🌐 For N8N configuration, use:" -ForegroundColor Green
Write-Host " http://$mainIP:3001/sse" -ForegroundColor Yellow -BackgroundColor DarkGray
Write-Host "`n🚀 Starting MCP SSE Server on port 3001..." -ForegroundColor Cyan
Write-Host " Press Ctrl+C to stop`n" -ForegroundColor Gray
# Start the server
node index-sse.js