Skip to content

Conversation

ochafik
Copy link
Contributor

@ochafik ochafik commented Jun 19, 2025

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 SHTTP

Motivation 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 env

  • Run 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

  • 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

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.

The change lgtm and safe as it's also strictly additive so won't break any workflows - also seems like a nice DevX improvement when working on SDK and debugging at the same time!

Should we add a paragraph somewhere in the README to draw attention to this feature?

@felixweinberger felixweinberger force-pushed the ochafik/dx-inspector-sdk branch 2 times, most recently from d0673ba to f2e509c Compare June 24, 2025 09:44
Copy link

github-actions bot commented Jun 24, 2025

🎭 Playwright E2E Test Results

✅  12 passed

Details

12 tests across 1 suite
 20.1 seconds
 469b779
ℹ️  Test Environment: Ubuntu Latest, Node.js v22.17.0
Browsers: Chromium, Firefox

📊 View Detailed HTML Report (download artifacts)

pcarleton
pcarleton previously approved these changes Jun 24, 2025
Copy link
Member

@pcarleton pcarleton left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@olaservo olaservo left a comment

Choose a reason for hiding this comment

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

Looks like there is a conflict with the gitignore?

@felixweinberger felixweinberger requested review from felixweinberger and removed request for felixweinberger July 6, 2025 15:34
@olaservo olaservo added the waiting on submitter Waiting for the submitter to provide more info label Jul 7, 2025
@felixweinberger felixweinberger dismissed olaservo’s stale review July 9, 2025 16:20

Conflict looks resolved to me

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.

Approving as looks reasonable and .gitignore issue has been resolved

@ochafik ochafik merged commit b2347db into main Jul 10, 2025
7 checks passed
@ochafik ochafik deleted the ochafik/dx-inspector-sdk branch July 10, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting on submitter Waiting for the submitter to provide more info
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants