fix: include server/static in published package files#1113
Merged
olaservo merged 1 commit intomodelcontextprotocol:mainfrom Feb 25, 2026
Merged
Conversation
The sandbox_proxy.html file was not shipped in the npm package because the files arrays in both package.json and server/package.json only included the build directory. The server code resolves the file via join(__dirname, '..', 'static', 'sandbox_proxy.html') which expects static/ as a sibling of build/, but it was missing from the package.
olaservo
approved these changes
Feb 25, 2026
17 tasks
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
The MCP Apps sandbox proxy fails to load when the inspector is installed from npm. The
/sandboxendpoint returns:The
filesarrays inpackage.jsonandserver/package.jsononly includebuild/, soserver/static/is excluded from the published package. The server resolves the file viajoin(__dirname, "..", "static", "sandbox_proxy.html")— which works from a repo checkout (whereserver/static/exists alongsideserver/src/), but not from the npm package where onlyserver/build/is shipped.This doesn't surface during development because the source directory layout satisfies the path. It only breaks for consumers installing from npm.
Type of Change
Changes Made
Added
"server/static"to the rootfilesarray and"static"toserver/package.jsonfilesarray. No code changes.Related Issues
Couldn't find an existing issue — happy to open one if preferred.
Testing
Test Results and/or Instructions
Reproduce: Install the inspector from npm, connect to an MCP server with tools that have
_meta.ui.resourceUri, open the Apps tab — sandbox fails with ENOENT.Verify:
npm pack --dry-runshould now includeserver/static/sandbox_proxy.htmlin the tarball. Before this change it only includedserver/build/static/sandbox_proxy.html(which the code never resolves to).Checklist
npm run prettier-fix)Breaking Changes
None.