superlocalmemory 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/ATTRIBUTION.md +140 -0
  2. package/CHANGELOG.md +1749 -0
  3. package/LICENSE +21 -0
  4. package/README.md +600 -0
  5. package/bin/aider-smart +72 -0
  6. package/bin/slm +202 -0
  7. package/bin/slm-npm +73 -0
  8. package/bin/slm.bat +195 -0
  9. package/bin/slm.cmd +10 -0
  10. package/bin/superlocalmemoryv2:list +3 -0
  11. package/bin/superlocalmemoryv2:profile +3 -0
  12. package/bin/superlocalmemoryv2:recall +3 -0
  13. package/bin/superlocalmemoryv2:remember +3 -0
  14. package/bin/superlocalmemoryv2:reset +3 -0
  15. package/bin/superlocalmemoryv2:status +3 -0
  16. package/completions/slm.bash +58 -0
  17. package/completions/slm.zsh +76 -0
  18. package/configs/antigravity-mcp.json +13 -0
  19. package/configs/chatgpt-desktop-mcp.json +7 -0
  20. package/configs/claude-desktop-mcp.json +15 -0
  21. package/configs/codex-mcp.toml +13 -0
  22. package/configs/cody-commands.json +29 -0
  23. package/configs/continue-mcp.yaml +14 -0
  24. package/configs/continue-skills.yaml +26 -0
  25. package/configs/cursor-mcp.json +15 -0
  26. package/configs/gemini-cli-mcp.json +11 -0
  27. package/configs/jetbrains-mcp.json +11 -0
  28. package/configs/opencode-mcp.json +12 -0
  29. package/configs/perplexity-mcp.json +9 -0
  30. package/configs/vscode-copilot-mcp.json +12 -0
  31. package/configs/windsurf-mcp.json +16 -0
  32. package/configs/zed-mcp.json +12 -0
  33. package/docs/ARCHITECTURE.md +877 -0
  34. package/docs/CLI-COMMANDS-REFERENCE.md +425 -0
  35. package/docs/COMPETITIVE-ANALYSIS.md +210 -0
  36. package/docs/COMPRESSION-README.md +390 -0
  37. package/docs/GRAPH-ENGINE.md +503 -0
  38. package/docs/MCP-MANUAL-SETUP.md +720 -0
  39. package/docs/MCP-TROUBLESHOOTING.md +787 -0
  40. package/docs/PATTERN-LEARNING.md +363 -0
  41. package/docs/PROFILES-GUIDE.md +453 -0
  42. package/docs/RESET-GUIDE.md +353 -0
  43. package/docs/SEARCH-ENGINE-V2.2.0.md +748 -0
  44. package/docs/SEARCH-INTEGRATION-GUIDE.md +502 -0
  45. package/docs/UI-SERVER.md +254 -0
  46. package/docs/UNIVERSAL-INTEGRATION.md +432 -0
  47. package/docs/V2.2.0-OPTIONAL-SEARCH.md +666 -0
  48. package/docs/WINDOWS-INSTALL-README.txt +34 -0
  49. package/docs/WINDOWS-POST-INSTALL.txt +45 -0
  50. package/docs/example_graph_usage.py +148 -0
  51. package/hooks/memory-list-skill.js +130 -0
  52. package/hooks/memory-profile-skill.js +284 -0
  53. package/hooks/memory-recall-skill.js +109 -0
  54. package/hooks/memory-remember-skill.js +127 -0
  55. package/hooks/memory-reset-skill.js +274 -0
  56. package/install-skills.sh +436 -0
  57. package/install.ps1 +417 -0
  58. package/install.sh +755 -0
  59. package/mcp_server.py +585 -0
  60. package/package.json +94 -0
  61. package/requirements-core.txt +24 -0
  62. package/requirements.txt +10 -0
  63. package/scripts/postinstall.js +126 -0
  64. package/scripts/preuninstall.js +57 -0
  65. package/skills/slm-build-graph/SKILL.md +423 -0
  66. package/skills/slm-list-recent/SKILL.md +348 -0
  67. package/skills/slm-recall/SKILL.md +325 -0
  68. package/skills/slm-remember/SKILL.md +194 -0
  69. package/skills/slm-status/SKILL.md +363 -0
  70. package/skills/slm-switch-profile/SKILL.md +442 -0
  71. package/src/__pycache__/cache_manager.cpython-312.pyc +0 -0
  72. package/src/__pycache__/embedding_engine.cpython-312.pyc +0 -0
  73. package/src/__pycache__/graph_engine.cpython-312.pyc +0 -0
  74. package/src/__pycache__/hnsw_index.cpython-312.pyc +0 -0
  75. package/src/__pycache__/hybrid_search.cpython-312.pyc +0 -0
  76. package/src/__pycache__/memory-profiles.cpython-312.pyc +0 -0
  77. package/src/__pycache__/memory-reset.cpython-312.pyc +0 -0
  78. package/src/__pycache__/memory_compression.cpython-312.pyc +0 -0
  79. package/src/__pycache__/memory_store_v2.cpython-312.pyc +0 -0
  80. package/src/__pycache__/migrate_v1_to_v2.cpython-312.pyc +0 -0
  81. package/src/__pycache__/pattern_learner.cpython-312.pyc +0 -0
  82. package/src/__pycache__/query_optimizer.cpython-312.pyc +0 -0
  83. package/src/__pycache__/search_engine_v2.cpython-312.pyc +0 -0
  84. package/src/__pycache__/setup_validator.cpython-312.pyc +0 -0
  85. package/src/__pycache__/tree_manager.cpython-312.pyc +0 -0
  86. package/src/cache_manager.py +520 -0
  87. package/src/embedding_engine.py +671 -0
  88. package/src/graph_engine.py +970 -0
  89. package/src/hnsw_index.py +626 -0
  90. package/src/hybrid_search.py +693 -0
  91. package/src/memory-profiles.py +518 -0
  92. package/src/memory-reset.py +485 -0
  93. package/src/memory_compression.py +999 -0
  94. package/src/memory_store_v2.py +1088 -0
  95. package/src/migrate_v1_to_v2.py +638 -0
  96. package/src/pattern_learner.py +898 -0
  97. package/src/query_optimizer.py +513 -0
  98. package/src/search_engine_v2.py +403 -0
  99. package/src/setup_validator.py +479 -0
  100. package/src/tree_manager.py +720 -0
