@modelcontextprotocol/server-legacy@2.0.0
Model Context Protocol released @modelcontextprotocol/server-legacy 2.0.0, introducing SDK v2 beta support for the 2026-07-28 spec revision, shared schema modules via @modelcontextprotocol/core, CommonJS builds, and lazy schema initialization.
原始内容为英文;当前页面提供中文导航与来源说明,具体事实请以原文为准。
为什么值得关注
@modelcontextprotocol/server-legacy@2.0.0 is released as part of the SDK v2 beta lineup supporting the MCP 2026-07-28 specification revision. Key changes include: 1) Moving spec schemas, OAuth schemas, and protocol constants to @modelcontextprotocol/core as a runtime dependency to share a single schema graph and object identity, introducing a non-guaranteed './internal' subpath. 2) Shipping CommonJS builds (.cjs / .d.cts) alongside ESM (.mjs / .d.mts) with package.json 'require' exports. 3) Lazily constructing protocol-revision wire schemas via memoized factories upon initial validation instead of at module import time to eliminate upfront initialization overhead. Updated dependencies include @modelcontextprotocol/core@2.0.0.
可执行摘要
Release 2.0.0 of @modelcontextprotocol/server-legacy aligns with core v2.0.0: extracts schemas/constants into @modelcontextprotocol/core (with a new ./internal subpath), adds dual ESM/CJS exports (.mjs/.cjs), defers wire schema construction to first validation, and supports the MCP 2026-07-28 specification revision.
- Agent 实用度
- 82/100
- 可信度
- 96%
- 机器格式
- JSON + Markdown
开发者应核对什么
- Review upgrade guidance in docs/migration/upgrade-to-v2.md if migrating from v1.
- Review docs/migration/support-2026-07-28.md to adopt the MCP 2026-07-28 specification revision.
- Avoid direct external dependence on @modelcontextprotocol/core/internal, as it is an SDK-internal contract subject to breaking changes.
- Verify compatibility with the dual ESM/CJS builds and updated @modelcontextprotocol/core@2.0.0 dependency.