Skip to content

feat(node): restore SSEServerTransport under /node/sse, @deprecated#1909

Draft
felixweinberger wants to merge 1 commit intomainfrom
fweinberger/v2-bc-node-sse-restore
Draft

feat(node): restore SSEServerTransport under /node/sse, @deprecated#1909
felixweinberger wants to merge 1 commit intomainfrom
fweinberger/v2-bc-node-sse-restore

Conversation

@felixweinberger
Copy link
Copy Markdown
Contributor

Part of the v2 backwards-compatibility series — see reviewer guide.

v2 removed SSEServerTransport. Proxy/bridge use-cases (stdio→SSE→browser) still need it; the spec still documents SSE. Restored as @deprecated v1 copy.

Motivation and Context

v2 removed SSEServerTransport. Proxy/bridge use-cases (stdio→SSE→browser) still need it; the spec still documents SSE. Restored as @deprecated v1 copy.

v1 vs v2 pattern & evidence

v1 pattern:

`import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js'`

v2-native:

`import { NodeStreamableHTTPServerTransport } from '@modelcontextprotocol/node'` (StreamableHTTP supersedes SSE)

Evidence: Hit in real-repo testing (proxy/bridge pattern).

How Has This Been Tested?

  • packages/middleware/node/test/sse.compat.test.ts
  • Integration: validated bump-only against 5 OSS repos via the v2-bc-integration validation branch
  • pnpm typecheck:all && pnpm lint:all && pnpm test:all green

Breaking Changes

None — additive @deprecated shim. Removed in v3.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added or updated documentation as needed

Additional context

Stacks on: none

@felixweinberger felixweinberger added the v2-bc v2 backwards-compatibility series label Apr 15, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 15, 2026

🦋 Changeset detected

Latest commit: 5d751a4

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

This PR includes changesets to release 1 package
Name Type
@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

@felixweinberger felixweinberger added this to the v2.0.0-bc milestone Apr 15, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 15, 2026

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/@modelcontextprotocol/client@1909

@modelcontextprotocol/server

npm i https://pkg.pr.new/@modelcontextprotocol/server@1909

@modelcontextprotocol/express

npm i https://pkg.pr.new/@modelcontextprotocol/express@1909

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/@modelcontextprotocol/fastify@1909

@modelcontextprotocol/hono

npm i https://pkg.pr.new/@modelcontextprotocol/hono@1909

@modelcontextprotocol/node

npm i https://pkg.pr.new/@modelcontextprotocol/node@1909

commit: 5d751a4

@felixweinberger felixweinberger force-pushed the fweinberger/v2-bc-node-sse-restore branch from 9c15634 to 9624cc3 Compare April 16, 2026 09:38
…node/sse

Ports the v1 SSEServerTransport to v2 as a deprecated compat shim under a
dedicated /sse subpath. The implementation is a frozen copy of the v1 class
with imports adapted to the v2 package layout (parseJSONRPCMessage,
MessageExtraInfo.request as Web Request).

Constructing the transport emits a one-time deprecation warning pointing to
NodeStreamableHTTPServerTransport. The class and options interface are both
marked @deprecated and slated for removal in v3.

Adds content-type and raw-body as runtime deps (matching v1 body parsing).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2-bc v2 backwards-compatibility series

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant