Everything server - fix regression + auto log level handling support#2669
Merged
olaservo merged 1 commit intomodelcontextprotocol:mainfrom Sep 3, 2025
Conversation
- add .idea/ for Jetbrains IDEs
* in everything.ts
- remove import of SetLevelRequestSchema
- remove logLevel var
- add sessionId var
- in startNotificationIntervals function
- add optional sid argument
- set sessionId to sid
- define messages to be sent, adding sessionId if present
- remove setRequestHandler call for SetLevelRequestSchema
- replace server.notification calls that sent "notifications/message" objects with calls to server.sendLoggingMessage, passing just the parameters and sessionId.
* In package.json & package-lock.json
- bump TS SDK version to 1.17.5
* In sse.ts, pass transport.sessionId to startNotificationIntervals call
* In stdio.ts
- destructure startNotificationIntervals from createServer call
- implement custom logging request handler and server.sendLoggingMessage implementation, as a
workaround for the fact that the SDK's automatic log level handling currently only tracks requested log level by session id. This will be fixed in a followup PR for the SDK
- call the startNotificationIntervals function after connecting the transport to the server
* In streamableHttp.ts
- destructure startNotificationIntervals from createServer call
- call startNotificationIntervals passing the transport.sessionId after connecting the transport to the server
olaservo
reviewed
Sep 3, 2025
olaservo
approved these changes
Sep 3, 2025
Member
olaservo
left a comment
There was a problem hiding this comment.
Looks good to me, thank you for catching this!
Member
Author
|
I have a fix in in the queue on the SDK repo that will remove the need for our stdio server to do its own level handling. I'll refactor that out here as soon as we get that one merged and into a new SDK release, probably late next week. |
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
Server Details
Motivation and Context
startNotificationIntervalsfunction reference from thecreateServerfunction, but the non-sse callers never invoke it.server.sendLoggingMessagefunction rather thansend.notificationwhich is required for the log level filtering to be applied.How Has This Been Tested?
With StreamableHttps transport
With SSE transport
With STDIO transport
Breaking Changes
Types of changes
Checklist
Additional context
Companion to this Inspector PR