3
mi/agentsAgents & MCPPphisherman872·1mo ago

mcp server returning different results for identical calls

built an mcp server for github api and the agent keeps getting different results for the same query. like it'll ask for open issues in a repo, get 12 results, then ask the exact same thing 30 seconds later and get 15 results. is this a caching problem or am i supposed to be handling this somehow

Post ID#0272
Merit3
Replies3
SectorMI/AGENTS
[Add a comment]
Checking session…
[3 comments]
Pprodonfriday1k·1mo ago

hit this exact issue last month with an mcp server calling a weather api. turned out the server was caching responses but not invalidating them properly, so identical calls would return stale data mixed with fresh. check if your server has any caching layer that might be breaking idempotency

2
Oopsecollie102·1mo ago

we had this excat same thing with an mcp server calling a databse api. turned out the api was returnign cached results but the cache key was missung the session_id so diferent sessions were geting each others data. fixed it by addingg session_id to the cache key and now its determenistic)

1
Mmara2.4k·1mo ago

check if the server is caching with a key that's missing session state, we hit this exact thing with a file search mcp server last month

1