---
title: "@modelcontextprotocol/server-legacy 2.4.0: deprecated on npm"
description: "@modelcontextprotocol/server-legacy is deprecated on npm. This package is a frozen copy of v1's SSE transport and OAuth Authorization Server helpers for…"
url: https://inlinr.com/packages/@modelcontextprotocol/server-legacy
lang: en
---

[Packages](https://inlinr.com/packages)

# @modelcontextprotocol/server-legacy

2.4.0 · 23 Oct 2026 Apache-2.0 1M / week [Repository](https://github.com/modelcontextprotocol/typescript-sdk) [Homepage](https://modelcontextprotocol.io/) [npm](https://www.npmjs.com/package/@modelcontextprotocol/server-legacy) [Atom feed](https://inlinr.com/packages/feed/@modelcontextprotocol/server-legacy)

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](https://inlinr.com/packages/@modelcontextprotocol/server-legacy#alternatives)

Your version 

## Where each line stands

[Plan an upgrade](https://inlinr.com/packages/@modelcontextprotocol/server-legacy/upgrade)

LineNewestSecurity

- 2.x 2.4.0 Safe from 2.3.1 Latest line

## What to use instead

Its maintainers name no replacement, and the e18e list has none yet.

## Latest releases

1. ### [2.4.0](https://inlinr.com/packages/@modelcontextprotocol/server-legacy/releases/2.4.0 "Open this release") [](https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/v2.4.0 "Read this release where it was published")  
23 Oct 2026

  - **`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](https://github.com/modelcontextprotocol/typescript-sdk/issues/2762), [#2960](https://github.com/modelcontextprotocol/typescript-sdk/issues/2960))
  - **`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`.
  - **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. ### [2.3.1](https://inlinr.com/packages/@modelcontextprotocol/server-legacy/releases/2.3.1 "Open this release") [](https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/v2.3.1 "Read this release where it was published")  
5 Oct 2026

  - `requireBearerAuth` in [@modelcontextprotocol/server-legacy](https://inlinr.com/packages/@modelcontextprotocol/server-legacy) takes the optional `expectedResource` that [@modelcontextprotocol/server](https://inlinr.com/packages/@modelcontextprotocol/server) 2.3.0 added: it accepts only tokens issued for this server (the token's audience). Off unless you set it.
  - The npm pages of [@modelcontextprotocol/server](https://inlinr.com/packages/@modelcontextprotocol/server) and [@modelcontextprotocol/client](https://inlinr.com/packages/@modelcontextprotocol/client) now open with one note that links the documentation, the migration guide and the issue form.
3. ### [2.3.0](https://inlinr.com/packages/@modelcontextprotocol/server-legacy/releases/2.3.0 "Open this release") [](https://github.com/modelcontextprotocol/typescript-sdk/releases/tag/v2.3.0 "Read this release where it was published")  
2 Oct 2026

  - **One server per request.** `Server.connect()` now rejects while the instance is already connected, and a stateless Streamable HTTP transport handles one request. Create the `McpServer` and the transport inside the request handler (or in the `createMcpHandler` factory) instead of sharing one instance across requests. Creating a server is cheap since [#2889](https://github.com/modelcontextprotocol/typescript-sdk/issues/2889).
  - **Redirects stay on the same origin.** The HTTP client transports now follow a redirect only when it stays on the same origin (same scheme, host and port; http to https on the same host is allowed). A deployment whose endpoint redirects to another host or port either configures the final URL or sets `redirectPolicy: 'follow'` on the transport. In browsers, a redirected request fails unless that option is set.
  - **New options, both off unless you set them.** `maxToolInputElements` on `McpServer` limits the number of array elements and object members in a tool call's arguments. `expectedResource` on `requireBearerAuth` / `verifyBearerToken` accepts only tokens issued for this server (the token's audience); with Express, upgrade [@modelcontextprotocol/express](https://inlinr.com/packages/@modelcontextprotocol/express) together with [@modelcontextprotocol/server](https://inlinr.com/packages/@modelcontextprotocol/server). ([#2926](https://github.com/modelcontextprotocol/typescript-sdk/issues/2926), [#2929](https://github.com/modelcontextprotocol/typescript-sdk/issues/2929))

Dependency tracking

## Know when your own dependencies move

@modelcontextprotocol/server-legacy had 1 security advisory in the last 12 months. inlinr emails you the day one touches a project of yours, with the version that fixes it.

- Advisories reach you  
An email when a critical or high advisory affects a project, before the next install.
- Upgrades checked first  
Peer ranges, Node, ESM-only and types changes read before you bump.
- Only what matters  
Majors and breaking notes stay; patches and sibling bumps fold into one line.

[How dependency tracking works](https://inlinr.com/dependencies)

## Security

[Details](https://inlinr.com/packages/@modelcontextprotocol/server-legacy/security)

- [MCP TypeScript SDK: Server bearer authentication accepted tokens issued for another service](https://inlinr.com/advisories/GHSA-rvq5-wwqv-78pq) Moderate · fixed in 2.3.1

## Health of 2.4.0

[Details](https://inlinr.com/packages/@modelcontextprotocol/server-legacy/security#signals)

- **Provenance**: Present
- **Publisher**: GitHub Actions
- **Maintainers**: 5
- **Scorecard**: None
- **Size**: 2.1 MB

## Weekly downloads

## Works with

- [express optional](https://inlinr.com/packages/express)

## Same family

- [@modelcontextprotocol/sdk 93.3M/wk](https://inlinr.com/packages/@modelcontextprotocol/sdk)
- [@modelcontextprotocol/core 42.5M/wk](https://inlinr.com/packages/@modelcontextprotocol/core)
- [@modelcontextprotocol/server 33.8M/wk](https://inlinr.com/packages/@modelcontextprotocol/server)
- [@modelcontextprotocol/client 20.7M/wk](https://inlinr.com/packages/@modelcontextprotocol/client)
- [@modelcontextprotocol/node 8.4M/wk](https://inlinr.com/packages/@modelcontextprotocol/node)
- [@modelcontextprotocol/express 2.6M/wk](https://inlinr.com/packages/@modelcontextprotocol/express)
- [@modelcontextprotocol/conformance 246.7k/wk](https://inlinr.com/packages/@modelcontextprotocol/conformance)
- [@modelcontextprotocol/hono 230.7k/wk](https://inlinr.com/packages/@modelcontextprotocol/hono)

Reading releases, release notes and advisories…

Registry facts last checked 18 Nov 2026\. Releases and advisories last read 20 Nov 2026.

A whole project to check? Paste its package.json in the [dependency check](https://inlinr.com/tools/dependency-check): every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.
