Skip to content

Stop sending log messages to MCP clients - #522

Merged
alistair3149 merged 2 commits into
masterfrom
drop-mcp-client-logging
Jul 30, 2026
Merged

Stop sending log messages to MCP clients#522
alistair3149 merged 2 commits into
masterfrom
drop-mcp-client-logging

Conversation

@alistair3149

@alistair3149 alistair3149 commented Jul 30, 2026

Copy link
Copy Markdown
Member

Removes the MCP logging feature: the server no longer sends notifications/message to connected clients and no longer advertises the logging capability. The 2026-07-28 revision deprecates the feature (SEP-2577), naming stderr logging as the migration target — which this server already has. Stderr logging and MCP_LOG_LEVEL are unchanged.

This deletes the broadcast registry in src/runtime/logger.ts, the per-era registration with its onclose chaining in src/server.ts, and the now-unused reqCtx parameter of createServer.

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/setLevel now answers method-not-found, which is the spec-correct consequence.

Verified: full suite (1,720 tests), plus a test asserting the logging capability 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 no logging capability and stderr keeps its JSON lines, and a raw legacy initialize over HTTP answers capabilities without logging.

🤖 Generated with Claude Code

alistair3149 and others added 2 commits July 30, 2026 14:31
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>
@alistair3149
alistair3149 marked this pull request as ready for review July 30, 2026 18:56
@alistair3149
alistair3149 merged commit 48bb598 into master Jul 30, 2026
1 check passed
@alistair3149
alistair3149 deleted the drop-mcp-client-logging branch July 30, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant