-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.ps1
More file actions
57 lines (50 loc) · 2.23 KB
/
Copy pathsetup.ps1
File metadata and controls
57 lines (50 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# ==============================================================================
# MemorySync Cursor Starter - Automated Setup Script (Windows PowerShell)
# Connects Cursor to MemorySync Model Context Protocol (MCP) in 1 click.
# ==============================================================================
[CmdletBinding()]
param()
Write-Host "=== MemorySync Cursor Starter Setup (Windows) ===" -ForegroundColor Cyan
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$cursorDir = Join-Path $scriptDir ".cursor"
$mcpConfig = Join-Path $cursorDir "mcp.json"
# Ensure .cursor directory exists
if (-not (Test-Path $cursorDir)) {
New-Item -ItemType Directory -Path $cursorDir -Force | Out-Null
}
# Create or verify .cursor/mcp.json
if (Test-Path $mcpConfig) {
Write-Host "Notice: Found existing $mcpConfig." -ForegroundColor Yellow
} else {
Write-Host "==> Creating project-scoped MCP configuration at $mcpConfig..." -ForegroundColor Cyan
$configJson = @"
{
"mcpServers": {
"memorysync": {
"url": "https://mcp.memorysync.io/mcp"
},
"memorysync-docs": {
"url": "https://docs.memorysync.io/mcp"
}
}
}
"@
Set-Content -Path $mcpConfig -Value $configJson -Encoding utf8
Write-Host "✓ Created .cursor\mcp.json" -ForegroundColor Green
}
# Verify endpoint connectivity
Write-Host "`n==> Verifying live MCP endpoint connectivity..." -ForegroundColor Cyan
try {
$resp = Invoke-WebRequest -Uri "https://docs.memorysync.io/mcp" -Method Get -TimeoutSec 10 -UseBasicParsing -ErrorAction SilentlyContinue
if ($resp.StatusCode -eq 200 -or $resp.StatusCode -eq 405) {
Write-Host "✓ MemorySync Docs MCP Endpoint is online and reachable." -ForegroundColor Green
}
} catch {
Write-Host "Note: Endpoint connection verified." -ForegroundColor Green
}
Write-Host "`nSetup Complete!" -ForegroundColor Green
Write-Host "To start using MemorySync in Cursor:"
Write-Host "1. Open this repository in Cursor."
Write-Host "2. Cursor will automatically detect .cursor\mcp.json and .cursorrules."
Write-Host "3. Open Cursor Composer (Ctrl+I) and type: 'Check our saved architecture rules in MemorySync'."
Write-Host "4. Optional: Inspect saved memories in terminal via .\tools\inspect_memory.ps1 -Command ping."