23 lines
805 B
PowerShell
23 lines
805 B
PowerShell
# start-memory.ps1
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
# Get the directory where this script is located
|
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
|
|
# Navigate to project root (two levels up from .claude\tools\)
|
|
$ProjectRoot = Split-Path -Parent (Split-Path -Parent $ScriptDir)
|
|
|
|
# Create the data directory if it doesn't exist (using absolute path relative to project root)
|
|
$DataDir = Join-Path $ProjectRoot ".memory-mcp"
|
|
if (-not (Test-Path $DataDir)) {
|
|
New-Item -ItemType Directory -Path $DataDir -Force | Out-Null
|
|
}
|
|
|
|
# Set the memory file path as ABSOLUTE path (must be a file, not directory)
|
|
$env:MEMORY_FILE_PATH = Join-Path $DataDir "knowledge_graph.json"
|
|
|
|
# Change to script directory
|
|
Set-Location $ScriptDir
|
|
|
|
# Run the memory MCP server
|
|
npx -y @modelcontextprotocol/server-memory |