mcp-observer-server
- subscribe to get push notifications about resource changes from the server
#391
hesreallyhim
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
What would you like to share?
https://github.com/hesreallyhim/mcp-observer-server
I'm working on a server that will send server-to-client notifications about file-system changes - e.g., if you're working on a file, and you save your changes, the client is notified, and can react. This has been a major pain point for me in working with assistants like Claude Code - if CC doesn't make the change itself, or you don't tell it what you did - then it's totally in the dark until it tries to work with the file again and sees that it's changed (you know those notifications saying "File has changed since last read, I should read it again"). I want a coding assistant that can watch and be aware of what's going on in my codebase without having to give it updates, or have it do all the changes itself.
I see a lot of use cases for this - e.g. a coding agent who is watching your work, can catch silly mistakes, stays up to date on what changes are going on, updates doc-strings or type hints in real-time, provides feedback as you go if you want.
I'm sharing the bare minimum functionality as a POC because I want to share my design, so this is an MCP server that allows you to subscribe to files/directories to watch for changes, and the server will send notifications to the client when there is a change. It exposes files/directories as resources, uses watchdog to listen for changes, and leverages the "resources/changed" subscription/notification functionality defined in the spec to allow clients to set up notifications.
Sadly, this part of the protocol (resource-changed subscriptions) is not supported by many clients (even, so I've heard, ClaudeAI/Desktop/Code), and I haven't taken time to find any "real" clients that work with it - but luckily, Inspector implements the protocol really well, so you can observe and play around with the POC in Inspector. There is a demo/screenshots in the repo.
Please take a look if you're interested, happy to answer any Q's or discuss it, give it a star or two, and let me know if you happen to try it out with a "real" client. (Caution, of course, it's just a POC) Thanks!
Relevant Links
https://github.com/hesreallyhim/mcp-observer-server
Beta Was this translation helpful? Give feedback.
All reactions