Skip to content

feat(server): SDK-owned resource subscription tracking on McpServer - #2440

Open
felixweinberger wants to merge 1 commit into
mainfrom
fweinberger/resource-subscription-tracking
Open

feat(server): SDK-owned resource subscription tracking on McpServer#2440
felixweinberger wants to merge 1 commit into
mainfrom
fweinberger/resource-subscription-tracking

Add SDK-owned resource subscription tracking to McpServer

ab94a4b
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Jul 6, 2026 in 32m 49s

Code review found 2 potential issues

Found 4 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 2
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit packages/server/src/server/mcp.ts:149-157 PR description says explicit-only opt-in / no behavior change, but the diff ships automatic activation at connect()

Annotations

Check warning on line 157 in packages/server/src/server/mcp.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

PR description says explicit-only opt-in / no behavior change, but the diff ships automatic activation at connect()

The PR description says this ships the explicit opt-in form ("zero behavior change for existing servers", "Breaking Changes: None — the API is opt-in; without it, behavior is byte-for-byte today's"), but the diff ships automatic activation: `connect()` calls `_autoTrackResourceSubscriptions()`, which installs the `resources/subscribe`/`resources/unsubscribe` handlers for any server that merely declared `resources: { subscribe: true }` — a behavior change the changeset and migration guide already