Skip to content

fix: respect disabled listChanged capabilities on v1.x#1948

Open
paulelliotco wants to merge 1 commit intomodelcontextprotocol:v1.xfrom
paulelliotco:fix/v1x-resources-listchanged
Open

fix: respect disabled listChanged capabilities on v1.x#1948
paulelliotco wants to merge 1 commit intomodelcontextprotocol:v1.xfrom
paulelliotco:fix/v1x-resources-listchanged

Conversation

@paulelliotco
Copy link
Copy Markdown

Summary

  • preserve explicit listChanged: false settings when McpServer registers tool, resource, and prompt capabilities
  • stop emitting notifications/*/list_changed when the corresponding capability is not advertised
  • add regression tests for capability advertisement, runtime notification suppression, and direct access to Server.getCapabilities()

Fixes #1819

Testing

  • npm run lint
  • npx vitest run test/server/mcp.test.ts

Notes

  • npm run typecheck still fails on pre-existing unrelated test call signatures in test/integration-tests/taskLifecycle.test.ts and test/shared/protocol.test.ts

@paulelliotco paulelliotco requested a review from a team as a code owner April 23, 2026 12:52
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 23, 2026

⚠️ No Changeset found

Latest commit: 843c76f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 23, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@modelcontextprotocol/sdk@1948

commit: 843c76f

Preserve explicit listChanged:false settings in McpServer, gate list-changed notifications on the advertised capability, and add regression coverage for both capability values and runtime notification behavior.
@paulelliotco paulelliotco force-pushed the fix/v1x-resources-listchanged branch from 67facd2 to 843c76f Compare April 23, 2026 12:57
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