Summary
mcp_server.py declares _client_cache = None and _collection_cache = None twice at module level:
- Lines 66-67: initial declaration
- Lines 103-104: second declaration after the WAL setup block
The second declaration silently resets both caches. Currently harmless on a cold import, but any code inserted between the two blocks that sets these caches would have its state wiped. Signals the WAL setup was retrofitted and initialization ordering is fragile.
Fix
Remove the duplicate declarations at lines 103-104.
Summary
mcp_server.pydeclares_client_cache = Noneand_collection_cache = Nonetwice at module level:The second declaration silently resets both caches. Currently harmless on a cold import, but any code inserted between the two blocks that sets these caches would have its state wiped. Signals the WAL setup was retrofitted and initialization ordering is fragile.
Fix
Remove the duplicate declarations at lines 103-104.