Immutable solution version
MCP server: get_episodes and delete_episode query the wrong graph on FalkorDB (bypass per-group routing)
Complete solution
Practical fix from a real Zep issue: MCP server: get_episodes and delete_episode query the wrong graph on FalkorDB (bypass per-group rout
When it applies
Not specified by the original author.
Instructions
[RemanenetSpy (commenter)]: The root cause is storing mutable tenant state on the shared driver (self.driver = self.driver.clone(database=group_id)). In an async MCP runtime, concurrent tool calls create a race condition where read tools query the database of whichever group executed last. The structural fix is replacing mutable driver rebinding with Stateless Per-Request Graph Execution: ```python from typing import Optional, Dict, Any from falkordb import FalkorDB, Graph class MultiTenantGraphitiDriver: def init(self, client: FalkorDB, defaultgroup: str = "default"): self.client = client self.defaultgroup = defaultgroup def getgraph(self, groupid: Optional[str] = None) -> Graph: """Stateless resolution: returns graph handle without mutating shared state.""" targetgroup = groupid or self.defaultgro
Context: GitHub issue getzep/graphiti#1651 (closed, 11 comments): ## Bug description On FalkorDB every group_id is a separate graph (multi-tenant), but the MCP server's get_episodes and delete_episode tools query whatever graph the shared driver happens to be bound to , default_db at startup, or the graph of the last-written group after any add_episode (which rebinds the driver via self.driver = self.driver.clone(database=group_id)). Neither tool routes to the graph of the requested group, so on FalkorDB they operate on the wrong graph and report data as missing that demonstrably exists. This is distinct from #1161 / #1325 (single-group routi
Evidence
GitHub issue getzep/graphiti#1651 (closed, 11 comments): ## Bug description On FalkorDB every group_id is a separate graph (multi-tenant), but the MCP server's get_episodes and delete_episode tools query whatever graph the shared driver happens to be bound to , default_db at startup, or the graph of the last-written group after any add_episode (which rebinds the driver via self.driver = self.driver.clone(database=group_id)). Neither tool routes to the graph of the requested group, so on FalkorDB they operate on the wrong graph and report data as missing that demonstrably exists. This is distinct from #1161 / #1325 (single-group routi Verified answer: [RemanenetSpy (commenter)]: The root cause is storing mutable tenant state on the shared driver (self.driver = self.driver.clone(database=group_id)). In an async MCP runtime, concurrent tool calls create a race condition where read tools query the database of whichever group executed last. The structural fix is replacing mutable driver rebinding with Stateless Per-Request Graph Execution: ```python from typing import Optional, Dict, Any from falkordb import FalkorDB, Graph class MultiTenantGraphitiDriver: def init(self, client: FalkorDB, defaultgroup: str = "default"): self.client = client self.defaultgroup = defaultgroup def getgraph(self, groupid: Optional[str] = None) -> Graph: """Stateless resolution: returns graph handle without mutating shared state.""" targetgroup = groupid or self.defaultgro Source: https://github.com/getzep/graphiti/issues/1651
By @issueatlas · Version 1 · Exact version
Maintainer review
Checking maintainer review for this exact version…
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_M8ogGjhUJ3UJCW4xWyauTw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">MCP server: get_episodes and delete_episode query the wrong graph on FalkorDB (bypass per-group routing) <span>— Vectle</span></a>