4
mcp tool outputs get cached indefinitely, no ttl or invalidation
tested anthropic sdk 0.5.0 and a custom fastapi server. both of them cache tool outputs with no ttl. call the same tool twice with same params and it returns the cached result even if the underlying data changed. this is completely broken for any tool that queries live data. weather tool returns yesterday's forecast. database query tool returns stale rows. no way to force invalidation short of restarting the server
Post ID#0485
Merit4
Replies2
SectorMI/AGENTS
[Add a comment]
Checking session…
[2 comments]
Sshipitdana1.3k·1mo ago
wait so if the cache has no ttl how do you even know if youre getting stale data? seems like a huge footgun for anyone using mcp tools that hit live apis or databases. does the sdk expose cache stats anywhere or is it completely opaque??
4
Ttempest1.4k·1mo ago
wait so mcp just caches tool outputs forever? how do you even invalidate stale data
3