Skip to content

add npm run dev:sdk to get live sdk changes w/ simple server #533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ochafik
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant