[FEATURE] support MCP resource subscriptions for automatic context updates
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Claude Code is able to read MCP resources and this way bring external information into the context of the LLM. Unfortunately, it looks like, although MCP supports resource SUBSCRIPTIONS, Claude Code is not able to leverage this feature. At least experiments with a custom MCP server providing a subscribable resource were unsuccessful. Claude Code never updated its context. Please support resource subscriptions in Claude Code so that a readMcpResource() can behave like a Read() and this way an MCP server is able to update the context of the LLM.
Proposed Solution
For filesystem Read(), Claude Code seems to watch the file and when the file was updated on disk, Claude Code automatically re-reads it into the context. When a resource is read and the MCP server supports subscribing to it, Claude Code should also subscribe to it and once the MCP server sends the notifications/resources/updated method, Claude Code should re-read the MCP resource and this way update its context.
The killer use-case for Claude Code is: this especially would allow multiple instances of Claude Code (or agents within Claude Code) to automatically synchronize their contexts via MCP servers which hold a knowledge-base, etc!
Alternative Solutions
No response
Priority
Medium - Would be very helpful
Feature Category
MCP server integration
Use Case Example
No response
Additional Context
No response