Skip to content

Conversation

@KKonstantinov
Copy link
Contributor

@KKonstantinov KKonstantinov commented Dec 10, 2025

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.

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

Additional context

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 10, 2025

Open in StackBlitz

pnpm add https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/sdk-client@1279 
pnpm add https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/sdk-server@1279 

commit: 3275de7

@KKonstantinov KKonstantinov added the v2 Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes label Dec 10, 2025
@KKonstantinov KKonstantinov self-assigned this Dec 10, 2025
Copy link
Contributor

@felixweinberger felixweinberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way we can break this PR up somehow so that this is more reviewable? E.g. with using git mv to preserve history and provenance of files? As it is it'll be quite hard to verify correctness of the split.

@KKonstantinov
Copy link
Contributor Author

KKonstantinov commented Dec 12, 2025

EDITs:

  • Provenance / history retained (except 3-4 files, will review them and bring it to them as well)
  • Dropped Node v18
  • Dropped CommonJS (ESM only)
  • Removed tsgo - that's running TS v7 - switched to tsc for our current typescript version
  • 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
  • ... might be more, will add as quite tired after this one :)

TODOs still:

  • main.yml - needs reworking on the publish part - publish each package.
  • workspace and catalog deps need to be resolved for pkg-pr-new,
  • TBD: Consideration on whether sdk-core should be published on npm
  • bundling tooling change -tsdown - @mattzcarey ?
  • *.md - readme updates
  • test(18) check - needs to be removed as required check from branch rulesets, and replaced with test(20)
@KKonstantinov KKonstantinov added this to the v2 milestone Dec 12, 2025
@KKonstantinov KKonstantinov linked an issue Dec 12, 2025 that may be closed by this pull request
23 tasks
@KKonstantinov KKonstantinov changed the title Proof of Concept: v2 monorepo, package split [v2] Proof of Concept: monorepo, package split Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes

2 participants