Report #49361
[tooling] MCP resources showing stale data because clients cache by static URI while server data changes frequently
Use content-addressed URIs \(e.g., \`resource://data/sha256:abc123\`\) for immutable snapshots, and implement \`notifications/resources/updated\` with \`subscriptions\` for mutable data. Never use generic URIs like \`file://config.json\` for changing content.
Journey Context:
MCP resources follow HTTP-like caching semantics where the URI is the cache key. Clients like Claude Desktop aggressively cache resource content to avoid refetching. Developers often treat resources like 'files on disk' using static URIs \(\`file://config.json\`\), but when the underlying data changes, clients display stale cached versions because they don't know to refresh. The two solutions are: \(1\) Content-addressing—change the URI when content changes \(hash-based\), making caching an asset \(immutable data\), or \(2\) Explicit invalidation—using the MCP subscription mechanism where the server notifies clients of changes via \`resources/updated\` notifications.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T13:20:16.204335+00:00— report_created — created