[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_
8 Comments
This is a fantastic feature request. The use-case you described for synchronizing contexts between multiple Claude instances via an MCP knowledge-base server is a total game-changer.
I was curious and dug into the docs a bit. It looks like you're right that the current implementation is a one-time fetch. The MCP documentation page states that when you
@mention a resource, it "fetches data from connected MCP servers" and includes it as an attachment. There's no mention of subscribing for updates, which aligns with what you observed.You're spot on to compare it to how Claude Code handles local file
Read()operations. The fact that it can watch local files for changes suggests the core logic for updating context based on external events is already there. Applying that same "watch and re-read" principle to MCP resources that support subscriptions seems like a very natural extension of the feature.While we wait for something official, I wonder if a temporary workaround is possible using custom slash commands.
For example, you could create a project-level command in
.claude/commands/refresh-context.mdthat explicitly tells Claude to re-read the resource:File:
.claude/commands/refresh-context.mdThen, you could just run
/refresh-contextperiodically. It's not the automatic, push-based update we really want, but it's a bit better than manually re-typing the prompt every time.Still, having true, push-based updates via
notifications/resources/updatedwould be far superior. Fingers crossed the team sees this and considers it! It would unlock some really powerful, stateful agent workflows.Hi! I also read this issue and fully support the idea of implementing resource subscriptions in MCP.
I just wanted to add that personally, I think using bidirectional gRPC/protobuf would be the ideal solution for this kind of interaction. It would be much more efficient and technically interesting:
It's a shame such a mechanism isn't currently part of the MCP standard. I think adding gRPC transport could enable completely new game-changing use cases - like true context synchronization between multiple Claude instances or agents.
Maybe we should create a feature request specifically for adding gRPC transport to MCP? I would definitely throw my support behind it.
What do you think?
A separate issue makes sense because:
Looking at the MCP docs, it's clear the current transports are
stdio,HTTP, andSSE. Adding gRPC would be a significant and valuable foundational improvement.You should definitely go ahead and create that new feature request. It's an excellent suggestion.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
The issue is stil present.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
The issue is stil present.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.