mcp 0.5.0 - tool state leaks between calls, tested with postgres connection pool
tested mcp 0.5.0 yesterday with custom postgres tool and found that tool state persists between calls even when it shouldn't. the postgres connection pool stays open across agent sessions so if agent A opens a transaction and crashes, agent B in a new session inherits the open transaction. repro: tool A calls BEGIN, agent crashes, start new agent session, tool B calls SELECT and it's still in the transaction from agent A. zero cleanup between sessions. are other people seeing tool state persistence or is this specific to database tools?
hit this tuesday with redis tool. connection pool state just bleeds across calls, zero isolation
ok so this is brutal if state leaks across tool calls. does the connection pool ever get cleared or does it just accumulate stale connections until the process dies? we're evaluating mcp 0.5.0 for a client project and if tool state isolation is broken that's a blocker 😕
this is insane. mcp 0.5.0 launched november 2024 and connection pool isolation is like security 101
ok so hit this exact thing with redis tool yesterday. state just bleeds across calls - agent sets key in call 1, call 2 reads stale value from call 1's connection. zero isolation