@modelcontextprotocol/server-legacy
2.4.0 · 23 Oct 2026Apache-2.01M / weekRepositoryHomepagenpmAtom feed
2.4.0 is the newest release of 2.x.
In short
1 new3 fixed1 internal
Security
1 advisory affects 2.0.0; 2.3.1 fixes them
- ModerateMCP TypeScript SDK: Server bearer authentication accepted tokens issued for another serviceGHSA-rvq5-wwqv-78pq · 20 Oct 2026Fixed in 2.3.1
Release note
Minor Changes
Move the schema source modules (spec schemas, OAuth schemas, protocol constants) into
@modelcontextprotocol/coreand resolve them from there as a regular runtime dependency instead of bundling a private copy into each package. An application importing more than one of the packages now evaluates a single shared schema graph with shared object identity.@modelcontextprotocol/coregains a./internalsubpath (SDK-internal contract; may change in any release) and the four packages now version together.
Patch Changes
First beta release of SDK v2 with support for the MCP 2026-07-28 specification
revision. See the migration guides for upgrading from v1
(docs/migration/upgrade-to-v2.md) and adopting the 2026-07-28 revision
(docs/migration/support-2026-07-28.md).Ship CommonJS builds alongside ESM. Each package now emits both
.mjs/.d.mts
and.cjs/.d.cts(via tsdownformat: ['esm', 'cjs']), and itsexportsmap
adds arequirecondition sorequire('@modelcontextprotocol/…')works from
CommonJS consumers. Output extensions are normalized across all packages
(@modelcontextprotocol/coremoves from.js/.d.tsto.mjs/.d.mts); the
public import paths are unchanged.Build protocol-revision wire schemas lazily on first validation instead of at import. Each revision's schema set is now constructed by a module-level memoized factory, so importing the client or server package no longer pays the construction cost of both frozen wire-schema graphs up front. Method membership in the revision registries stays static, the schemas themselves are unchanged, and registry lookups keep returning reference-identical schema objects.
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.