superlocalmemory 2.3.0 → 2.3.1
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.
- package/bin/slm +9 -4
- package/mcp_server.py +18 -8
- package/package.json +1 -1
package/bin/slm
CHANGED
|
@@ -35,8 +35,13 @@ case "$1" in
|
|
|
35
35
|
|
|
36
36
|
list|ls)
|
|
37
37
|
shift
|
|
38
|
-
#
|
|
39
|
-
"
|
|
38
|
+
# Convert positional number to --limit flag
|
|
39
|
+
# e.g., "slm list 5" becomes "--limit 5"
|
|
40
|
+
if [ -n "$1" ] && [[ "$1" =~ ^[0-9]+$ ]]; then
|
|
41
|
+
"$SLM_DIR/bin/superlocalmemoryv2:list" --limit "$1"
|
|
42
|
+
else
|
|
43
|
+
"$SLM_DIR/bin/superlocalmemoryv2:list" "$@"
|
|
44
|
+
fi
|
|
40
45
|
;;
|
|
41
46
|
|
|
42
47
|
status|info|stats)
|
|
@@ -57,7 +62,7 @@ case "$1" in
|
|
|
57
62
|
;;
|
|
58
63
|
|
|
59
64
|
serve|server)
|
|
60
|
-
PORT="${2:-
|
|
65
|
+
PORT="${2:-8417}"
|
|
61
66
|
echo "Starting SuperLocalMemory MCP HTTP server..."
|
|
62
67
|
echo "Endpoint: http://localhost:$PORT"
|
|
63
68
|
echo ""
|
|
@@ -142,7 +147,7 @@ PATTERN LEARNING:
|
|
|
142
147
|
slm patterns context [threshold] Get coding identity context
|
|
143
148
|
|
|
144
149
|
HTTP SERVER:
|
|
145
|
-
slm serve [PORT] Start MCP HTTP server (default port
|
|
150
|
+
slm serve [PORT] Start MCP HTTP server (default port 8417)
|
|
146
151
|
For ChatGPT/remote: ngrok http PORT
|
|
147
152
|
|
|
148
153
|
ADVANCED:
|
package/mcp_server.py
CHANGED
|
@@ -46,9 +46,18 @@ except ImportError as e:
|
|
|
46
46
|
print(f"Ensure SuperLocalMemory V2 is installed at {MEMORY_DIR}", file=sys.stderr)
|
|
47
47
|
sys.exit(1)
|
|
48
48
|
|
|
49
|
+
# Parse command line arguments early (needed for port in constructor)
|
|
50
|
+
import argparse as _argparse
|
|
51
|
+
_parser = _argparse.ArgumentParser(add_help=False)
|
|
52
|
+
_parser.add_argument("--transport", default="stdio")
|
|
53
|
+
_parser.add_argument("--port", type=int, default=8417)
|
|
54
|
+
_pre_args, _ = _parser.parse_known_args()
|
|
55
|
+
|
|
49
56
|
# Initialize MCP server
|
|
50
57
|
mcp = FastMCP(
|
|
51
|
-
name="SuperLocalMemory V2"
|
|
58
|
+
name="SuperLocalMemory V2",
|
|
59
|
+
host="127.0.0.1",
|
|
60
|
+
port=_pre_args.port,
|
|
52
61
|
)
|
|
53
62
|
|
|
54
63
|
# Database path
|
|
@@ -523,15 +532,15 @@ if __name__ == "__main__":
|
|
|
523
532
|
)
|
|
524
533
|
parser.add_argument(
|
|
525
534
|
"--transport",
|
|
526
|
-
choices=["stdio", "http"],
|
|
535
|
+
choices=["stdio", "http", "sse"],
|
|
527
536
|
default="stdio",
|
|
528
|
-
help="Transport method: stdio for local IDEs (default), http for remote access"
|
|
537
|
+
help="Transport method: stdio for local IDEs (default), http/sse for remote access"
|
|
529
538
|
)
|
|
530
539
|
parser.add_argument(
|
|
531
540
|
"--port",
|
|
532
541
|
type=int,
|
|
533
|
-
default=
|
|
534
|
-
help="Port for HTTP transport (default
|
|
542
|
+
default=8417,
|
|
543
|
+
help="Port for HTTP transport (default 8417)"
|
|
535
544
|
)
|
|
536
545
|
|
|
537
546
|
args = parser.parse_args()
|
|
@@ -580,6 +589,7 @@ if __name__ == "__main__":
|
|
|
580
589
|
# stdio transport for local IDEs (default)
|
|
581
590
|
mcp.run(transport="stdio")
|
|
582
591
|
else:
|
|
583
|
-
#
|
|
584
|
-
|
|
585
|
-
|
|
592
|
+
# SSE transport for remote access (ChatGPT, web clients)
|
|
593
|
+
# "http" is accepted as alias for "sse"
|
|
594
|
+
print(f"HTTP/SSE server will be available at http://localhost:{args.port}", file=sys.stderr)
|
|
595
|
+
mcp.run(transport="sse")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superlocalmemory",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "Your AI Finally Remembers You - Local-first intelligent memory system for AI assistants. Works with Claude, Cursor, Windsurf, VS Code/Copilot, Codex, and 16+ AI tools. 100% local, zero cloud dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-memory",
|