add npm run dev:sdk
to get live sdk changes w/ simple server
#533
+11
−0
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.
Introduces an
npm run dev:sdk
script that allows live edit/rebuild of the SDK + inspector codebases.TL;DR:
npm run dev:sdk "cd sdk && npm run examples:simple-server:w"
and open http://localhost:3000/mcp as SHTTPMotivation and Context
The inspector is great to test SDK changes, but there's a bit of gymastics required: there's no watch-enabled build of the SDK, and no instructions or scripts to
npm link
.How Has This Been Tested?
This builds upon modelcontextprotocol/typescript-sdk#663
Checkout this Inspector branch & the SDK:
git clone https://github.com/modelcontextprotocol/typescript-sdk git clone https://github.com/modelcontextprotocol/inspector cd inspector git checkout ochafik/dx-inspector-sdk
If the sdk isn't in
../typescript-sdk
, set MCP_SDK envRun the simpleStreamableHttp.ts example server alongside the inspector & SDK:
npm run dev:sdk "cd sdk && npm run examples:simple-server:w"
Open http://localhost:3000/mcp as Streamable HTTP in the inspector
Inspector & SDK edits should be reflected ~live
To undo the linking of the local typescript-sdk codebase, run
npm run unlink:sdk && npm i
.Breaking Changes
None
Types of changes
Checklist