-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Add periodic stderr messages. #1423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add periodic stderr messages. #1423
Conversation
In everything.ts - add a 10 second interval for sending 'notifications/stderr' messages to the client This was created in order to test the display and clearing of stderr messages in the client. - see modelcontextprotocol/inspector#286
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make this something that can be disabled, in case the user doesn't want notifications firing?
I thought about having an affordance to turn that off in the inspector, but it would mean nothing to any other server you try it with. The everything server is just a good way to see everything in action, so you can look at the code to see "oh, that's how that part works". There isn't anything else to do with it really. We could dial back the frequency to say every 30 seconds or something. It would be enough to reveal the area where error notifications are shown and the clear button that can be used. They don't need to pile up. I'll try that. Come to speak of it, the randomly-leveled log notifications are a little frequent as well. |
- subscription updates: 10 seconds - logging messages: 20 seconds - stderr messages: 30 seconds
Adjusted intervals for outgoing demo messages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me - I think reducing the frequency is a good compromise here.
Add periodic stderr messages and reduce frequency of generated notifcations.
Description
In everything.ts
Server Details
Motivation and Context
The everything server is meant to exercise all the MCP features, and is the goto server for testing features in the Inspector.
One of the features we don't exercise is the sending of
notifications/stderr
messages. They show up in the sidebar, and we had to add special notification handling for that message type in the past.When a new PR came in to the inspector to add a Clear button for clearing those messages, I had no obvious way to test it.
How Has This Been Tested?
Using the inspector:
Screen.Recording.2025-04-14.at.4.59.19.PM.mov
Breaking Changes
Types of changes
Checklist
Additional context