mem0-open-mcp 0.1.8__tar.gz → 0.1.10__tar.gz
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.
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/PKG-INFO +1 -1
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/pyproject.toml +1 -1
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/src/mem0_server/cli.py +17 -12
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/src/mem0_server/config/loader.py +3 -4
- mem0_open_mcp-0.1.10/uv.lock +3191 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/.env.example +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/.github/workflows/publish.yml +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/.gitignore +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/Dockerfile +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/README.md +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/docker-compose.yaml +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/examples/ollama-config.yaml +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/mem0-open-mcp.example.yaml +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/src/mem0_server/__init__.py +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/src/mem0_server/api/__init__.py +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/src/mem0_server/api/routes.py +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/src/mem0_server/config/__init__.py +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/src/mem0_server/config/schema.py +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/src/mem0_server/mcp/__init__.py +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/src/mem0_server/mcp/server.py +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/src/mem0_server/server.py +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/src/mem0_server/utils/__init__.py +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/tests/test_api.py +0 -0
- {mem0_open_mcp-0.1.8 → mem0_open_mcp-0.1.10}/tests/test_config.py +0 -0
|
@@ -204,7 +204,7 @@ def _run_memory_tests(config: Mem0ServerConfig) -> bool:
|
|
|
204
204
|
console.print("[bold]Running memory tests...[/bold]\n")
|
|
205
205
|
|
|
206
206
|
test_user_id = f"__test_user_{uuid.uuid4().hex[:8]}"
|
|
207
|
-
test_memory_text = "
|
|
207
|
+
test_memory_text = "My name is TestUser and I prefer dark mode. I work as a software engineer."
|
|
208
208
|
max_retries = 20
|
|
209
209
|
retry_interval = 0.5
|
|
210
210
|
|
|
@@ -220,15 +220,16 @@ def _run_memory_tests(config: Mem0ServerConfig) -> bool:
|
|
|
220
220
|
console.print(" [dim]1. Adding test memory...[/dim]", end=" ")
|
|
221
221
|
add_result = memory.add(test_memory_text, user_id=test_user_id)
|
|
222
222
|
memory_id = None
|
|
223
|
-
if add_result and add_result.get("results"):
|
|
223
|
+
if add_result and add_result.get("results") and len(add_result["results"]) > 0:
|
|
224
224
|
first_result = add_result["results"][0]
|
|
225
225
|
memory_id = first_result.get("id") if first_result else None
|
|
226
226
|
if memory_id:
|
|
227
227
|
console.print(f"[green]✓ Added (id: {memory_id[:8]}...)[/green]")
|
|
228
228
|
else:
|
|
229
|
-
console.print("[
|
|
229
|
+
console.print("[yellow]⚠ No memory extracted by LLM[/yellow]")
|
|
230
230
|
else:
|
|
231
|
-
console.print("[
|
|
231
|
+
console.print("[yellow]⚠ No memory extracted by LLM[/yellow]")
|
|
232
|
+
console.print(f" [dim]add_result: {add_result}[/dim]")
|
|
232
233
|
|
|
233
234
|
# 2. List memories (with retry)
|
|
234
235
|
console.print(" [dim]2. Listing memories...[/dim]", end=" ")
|
|
@@ -765,11 +766,11 @@ def status(
|
|
|
765
766
|
@app.command()
|
|
766
767
|
def init(
|
|
767
768
|
path: Annotated[
|
|
768
|
-
Path,
|
|
769
|
+
Path | None,
|
|
769
770
|
typer.Argument(
|
|
770
|
-
help="Path to create configuration file.",
|
|
771
|
+
help="Path to create configuration file. Defaults to ~/.config/mem0-open-mcp.yaml",
|
|
771
772
|
),
|
|
772
|
-
] =
|
|
773
|
+
] = None,
|
|
773
774
|
force: Annotated[
|
|
774
775
|
bool,
|
|
775
776
|
typer.Option("--force", "-f", help="Overwrite existing file."),
|
|
@@ -782,15 +783,19 @@ def init(
|
|
|
782
783
|
mem0-open-mcp init ./config.yaml
|
|
783
784
|
mem0-open-mcp init --force
|
|
784
785
|
"""
|
|
785
|
-
|
|
786
|
-
|
|
786
|
+
default_path = Path.home() / ".config" / "mem0-open-mcp.yaml"
|
|
787
|
+
target_path = path if path else default_path
|
|
788
|
+
|
|
789
|
+
if target_path.exists() and not force:
|
|
790
|
+
console.print(f"[red]File already exists: {target_path}[/red]")
|
|
787
791
|
console.print("[dim]Use --force to overwrite[/dim]")
|
|
788
792
|
raise typer.Exit(1)
|
|
789
793
|
|
|
790
|
-
saved_path = ConfigLoader.create_default_config_file(
|
|
791
|
-
console.print(f"[green]✓[/green] Created
|
|
794
|
+
saved_path = ConfigLoader.create_default_config_file(target_path)
|
|
795
|
+
console.print(f"[green]✓[/green] Created configuration file:")
|
|
796
|
+
console.print(f" [cyan]{saved_path.absolute()}[/cyan]")
|
|
792
797
|
console.print("\n[dim]Edit the file to customize your settings, then run:[/dim]")
|
|
793
|
-
console.print(
|
|
798
|
+
console.print(" [bold]mem0-open-mcp serve[/bold]")
|
|
794
799
|
|
|
795
800
|
|
|
796
801
|
if __name__ == "__main__":
|
|
@@ -28,13 +28,12 @@ class ConfigLoader:
|
|
|
28
28
|
"""Load and save mem0-server configuration from various sources."""
|
|
29
29
|
|
|
30
30
|
DEFAULT_CONFIG_PATHS = [
|
|
31
|
+
Path.home() / ".config" / "mem0-open-mcp.yaml",
|
|
32
|
+
Path.home() / ".config" / "mem0-open-mcp.yml",
|
|
33
|
+
Path.home() / ".config" / "mem0-open-mcp.json",
|
|
31
34
|
Path("mem0-open-mcp.yaml"),
|
|
32
35
|
Path("mem0-open-mcp.yml"),
|
|
33
36
|
Path("mem0-open-mcp.json"),
|
|
34
|
-
Path("mem0-open-mcp.yaml"),
|
|
35
|
-
Path("mem0-server.yml"),
|
|
36
|
-
Path.home() / ".config" / "mem0-open-mcp" / "config.yaml",
|
|
37
|
-
Path.home() / ".mem0-open-mcp.yaml",
|
|
38
37
|
]
|
|
39
38
|
|
|
40
39
|
def __init__(self, config_path: Path | str | None = None):
|