Skip to content

npx install warns about deprecated @modelcontextprotocol/server-legacy, which only test servers use #2519

Closed

Description

@cliffhall

Problem

A fresh npx @modelcontextprotocol/inspector (2.8.0) prints:

npm warn deprecated @modelcontextprotocol/[email protected]: This package is a frozen copy of v1's SSE transport and OAuth Authorization Server helpers for migration purposes only. Use StreamableHTTP from @modelcontextprotocol/server and a dedicated OAuth server in production. Will not receive new features.

Users read this as the Inspector depending on something deprecated or v1. It doesn't, at runtime.

Cause

@modelcontextprotocol/server-legacy is declared under the root package.json's dependencies (added in the SDK v2 migration, #1624), so every published install pulls it in. Its only importer is test-servers/src/test-server-http.ts (SSEServerTransport from /sse, so the test server can still serve the legacy SSE transport). test-servers/ is not in the published files list, and nothing in the shipped builds imports it; the only mention in clients/web/build/index.js is a comment.

The whole package is marked deprecated on npm (not just 2.0.0), so bumping to 2.1.0 on v2/main does not silence it.

Fix

Move it from dependencies to devDependencies in the root manifest. Test servers run only in a dev tree, where devDependencies are installed.

Things to carry along in the same change:

  • scripts/sdk-watch.mjs reads only manifest.dependencies, both for assertEveryPackageWatched and for each package's declared version. It needs to consider devDependencies too, or the guard stops seeing the package and declared goes null.
  • express reaches the test servers as a peer pulled in under server-legacy (see the chore: declare the MCP SDK packages only at the repo root, so every client resolves one copy #1970 note in clients/web/vite.config.ts / vitest.shared.mts). Confirm it still resolves at the root in a dev install, and that the cli tests that spawn a test server still pass.
  • Check whether AGENTS.md's Dependency placement list of root runtime SDK deps needs server-legacy taken out of it.

Expected

A fresh npx @modelcontextprotocol/inspector installs no deprecated MCP SDK package and prints no deprecation warning for one.

Activity

  1. added this to the v2.9.0 milestone on Sep 28, 2026
  2. added
    bug
    on Sep 28, 2026
  3. self-assigned this
    on Sep 28, 2026
  4. added
    v2
    on Sep 28, 2026
  5. cliffhall commented on Sep 28, 2026

    @cliffhall
    MemberAuthor

    Priority score: severity 2 (confusing but harmless warning on every fresh install) + urgency 3 (wanted this milestone) + bonuses: bug label, milestoned, assigned (+3) = 8 → Medium.

  6. added 2 commits that reference this issue on Sep 29, 2026
  7. added a commit that references this issue on Oct 4, 2026
    a512fc2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugv2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions