Repository navigation
Cherry-pick: perf(protocol): the MCP client from @frontmcp/protocol/client, and tighter bundle-size budgets (#942, #943) - #947
Merged
Conversation
…p/protocol/client (#942) The package root re-exported #client, so every importer of @frontmcp/protocol pulled in the MCP SDK's client modules: a browser or Worker bundle of a server kept shared/auth.js's OAuth schemas and the client modules' side effects even though an in-process server never builds a client. The client, its Streamable HTTP and SSE transports and the stdio client now come from the @frontmcp/protocol/client subpath, which re-exports #client and so keeps its lazy require() variant. The direct client, the remote-MCP client service, @frontmcp/testing's raw client and the tests import them from there. (cherry picked from commit fd012ad)
… parser and the MCP client out (#943) * test(bundle-size): lower the create() budgets and keep the JavaScript parser and the MCP client out #921 took @enclave-vm/ast's parser (acorn, acorn-walk, astring) out of every browser bundle, and #886 the MCP client, but the suite's budgets still allowed 1.56 MB and 1.57 MB for create() + one tool (+ WebMcpPlugin) and 1.18 MB for a Vite app's initial chunk. The budgets now sit about 1% above the current sizes (1,300,483, 1,307,783 and 948,317 bytes), and a new test fails when the parser or the MCP client's modules contribute any bytes to either bundle, naming the import chain. The skills pattern's node_modules alternative is anchored like the inputs it matches, which are relative to the workspace root. * test(bundle-size): treat the client subpath's entry as part of the MCP client @frontmcp/protocol/client resolves to libs/protocol/dist/esm/clients.mjs, so the never-bundled pattern matches it as well as #client's client.mjs. (cherry picked from commit 71df5d8)
Contributor
Contributor
Performance Test ResultsStatus: ✅ All tests passed Summary
Total: 101 tests across 21 projects 📊 View full report in workflow run Generated at: 2026-10-21T17:45:54.158Z |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick to main
This PR brings #942 and #943, merged to
release/1.10.x, tomainas one PR. Each squash commit is picked in order withgit cherry-pick -x. It replaces the per-PR cherry-picks the workflow opened (#945 and #946), which I'm closing in favor of this one.Closes #886
Closes #885
release/1.10.xfd012adb8Client,StreamableHTTPClientTransport,SSEClientTransportandStdioClientTransportmove from@frontmcp/protocol's root to@frontmcp/protocol/client(the CommonJS entry still loads the client lazily). Importers in the SDK,@frontmcp/testingand the specs moved with them.71df5d8dccreate()bundle fails if acorn, acorn-walk, astring, the MCP SDK client modules or protocol'sclient.mjs/clients.mjscontribute any bytes. The skills bundle's js-yaml/vectoriadb pattern is anchored so it matches the metafile's paths.Both applied without conflicts. The 36 files they change are identical to
release/1.10.x, where both PRs passed CI (44 and 45 checks) with CodeRabbit's comments resolved.Results
esbuild,
browsercondition, as the bundle-size test measures it:create()+ one toolcreate()+ WebMcpPlugin + one toolTests
CI runs here on
main, on the same files that passed onrelease/1.10.x.Summary by CodeRabbit
New Features
@frontmcp/protocol/cliententry point for client classes and transports.Performance
Documentation
Tests