Add toast for misconfigured logging#706
Merged
olaservo merged 2 commits intomodelcontextprotocol:mainfrom Aug 12, 2025
Merged
Conversation
* In useConnection.ts - During initialization, if there is an error immediately following the client sending 'logging/setLevel', pops up a toast with the message `Server declares logging capability but doesn't implement method "logging/setLevel"`
* In useConnection.ts - During initialization, if there is an error immediately following the client sending 'logging/setLevel', pops up a toast with the message `Server declares logging capability but doesn't implement method "logging/setLevel"`
|
thank you for the fix! I agree this is much better than reverting the PR |
Member
Author
|
Just tagging a PR I made in the Typescript SDK which adds automatic log level handling to the |
This was referenced Sep 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
logging/setLevel, pop up a toast with the messageServer declares logging capability but doesn't implement method "logging/setLevel"Motivation
logging/setLevelmessage during initialization if the server advertises support for theloggingcapability.Context
The MCP spec for logging states two relevant things:
The Inspector is clearly operating in spec. A server that advertises that it supports logging but actually doesn't is operating out of spec.
Other clients in the wild which follow spec will naturally do this and when it fails with them, it's more likely a real "getting in the way of work" problem.
If we revert the automatic setLevel request, we're only encouraging server developers to continue doing the wrong thing. This is after all, a tool for developers to inspect their servers and determine if they're operating correctly.
But clearly a failure to connect with no clear feedback as to why is a poor user experience and doesn't help the developer to diagnose and fix the problem. So we opted to add a toast message when a Method Not Found error is thrown as a result of sending the
logging/setLevelrequest.How Has This Been Tested?
Commented out the request handler for
SetLevelRequestSchemain the server-everything reference server, which declares support for theloggingcapability during the initialization.Breaking Changes
Nope.
Types of changes
Checklist
Additional context
This closes #696 & #699