@@ -0,0 +1,720 @@
1
+ # SuperLocalMemory V2 - Manual MCP Setup Guide
2
+
3
+ This guide shows how to manually add SuperLocalMemory V2 as an MCP server in various applications and tools.
4
+
5
+ **Auto-configured by install.sh / npm install:**
6
+ - ✅ Claude Desktop, Cursor, Windsurf, Continue.dev
7
+ - ✅ OpenAI Codex CLI, VS Code/Copilot, Zed, OpenCode
8
+ - ✅ Antigravity, Perplexity, Gemini CLI
9
+ - ⚠️ ChatGPT (HTTP transport — run `slm serve`, see below)
10
+ - ⚠️ JetBrains (manual GUI setup — see below)
11
+ - ⚠️ Cody (manual setup — see below)
12
+
13
+ For tools marked ⚠️, follow the manual setup instructions below.
14
+
15
+ ---
16
+
17
+ ## Table of Contents
18
+
19
+ 1. [Prerequisites](#prerequisites)
20
+ 2. [Configuration Template](#configuration-template)
21
+ 3. [IDE/App Specific Setup](#ideapp-specific-setup)
22
+ - [Claude Desktop](#claude-desktop)
23
+ - [Cursor](#cursor)
24
+ - [Windsurf](#windsurf)
25
+ - [Continue.dev (VS Code)](#continuedev-vs-code)
26
+ - [OpenAI Codex CLI](#openai-codex-cli)
27
+ - [VS Code / GitHub Copilot](#vs-code--github-copilot)
28
+ - [Gemini CLI](#gemini-cli)
29
+ - [JetBrains IDEs](#jetbrains-ides)
30
+ - [Cody (VS Code/JetBrains)](#cody-vs-codejetbrains)
31
+ - [ChatGPT Desktop App](#chatgpt-desktop-app)
32
+ - [Perplexity](#perplexity)
33
+ - [Zed Editor](#zed-editor)
34
+ - [HTTP Transport (Remote Access)](#http-transport-remote-access)
35
+ - [Custom MCP Clients](#custom-mcp-clients)
36
+ 4. [Troubleshooting](#troubleshooting)
37
+ 5. [Verification](#verification)
38
+
39
+ ---
40
+
41
+ ## Prerequisites
42
+
43
+ 1. **SuperLocalMemory V2 installed:**
44
+ ```bash
45
+ ./install.sh
46
+ ```
47
+
48
+ 2. **MCP Python package installed:**
49
+ ```bash
50
+ pip3 install mcp
51
+ ```
52
+
53
+ 3. **Know your Python path:**
54
+ ```bash
55
+ which python3
56
+ # Output: /usr/bin/python3 or /opt/homebrew/bin/python3 or similar
57
+ ```
58
+
59
+ 4. **Know your install directory:**
60
+ ```bash
61
+ echo ~/.claude-memory
62
+ # Default: /Users/yourusername/.claude-memory
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Configuration Template
68
+
69
+ This is the base MCP configuration that works across all tools:
70
+
71
+ ```json
72
+ {
73
+ "mcpServers": {
74
+ "superlocalmemory-v2": {
75
+ "command": "python3",
76
+ "args": [
77
+ "/Users/yourusername/.claude-memory/mcp_server.py"
78
+ ],
79
+ "cwd": "/Users/yourusername/.claude-memory",
80
+ "env": {
81
+ "PYTHONPATH": "/Users/yourusername/.claude-memory"
82
+ },
83
+ "description": "SuperLocalMemory V2 - 100% local memory system"
84
+ }
85
+ }
86
+ }
87
+ ```
88
+
89
+ **Replace `/Users/yourusername/.claude-memory` with your actual install path.**
90
+
91
+ ---
92
+
93
+ ## IDE/App Specific Setup
94
+
95
+ ### Claude Desktop
96
+
97
+ **Configuration File:** `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
98
+ **Configuration File:** `%APPDATA%\Claude\claude_desktop_config.json` (Windows)
99
+ **Configuration File:** `~/.config/Claude/claude_desktop_config.json` (Linux)
100
+
101
+ **Steps:**
102
+
103
+ 1. Open Claude Desktop settings or directly edit the config file
104
+ 2. Add the MCP server configuration:
105
+
106
+ ```json
107
+ {
108
+ "mcpServers": {
109
+ "superlocalmemory-v2": {
110
+ "command": "python3",
111
+ "args": [
112
+ "/Users/yourusername/.claude-memory/mcp_server.py"
113
+ ],
114
+ "cwd": "/Users/yourusername/.claude-memory",
115
+ "env": {
116
+ "PYTHONPATH": "/Users/yourusername/.claude-memory"
117
+ },
118
+ "description": "SuperLocalMemory V2 - Local memory system"
119
+ }
120
+ }
121
+ }
122
+ ```
123
+
124
+ 3. **Restart Claude Desktop completely**
125
+ 4. Verify: Look for "superlocalmemory-v2" in available tools
126
+
127
+ **Auto-configured by install.sh:** ✅ Yes
128
+
129
+ ---
130
+
131
+ ### Cursor
132
+
133
+ **Configuration File:** `~/.cursor/mcp_settings.json` (macOS/Linux)
134
+ **Configuration File:** `%USERPROFILE%\.cursor\mcp_settings.json` (Windows)
135
+
136
+ **Steps:**
137
+
138
+ 1. Create or edit `~/.cursor/mcp_settings.json`:
139
+
140
+ ```json
141
+ {
142
+ "mcpServers": {
143
+ "superlocalmemory-v2": {
144
+ "command": "python3",
145
+ "args": [
146
+ "/Users/yourusername/.claude-memory/mcp_server.py"
147
+ ],
148
+ "cwd": "/Users/yourusername/.claude-memory",
149
+ "env": {
150
+ "PYTHONPATH": "/Users/yourusername/.claude-memory"
151
+ },
152
+ "description": "SuperLocalMemory V2"
153
+ }
154
+ }
155
+ }
156
+ ```
157
+
158
+ 2. **Completely quit Cursor (Cmd+Q on macOS)** and reopen
159
+ 3. Go to Settings → Tools & MCP
160
+ 4. Verify "superlocalmemory-v2" shows with green indicator
161
+
162
+ **Auto-configured by install.sh:** ✅ Yes
163
+
164
+ ---
165
+
166
+ ### Windsurf
167
+
168
+ **Configuration File:** `~/.windsurf/mcp_settings.json` (macOS/Linux)
169
+ **Configuration File:** `%USERPROFILE%\.windsurf\mcp_settings.json` (Windows)
170
+
171
+ **Steps:**
172
+
173
+ 1. Create or edit `~/.windsurf/mcp_settings.json`:
174
+
175
+ ```json
176
+ {
177
+ "mcpServers": {
178
+ "superlocalmemory-v2": {
179
+ "command": "python3",
180
+ "args": [
181
+ "/Users/yourusername/.claude-memory/mcp_server.py"
182
+ ],
183
+ "cwd": "/Users/yourusername/.claude-memory",
184
+ "env": {
185
+ "PYTHONPATH": "/Users/yourusername/.claude-memory"
186
+ },
187
+ "transport": "stdio",
188
+ "description": "SuperLocalMemory V2"
189
+ }
190
+ }
191
+ }
192
+ ```
193
+
194
+ 2. Restart Windsurf
195
+ 3. Check MCP servers in settings
196
+
197
+ **Auto-configured by install.sh:** ✅ Yes
198
+
199
+ ---
200
+
201
+ ### Continue.dev (VS Code)
202
+
203
+ **Configuration File:** `~/.continue/config.yaml` (macOS/Linux)
204
+ **Configuration File:** `%USERPROFILE%\.continue\config.yaml` (Windows)
205
+
206
+ **Steps:**
207
+
208
+ 1. Open VS Code → Continue extension settings
209
+ 2. Or edit `~/.continue/config.yaml` directly:
210
+
211
+ ```yaml
212
+ mcpServers:
213
+ - name: superlocalmemory-v2
214
+ command: python3
215
+ args:
216
+ - /Users/yourusername/.claude-memory/mcp_server.py
217
+ cwd: /Users/yourusername/.claude-memory
218
+ env:
219
+ PYTHONPATH: /Users/yourusername/.claude-memory
220
+ description: SuperLocalMemory V2 - Local memory system
221
+ ```
222
+
223
+ 3. Reload VS Code window (Cmd+Shift+P → Reload Window)
224
+ 4. Verify in Continue extension panel
225
+
226
+ **Auto-configured by install.sh:** ✅ Partial (manual merge if config exists)
227
+
228
+ ---
229
+
230
+ ### OpenAI Codex CLI
231
+
232
+ **Configuration File:** `~/.codex/config.toml`
233
+ **Format:** TOML (not JSON)
234
+
235
+ **Method 1 — CLI command (preferred):**
236
+
237
+ ```bash
238
+ codex mcp add superlocalmemory-v2 \
239
+ --env "PYTHONPATH=/Users/yourusername/.claude-memory" \
240
+ -- python3 /Users/yourusername/.claude-memory/mcp_server.py
241
+ ```
242
+
243
+ **Method 2 — Manual TOML config:**
244
+
245
+ Add to `~/.codex/config.toml`:
246
+
247
+ ```toml
248
+ [mcp_servers.superlocalmemory-v2]
249
+ command = "python3"
250
+ args = ["/Users/yourusername/.claude-memory/mcp_server.py"]
251
+
252
+ [mcp_servers.superlocalmemory-v2.env]
253
+ PYTHONPATH = "/Users/yourusername/.claude-memory"
254
+ ```
255
+
256
+ **Verify:** `codex mcp list` should show `superlocalmemory-v2`
257
+
258
+ **Auto-configured by install.sh:** ✅ Yes
259
+
260
+ ---
261
+
262
+ ### VS Code / GitHub Copilot
263
+
264
+ **Configuration File:** `~/.vscode/mcp.json` (user-level) or `.vscode/mcp.json` (workspace-level)
265
+
266
+ **Important:** VS Code uses `"servers"` (not `"mcpServers"`) and requires `"type": "stdio"`.
267
+
268
+ **Steps:**
269
+
270
+ 1. Create or edit `~/.vscode/mcp.json`:
271
+
272
+ ```json
273
+ {
274
+ "servers": {
275
+ "superlocalmemory-v2": {
276
+ "type": "stdio",
277
+ "command": "python3",
278
+ "args": ["/Users/yourusername/.claude-memory/mcp_server.py"],
279
+ "env": {
280
+ "PYTHONPATH": "/Users/yourusername/.claude-memory"
281
+ }
282
+ }
283
+ }
284
+ }
285
+ ```
286
+
287
+ 2. Restart VS Code
288
+ 3. Copilot Chat should now have access to SuperLocalMemory tools
289
+
290
+ **Auto-configured by install.sh:** ✅ Yes
291
+
292
+ ---
293
+
294
+ ### Gemini CLI
295
+
296
+ **Configuration File:** `~/.gemini/settings.json`
297
+
298
+ **Steps:**
299
+
300
+ 1. Create or edit `~/.gemini/settings.json`:
301
+
302
+ ```json
303
+ {
304
+ "mcpServers": {
305
+ "superlocalmemory-v2": {
306
+ "command": "python3",
307
+ "args": ["/Users/yourusername/.claude-memory/mcp_server.py"],
308
+ "env": {
309
+ "PYTHONPATH": "/Users/yourusername/.claude-memory"
310
+ }
311
+ }
312
+ }
313
+ }
314
+ ```
315
+
316
+ 2. Restart Gemini CLI
317
+ 3. Memory tools will be available in conversations
318
+
319
+ **Auto-configured by install.sh:** ✅ Yes
320
+
321
+ ---
322
+
323
+ ### JetBrains IDEs
324
+
325
+ **Supported:** IntelliJ IDEA, PyCharm, WebStorm, GoLand, and all JetBrains IDEs with AI Assistant (2025.2+)
326
+
327
+ **Steps (GUI-based):**
328
+
329
+ 1. Open your JetBrains IDE
330
+ 2. Go to **Settings → AI Assistant → MCP Servers**
331
+ 3. Click **"+"** to add a new server
332
+ 4. Enter:
333
+ - **Name:** `superlocalmemory-v2`
334
+ - **Command:** `python3`
335
+ - **Arguments:** `/Users/yourusername/.claude-memory/mcp_server.py`
336
+ - **Working Directory:** `/Users/yourusername/.claude-memory`
337
+ - **Environment Variables:** `PYTHONPATH=/Users/yourusername/.claude-memory`
338
+ 5. Click **OK** and restart
339
+
340
+ **JSON template** (for reference): See `configs/jetbrains-mcp.json`
341
+
342
+ ```json
343
+ {
344
+ "mcpServers": {
345
+ "superlocalmemory-v2": {
346
+ "command": "python3",
347
+ "args": ["/Users/yourusername/.claude-memory/mcp_server.py"],
348
+ "env": {
349
+ "PYTHONPATH": "/Users/yourusername/.claude-memory"
350
+ }
351
+ }
352
+ }
353
+ }
354
+ ```
355
+
356
+ **Auto-configured by install.sh:** ❌ No (manual GUI setup required)
357
+
358
+ ---
359
+
360
+ ### Cody (VS Code/JetBrains)
361
+
362
+ **Configuration:** Via VS Code settings or IDE settings
363
+
364
+ **Steps:**
365
+
366
+ 1. Open VS Code → Settings → Extensions → Cody
367
+ 2. Look for "MCP Servers" or "External Tools" section
368
+ 3. Add server configuration:
369
+
370
+ ```json
371
+ {
372
+ "cody.mcpServers": [
373
+ {
374
+ "name": "superlocalmemory-v2",
375
+ "command": "python3",
376
+ "args": ["/Users/yourusername/.claude-memory/mcp_server.py"],
377
+ "cwd": "/Users/yourusername/.claude-memory",
378
+ "env": {
379
+ "PYTHONPATH": "/Users/yourusername/.claude-memory"
380
+ }
381
+ }
382
+ ]
383
+ }
384
+ ```
385
+
386
+ 4. Restart VS Code
387
+ 5. Check Cody status bar for connected MCP servers
388
+
389
+ **Auto-configured by install.sh:** ❌ No (manual setup required)
390
+
391
+ ---
392
+
393
+ ### ChatGPT Desktop App
394
+
395
+ **Important:** ChatGPT requires HTTP transport, not stdio. You need to run a local HTTP server and expose it via a tunnel.
396
+
397
+ **Steps:**
398
+
399
+ 1. **Start the MCP HTTP server:**
400
+ ```bash
401
+ slm serve --port 8001
402
+ # or: python3 ~/.claude-memory/mcp_server.py --transport http --port 8001
403
+ ```
404
+
405
+ 2. **Expose via tunnel** (in another terminal):
406
+ ```bash
407
+ ngrok http 8001
408
+ # or: cloudflared tunnel --url http://localhost:8001
409
+ ```
410
+
411
+ 3. **Copy the HTTPS URL** from ngrok/cloudflared output
412
+
413
+ 4. **Add to ChatGPT:**
414
+ - Open ChatGPT Desktop
415
+ - Go to **Settings → Apps & Connectors → Developer Mode**
416
+ - Add the HTTPS URL as an MCP endpoint
417
+
418
+ 5. In a new chat, look for MCP tools in the tool selector
419
+
420
+ **Note:** 100% local — your MCP server runs on YOUR machine. The tunnel just makes it reachable by ChatGPT.
421
+
422
+ **Auto-configured by install.sh:** ❌ No (requires HTTP transport + tunnel)
423
+
424
+ ---
425
+
426
+ ### Perplexity
427
+
428
+ **Note:** Perplexity AI may support MCP integration via their developer settings.
429
+
430
+ **Steps:**
431
+
432
+ 1. Open Perplexity app
433
+ 2. Go to **Settings → Integrations** or **Settings → Developer**
434
+ 3. Look for **"Custom MCP Servers"** or **"External Tools"**
435
+ 4. Add configuration:
436
+
437
+ ```json
438
+ {
439
+ "name": "SuperLocalMemory V2",
440
+ "command": "python3",
441
+ "args": ["/Users/yourusername/.claude-memory/mcp_server.py"],
442
+ "cwd": "/Users/yourusername/.claude-memory",
443
+ "env": {
444
+ "PYTHONPATH": "/Users/yourusername/.claude-memory"
445
+ }
446
+ }
447
+ ```
448
+
449
+ 5. Save and restart Perplexity
450
+ 6. Check if MCP tools appear in conversation context
451
+
452
+ **Auto-configured by install.sh:** ❌ No (manual setup via app settings)
453
+
454
+ **Note:** MCP support in Perplexity may vary by version. Check their documentation.
455
+
456
+ ---
457
+
458
+ ### Zed Editor
459
+
460
+ **Configuration File:** `~/.config/zed/settings.json`
461
+
462
+ **Steps:**
463
+
464
+ 1. Open Zed → Settings (Cmd+,)
465
+ 2. Click "Open Settings File" (JSON editor)
466
+ 3. Add MCP server configuration:
467
+
468
+ ```json
469
+ {
470
+ "assistant": {
471
+ "mcpServers": {
472
+ "superlocalmemory-v2": {
473
+ "command": "python3",
474
+ "args": ["/Users/yourusername/.claude-memory/mcp_server.py"],
475
+ "cwd": "/Users/yourusername/.claude-memory",
476
+ "env": {
477
+ "PYTHONPATH": "/Users/yourusername/.claude-memory"
478
+ }
479
+ }
480
+ }
481
+ }
482
+ }
483
+ ```
484
+
485
+ 4. Save settings (Cmd+S)
486
+ 5. Restart Zed
487
+ 6. Check assistant panel for available MCP tools
488
+
489
+ **Auto-configured by install.sh:** ❌ No (manual setup required)
490
+
491
+ ---
492
+
493
+ ### HTTP Transport (Remote Access)
494
+
495
+ For any MCP client that requires HTTP transport (ChatGPT, remote access, web-based tools):
496
+
497
+ **Start the HTTP server:**
498
+
499
+ ```bash
500
+ # Using CLI wrapper
501
+ slm serve --port 8001
502
+
503
+ # Using Python directly
504
+ python3 ~/.claude-memory/mcp_server.py --transport http --port 8001
505
+ ```
506
+
507
+ **For local access:**
508
+ ```
509
+ http://localhost:8001
510
+ ```
511
+
512
+ **For remote access (ChatGPT, etc.):**
513
+
514
+ ```bash
515
+ # Option 1: ngrok (free tier available)
516
+ ngrok http 8001
517
+
518
+ # Option 2: Cloudflare Tunnel (free)
519
+ cloudflared tunnel --url http://localhost:8001
520
+ ```
521
+
522
+ Then use the HTTPS URL from the tunnel in your MCP client.
523
+
524
+ **Security note:** The server binds to localhost only. The tunnel is the only way external services can reach it. Your data never leaves your machine — it's served on demand.
525
+
526
+ ---
527
+
528
+ ### Custom MCP Clients
529
+
530
+ If you're building your own MCP client or integrating with a custom tool:
531
+
532
+ **Python Example:**
533
+
534
+ ```python
535
+ from mcp import Client
536
+
537
+ client = Client()
538
+ client.add_server(
539
+ name="superlocalmemory-v2",
540
+ command="python3",
541
+ args=["/Users/yourusername/.claude-memory/mcp_server.py"],
542
+ cwd="/Users/yourusername/.claude-memory",
543
+ env={"PYTHONPATH": "/Users/yourusername/.claude-memory"}
544
+ )
545
+
546
+ # Use the MCP server
547
+ response = client.call_tool("remember", {"content": "Test memory"})
548
+ print(response)
549
+ ```
550
+
551
+ **HTTP Transport (for remote access):**
552
+
553
+ Start MCP server in HTTP mode:
554
+ ```bash
555
+ python3 ~/.claude-memory/mcp_server.py --transport http --port 8001
556
+ ```
557
+
558
+ Then connect via HTTP:
559
+ ```
560
+ http://localhost:8001
561
+ ```
562
+
563
+ ---
564
+
565
+ ## Troubleshooting
566
+
567
+ ### Issue 1: "MCP server not found"
568
+
569
+ **Solution:**
570
+ 1. Verify file exists:
571
+ ```bash
572
+ ls -la ~/.claude-memory/mcp_server.py
573
+ ```
574
+ 2. Check permissions:
575
+ ```bash
576
+ chmod +x ~/.claude-memory/mcp_server.py
577
+ ```
578
+
579
+ ### Issue 2: "ModuleNotFoundError: No module named 'mcp'"
580
+
581
+ **Solution:**
582
+ ```bash
583
+ pip3 install mcp
584
+ # Or if using conda:
585
+ conda install -c conda-forge mcp
586
+ ```
587
+
588
+ ### Issue 3: "Python not found"
589
+
590
+ **Solution:**
591
+ 1. Check Python installation:
592
+ ```bash
593
+ which python3
594
+ ```
595
+ 2. Use full Python path in config:
596
+ ```json
597
+ "command": "/usr/bin/python3"
598
+ ```
599
+
600
+ ### Issue 4: "Cannot import SuperLocalMemory modules"
601
+
602
+ **Solution:**
603
+ 1. Verify `cwd` and `PYTHONPATH` are set in config
604
+ 2. Check modules exist:
605
+ ```bash
606
+ ls ~/.claude-memory/memory_store_v2.py
607
+ ```
608
+
609
+ ### Issue 5: IDE doesn't show MCP tools
610
+
611
+ **Solution:**
612
+ 1. **Completely restart the IDE** (not just reload)
613
+ 2. Check IDE's MCP settings/logs
614
+ 3. Test MCP server manually:
615
+ ```bash
616
+ python3 ~/.claude-memory/mcp_server.py
617
+ # Should start without errors
618
+ ```
619
+
620
+ ### Issue 6: "Config file is overwritten"
621
+
622
+ **Solution:**
623
+ - install.sh creates backups: `mcp_settings.json.backup.YYYYMMDD-HHMMSS`
624
+ - Restore if needed:
625
+ ```bash
626
+ cp ~/.cursor/mcp_settings.json.backup.* ~/.cursor/mcp_settings.json
627
+ ```
628
+
629
+ ---
630
+
631
+ ## Verification
632
+
633
+ After setup, verify MCP integration works:
634
+
635
+ ### 1. Check MCP Server Status
636
+
637
+ ```bash
638
+ python3 ~/.claude-memory/mcp_server.py
639
+ ```
640
+
641
+ **Expected output:**
642
+ ```
643
+ ============================================================
644
+ SuperLocalMemory V2 - MCP Server
645
+ Version: 2.3.0-universal
646
+ ============================================================
647
+
648
+ Transport: stdio
649
+ Database: /Users/yourusername/.claude-memory/memory.db
650
+
651
+ MCP Tools Available:
652
+ - remember(content, tags, project, importance)
653
+ - recall(query, limit, min_score)
654
+ - list_recent(limit)
655
+ - get_status()
656
+ - build_graph()
657
+ - switch_profile(name)
658
+
659
+ ...
660
+ ```
661
+
662
+ ### 2. Test in Your IDE/App
663
+
664
+ Try these natural language commands:
665
+
666
+ **Save a memory:**
667
+ ```
668
+ Remember that SuperLocalMemory V2 MCP integration works perfectly
669
+ ```
670
+
671
+ **Search memories:**
672
+ ```
673
+ What do we know about MCP integration?
674
+ ```
675
+
676
+ **Check status:**
677
+ ```
678
+ What's the status of my memory system?
679
+ ```
680
+
681
+ ### 3. Verify Tools are Visible
682
+
683
+ In your IDE/app, check:
684
+ - **Cursor:** Settings → Tools & MCP → Should show "superlocalmemory-v2" (green)
685
+ - **Claude Desktop:** Tools menu → Should list SuperLocalMemory tools
686
+ - **Continue.dev:** Extension panel → MCP servers section
687
+ - **ChatGPT:** Tool selector in chat → Look for memory tools
688
+
689
+ ---
690
+
691
+ ## Available MCP Tools
692
+
693
+ Once configured, these 6 tools are available:
694
+
695
+ | Tool | Purpose | Example Usage |
696
+ |------|---------|---------------|
697
+ | `remember()` | Save memories | "Remember we use React hooks" |
698
+ | `recall()` | Search memories | "What did we decide about authentication?" |
699
+ | `list_recent()` | Recent memories | "Show me recent discussions" |
700
+ | `get_status()` | System health | "How many memories do I have?" |
701
+ | `build_graph()` | Build knowledge graph | "Build the knowledge graph" |
702
+ | `switch_profile()` | Change profile | "Switch to work profile" |
703
+
704
+ Plus **2 MCP prompts** and **4 MCP resources** for advanced use.
705
+
706
+ ---
707
+
708
+ ## Need Help?
709
+
710
+ 1. **Check logs:** Most IDEs have MCP server logs in their developer tools
711
+ 2. **Test manually:** Run `python3 ~/.claude-memory/mcp_server.py` to see errors
712
+ 3. **GitHub Issues:** https://github.com/varun369/SuperLocalMemoryV2/issues
713
+ 4. **Documentation:** https://github.com/varun369/SuperLocalMemoryV2
714
+
715
+ ---
716
+
717
+ **100% local. 100% private. Works everywhere.**
718
+
719
+ SuperLocalMemory V2 - by Varun Pratap Bhardwaj
720
+ Licensed under MIT License