[v2] Мonorepo, `sdk-client`, `sdk-server`, `sdk-core` package split by KKonstantinov · Pull Request #1279 · modelcontextprotocol/typescript-sdk
Proof of Concept: v2 monorepo, package split
Motivation and Context
v1 of the sdk shipped both client and server in the same package, introducing extra dependencies to users who have a single concern (client or server only). Client and server packages are now split, depending on a shared core package.
Additionally, v1 exported all files as the public API of the SDK, limiting the SDK ability to iterate internally while keeping backwards compatibility. Barrel files are now introduced as the single entrypoint to the SDK and defining the public API of the SDK.
- Dropped Node v18
- Dropped CommonJS (ESM only)
- Updated tsgo to one of the latest versions
- Bumped the ts version
- Added eslint import rules to tidy up imports
- cleaned-up package.json files - client-sdk and server-sdk ship with the minimum required dependencies (as opposed to v1, which shipped server deps if you were only interested in the client and vice versa
- introduce catalogs for reusing dep versions
- bundling tool change - tsdown
- updated docs
How Has This Been Tested?
Unit, integration tests
Breaking Changes
v2
Types of changes
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to change)
- Documentation update
Checklist
- I have read the MCP Documentation
- My code follows the repository's style guidelines
- New and existing tests pass locally
- I have added appropriate error handling
- I have added or updated documentation as needed