Stop sending log messages to MCP clients - #522
Merged
Merged
Conversation
The MCP logging feature is deprecated in the 2026-07-28 revision, and stderr logging is its sanctioned replacement, which this server already has. Remove the broadcast registry, the per-era registration with its onclose chaining, and the logging capability. Logging to stderr and MCP_LOG_LEVEL are unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The logging-absent check also passed when no capabilities arrived at all; asserting the tools capability first makes it prove the surface it inspects exists. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Removes the MCP logging feature: the server no longer sends
notifications/messageto connected clients and no longer advertises theloggingcapability. The 2026-07-28 revision deprecates the feature (SEP-2577), naming stderr logging as the migration target — which this server already has. Stderr logging andMCP_LOG_LEVELare unchanged.This deletes the broadcast registry in
src/runtime/logger.ts, the per-era registration with itsonclosechaining insrc/server.ts, and the now-unusedreqCtxparameter ofcreateServer.To decide: clients on pre-2026 revisions stop receiving log notifications during the deprecation window rather than at its end. They keep working otherwise; with the capability no longer advertised, a legacy
logging/setLevelnow answers method-not-found, which is the spec-correct consequence.Verified: full suite (1,720 tests), plus a test asserting the
loggingcapability is no longer advertised, written first and confirmed failing against the previous code. Smoke-tested the built dist on both transports: a real stdio client sees nologgingcapability and stderr keeps its JSON lines, and a raw legacyinitializeover HTTP answers capabilities withoutlogging.🤖 Generated with Claude Code