mem0-open-mcp 0.1.3__py3-none-any.whl → 0.1.5__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mem0-open-mcp
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  Summary: Open-source MCP server for mem0 - local LLMs, self-hosted, Docker-free
5
5
  Author: Alex
6
6
  License-Expression: Apache-2.0
@@ -80,17 +80,20 @@ mem0-open-mcp init
80
80
  # Interactive configuration wizard
81
81
  mem0-open-mcp configure
82
82
 
83
+ # Test configuration (recommended for initial setup)
84
+ mem0-open-mcp test
85
+
83
86
  # Start the server
84
87
  mem0-open-mcp serve
85
88
 
86
- # Test configuration before starting (recommended for initial setup)
89
+ # Test and start server
87
90
  mem0-open-mcp serve --test
88
91
 
89
92
  # With options
90
93
  mem0-open-mcp serve --port 8765 --user-id alice
91
94
  ```
92
95
 
93
- The `--test` flag runs connectivity and memory tests before starting the server:
96
+ The `test` command verifies your configuration without starting the server:
94
97
  - Checks Vector Store, LLM, and Embedder connections
95
98
  - Performs actual memory add/search operations
96
99
  - Cleans up test data automatically
@@ -1,5 +1,5 @@
1
1
  mem0_server/__init__.py,sha256=FrcCqmcA_VSR57xjgdQ1obSrsSzxDsDsXdEGSdVhUq0,379
2
- mem0_server/cli.py,sha256=TVjbm-pSj4-yS0uZ1qZcqMlGtL__JyZm6S5gBkkqvdU,24363
2
+ mem0_server/cli.py,sha256=IcR7eTQjJvYVwENLctbNGd7Ej1AAtX3BekTIDbhdj5A,25962
3
3
  mem0_server/server.py,sha256=Obc2eZaAYuZdUgYpOY8qWwbOXgc3w1vRmmEF3tc0gdI,12494
4
4
  mem0_server/api/__init__.py,sha256=JOOnrq3v7yym3xotMkOUAoZj1zjhI8C_a1wEdbpCakQ,122
5
5
  mem0_server/api/routes.py,sha256=fBOeQ1kckEa9Nr57cutCunhG9D1J5zYrv9sFiYcZ1yQ,21743
@@ -9,7 +9,7 @@ mem0_server/config/schema.py,sha256=HnFWUR4KxwHkyukFw_ptMCHt7K26Zl7AU02-5jdtjL4,
9
9
  mem0_server/mcp/__init__.py,sha256=8BWWjlJj5_jdeUuQFN4i5hm5Zd3Pk0cCR2Vf0G4eUB4,127
10
10
  mem0_server/mcp/server.py,sha256=Y_f8upEtvjr0JjZaUQ4YWLRrof9btR2ds8FL2DucCZI,184
11
11
  mem0_server/utils/__init__.py,sha256=GvVR3Tz4OmU2gRGCbTyQg5Xip5cAx7KW6ToIh2sKA4w,41
12
- mem0_open_mcp-0.1.3.dist-info/METADATA,sha256=2P1mwFuVOFhugcDwJ7KmF_nRLszRkJDAbCvO1eveuBg,4937
13
- mem0_open_mcp-0.1.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
14
- mem0_open_mcp-0.1.3.dist-info/entry_points.txt,sha256=WXqVdvwhFvMkzAmNtdlHlRZV23yikM43BtB8S4F9ByE,54
15
- mem0_open_mcp-0.1.3.dist-info/RECORD,,
12
+ mem0_open_mcp-0.1.5.dist-info/METADATA,sha256=aXza5vrdT6hLelN4pLFGGMfTwT-sl_R4UYjZ3epZ8Mg,4960
13
+ mem0_open_mcp-0.1.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
14
+ mem0_open_mcp-0.1.5.dist-info/entry_points.txt,sha256=WXqVdvwhFvMkzAmNtdlHlRZV23yikM43BtB8S4F9ByE,54
15
+ mem0_open_mcp-0.1.5.dist-info/RECORD,,
mem0_server/cli.py CHANGED
@@ -35,6 +35,14 @@ UPDATE_CHECK_CACHE = Path.home() / ".cache" / "mem0-open-mcp" / "update_check.js
35
35
  UPDATE_CHECK_INTERVAL = 86400 # 24 hours
36
36
 
37
37
 
38
+ def _parse_version(v: str) -> tuple[int, ...]:
39
+ """Parse version string to tuple for comparison."""
40
+ try:
41
+ return tuple(int(x) for x in v.split(".")[:3])
42
+ except (ValueError, AttributeError):
43
+ return (0, 0, 0)
44
+
45
+
38
46
  def _check_for_updates() -> None:
39
47
  """Check PyPI for newer version (once per day)."""
40
48
  try:
@@ -44,9 +52,10 @@ def _check_for_updates() -> None:
44
52
  if UPDATE_CHECK_CACHE.exists():
45
53
  cache = json.loads(UPDATE_CHECK_CACHE.read_text())
46
54
  if now - cache.get("last_check", 0) < UPDATE_CHECK_INTERVAL:
47
- if cache.get("latest") and cache["latest"] != __version__:
55
+ latest = cache.get("latest")
56
+ if latest and _parse_version(latest) > _parse_version(__version__):
48
57
  console.print(
49
- f"[yellow]Update available: {__version__} → {cache['latest']}[/yellow]\n"
58
+ f"[yellow]Update available: {__version__} → {latest}[/yellow]\n"
50
59
  f"[dim] pip install --upgrade mem0-open-mcp[/dim]\n"
51
60
  )
52
61
  return
@@ -58,7 +67,7 @@ def _check_for_updates() -> None:
58
67
 
59
68
  UPDATE_CHECK_CACHE.write_text(json.dumps({"last_check": now, "latest": latest}))
60
69
 
61
- if latest != __version__:
70
+ if _parse_version(latest) > _parse_version(__version__):
62
71
  console.print(
63
72
  f"[yellow]Update available: {__version__} → {latest}[/yellow]\n"
64
73
  f"[dim] pip install --upgrade mem0-open-mcp[/dim]\n"
@@ -340,6 +349,46 @@ def serve(
340
349
  raise typer.Exit(1) from None
341
350
 
342
351
 
352
+ @app.command()
353
+ def test(
354
+ config_file: Annotated[
355
+ Path | None,
356
+ typer.Option(
357
+ "--config", "-c",
358
+ help="Path to configuration file (YAML or JSON).",
359
+ exists=True,
360
+ ),
361
+ ] = None,
362
+ ) -> None:
363
+ """Test connectivity and memory operations without starting server.
364
+
365
+ Examples:
366
+ mem0-open-mcp test
367
+ mem0-open-mcp test --config ./my-config.yaml
368
+ """
369
+ loader = ConfigLoader(config_file)
370
+ config = loader.load()
371
+
372
+ console.print(Panel.fit(
373
+ f"[bold green]mem0-open-mcp[/bold green] v{__version__}\n"
374
+ f"[dim]Configuration Test[/dim]",
375
+ border_style="green",
376
+ ))
377
+
378
+ console.print("\n[bold]Configuration:[/bold]")
379
+ console.print(f" LLM: [cyan]{config.llm.provider.value}[/cyan] / {config.llm.config.model}")
380
+ console.print(f" Embedder: [cyan]{config.embedder.provider.value}[/cyan] / {config.embedder.config.model}")
381
+ console.print(f" Vector Store: [cyan]{config.vector_store.provider.value}[/cyan]")
382
+ console.print()
383
+
384
+ if not _run_connectivity_tests(config):
385
+ raise typer.Exit(1)
386
+ if not _run_memory_tests(config):
387
+ raise typer.Exit(1)
388
+
389
+ console.print("[bold green]All tests passed! Configuration is ready.[/bold green]")
390
+
391
+
343
392
  @app.command()
344
393
  def configure(
345
394
  config_file: Annotated[