Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

fix(mcp): operator precedence in search_memory filter (#4470) (#4474)

Himanshuec326f0f925f
diff --git a/openmemory/api/app/mcp_server.py b/openmemory/api/app/mcp_server.py
index 459aaf760..3fcacc4aa 100644
--- a/openmemory/api/app/mcp_server.py
+++ b/openmemory/api/app/mcp_server.py
@@ -184,7 +184,7 @@ async def search_memory(query: str) -> str:
for h in hits:
# All vector db search functions return OutputData class
id, score, payload = h.id, h.score, h.payload
- if allowed and h.id is None or h.id not in allowed:
+ if allowed and (h.id is None or h.id not in allowed):
continue
results.append({