Skip to content

fix(server): allow inline list changed notifications#1797

Open
raashish1601 wants to merge 2 commits intomodelcontextprotocol:mainfrom
raashish1601:contributor-15/typescript-sdk-1771
Open

fix(server): allow inline list changed notifications#1797
raashish1601 wants to merge 2 commits intomodelcontextprotocol:mainfrom
raashish1601:contributor-15/typescript-sdk-1771

Conversation

@raashish1601
Copy link
Copy Markdown

Summary

  • thread NotificationOptions through the Server and McpServer list-changed helpers
  • let the high-level McpServer helpers return the underlying promise so tool handlers can await inline notifications reliably
  • add stateless Streamable HTTP coverage plus helper option pass-through tests

Fixes #1771.

Testing

  • corepack pnpm --filter @modelcontextprotocol/server exec vitest run test/server/streamableHttp.test.ts
  • corepack pnpm --filter @modelcontextprotocol/test-integration exec vitest run test/server.test.ts test/server/mcp.test.ts
  • corepack pnpm --filter @modelcontextprotocol/server exec eslint src/server/server.ts src/server/mcp.ts test/server/streamableHttp.test.ts
  • corepack pnpm --filter @modelcontextprotocol/test-integration exec eslint test/server.test.ts test/server/mcp.test.ts
  • corepack pnpm --filter @modelcontextprotocol/server exec prettier --ignore-path ../../.prettierignore --check src/server/server.ts src/server/mcp.ts test/server/streamableHttp.test.ts
  • corepack pnpm --filter @modelcontextprotocol/test-integration exec prettier --ignore-path ../../.prettierignore --check test/server.test.ts test/server/mcp.test.ts
  • corepack pnpm --filter @modelcontextprotocol/server run typecheck

@raashish1601 raashish1601 requested a review from a team as a code owner March 27, 2026 19:08
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 27, 2026

🦋 Changeset detected

Latest commit: 987f009

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@modelcontextprotocol/server Patch
@modelcontextprotocol/express Patch
@modelcontextprotocol/hono Patch
@modelcontextprotocol/node Patch

Not sure what this means? Click here to learn what changesets are.

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 27, 2026

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/client@1797

@modelcontextprotocol/server

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server@1797

@modelcontextprotocol/express

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/express@1797

@modelcontextprotocol/hono

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/hono@1797

@modelcontextprotocol/node

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/node@1797

commit: 987f009

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.

sendToolListChanged() notification silently dropped when no GET SSE channel is open

1 participant