Skip to content

fix: add root package export barrel#2030

Open
cyphercodes wants to merge 1 commit intomodelcontextprotocol:v1.xfrom
cyphercodes:fix-971-root-cjs-esm-exports
Open

fix: add root package export barrel#2030
cyphercodes wants to merge 1 commit intomodelcontextprotocol:v1.xfrom
cyphercodes:fix-971-root-cjs-esm-exports

Conversation

@cyphercodes
Copy link
Copy Markdown

Summary

  • Add the missing root src/index.ts barrel so the existing package root export emits dist/esm/index.js and dist/cjs/index.js.
  • Cover the root export surface used by the package entry point (Client, Server, McpError, protocol constants, and InMemoryTransport).

Fixes #971.

Testing

  • npm run typecheck
  • npm test -- test/index.test.ts
  • npm run build
  • npm run lint
  • npm pack --json plus temp-project CJS require('@modelcontextprotocol/sdk') and ESM import ... from '@modelcontextprotocol/sdk' smoke tests
  • git diff --check

@cyphercodes cyphercodes requested a review from a team as a code owner May 8, 2026 03:34
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 8, 2026

⚠️ No Changeset found

Latest commit: d867ff8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 8, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@modelcontextprotocol/sdk@2030

commit: d867ff8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant