You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
1.10: split the SDK bundle, so a server doesn't set up subsystems it doesn't use #950
@frontmcp/sdk's CommonJS bundle is 2 MB of source. Compiling it takes about 16 ms at startup, and its root re-exports force about 10 to 15 ms of module setup for every subsystem, whether the server uses it or not.
Upper bounds we measured against 1.10.9-rc.4, using hacks that break public behavior:
Skipped at startup
HTTP
stdio
Setup of jobs, workflows, channels, remote MCP and the ESM loader
−1.9 ms
−1.8 ms
Loading and registering the 8 OAuth flows in a public-mode server
−3.1 ms
−3.6 ms
Task setup
0
0
Doing this while keeping the root exports and flow registration as they are would need a different bundle layout. A post-build rewrite of esbuild's output would be too fragile.
Proposal
Make the CommonJS root exports lazy, as getters for the subsystems a server may never use, or split the SDK into subsystem chunks that load on first use. Expected: about 5 ms and 1 to 2 MB.
Acceptance
The public exports are the same.
Hooks and plugins that target any flow behave as before, including OAuth flows in public mode.
Worker and browser builds keep working: the bundle-size and worker-export-condition tests pass.
Cold start and RSS are measured before and after with the benchmark harness.
Activity