Repository navigation
fix(#396): lazy-load MCP SDK to prevent build failures when not installed - #398
Merged
admarble merged 2 commits intoMar 23, 2026
Merged
Conversation
…lled - Lazy-load serveCommand in bin/cli.ts via dynamic import() inside .action() - Add ambient type declarations (src/mcp/sdk-types.d.ts) as fallback for tsc - Move @modelcontextprotocol/sdk from dependencies to optional peerDependencies - Guard MCP test files with describe.skipIf(!mcpSdkAvailable) - Add *.d.ts to ESLint ignores - sequant serve shows clear error with install instructions when SDK missing
6 tasks
Runtime errors from serveCommand() (e.g., port in use) should propagate normally, not show the "SDK not installed" message.
admarble
deleted the
feature/396-fix-lazy-load-mcp-sdk-to-prevent-build-failure
branch
March 23, 2026 13:33
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.
Summary
serveCommandinbin/cli.tsvia dynamicimport()so non-MCP commands don't require the SDKsrc/mcp/sdk-types.d.ts) as fallback fortscwhen SDK is not installed@modelcontextprotocol/sdkfromdependenciesto optionalpeerDependenciesdescribe.skipIf(!mcpSdkAvailable)for graceful skipsequant serveshows a clear error with install instructions when SDK is missingTest plan
npm run buildpasses with SDK installednpm run buildpasses without SDK installed (ambient types as fallback)npm testpasses with SDK installed (1663 tests, 69 files)npm testpasses without SDK installed (1628 passed, 3 skipped, 0 failed)npm run lintpassessequant doctorworks without SDK (MCP check shows warn, not error)sequant serveshows clear error message without SDKCloses #396
🤖 Generated with Claude Code