Packages

@modelcontextprotocol/server-legacy

2.4.0 · 23 Oct 2026Apache-2.01M / weekRepositoryHomepagenpmAtom feed

Deprecated by its maintainers: 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.What to use instead

Upgrading @modelcontextprotocol/server-legacy From 2.3.0 to 2.4.0

2 releases in betweenevery note read

Reading releases, release notes and advisories…

Other targets from 2.3.0Clears its advisory2.3.1
  1. 2.3.0yours
  2. 2.3.1
  3. 2.4.0target

Security

Fixes 1 advisory affecting 2.3.0

Release by release

  1. 2.4.0

    23 Oct 20264 new · 4 fixes
    • New

      Skills over MCP (SEP-2640). A server publishes a folder of skills with loadSkills(folder) and skills.attach(server); a client lists, reads and verifies them with SkillsClient. It works on 2025-11-25 and 2026-07-28. attach is experimental and may change in a minor release. (#3047, #3080)

    • New

      Opt-in scope on token refresh. Implement scopeForRefresh(tokens) on your OAuthClientProvider for an authorization server that rejects a refresh without scope (Microsoft Entra ID, AADSTS90009). The default request does not change.

    • New

      ServerEvent takes optional params, so a gateway can forward change notifications with their _meta.

    • New

      The v1 to v2 upgrade guide is also an installable agent skill.

  2. 2.3.1nothing new or fixed in the note

5 other lines we could not sort, mostly version bumps
  • x-mcp-header on a number parameter is rejected, as the 2026-07-28 spec requires: the client does not list such a tool, and the server answers a call to it with -32020. Use z.int() or remove the annotation. (#2762, #2960)

    2.4.0
  • outputSchema from z.object(...).meta({ id }). On a 2025-11-25 connection the result is no longer wrapped in { result }: read structuredContent, not structuredContent.result.

    2.4.0
  • The bundled Ajv validator uses fast-uri 3.1.8. It rejects a $id or $ref with an invalid URI scheme, such as my_tool:output.

    2.4.0
  • requireBearerAuth in @modelcontextprotocol/server-legacy takes the optional expectedResource that @modelcontextprotocol/server 2.3.0 added: it accepts only tokens issued for this server (the token's audience). Off unless you set it.

    2.3.1
  • The npm pages of @modelcontextprotocol/server and @modelcontextprotocol/client now open with one note that links the documentation, the migration guide and the issue form.

    2.3.1

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.