Fix sandbox_proxy.html static file location in MCP inspector server#1086
Open
jimmydief wants to merge 1 commit intomodelcontextprotocol:mainfrom
Open
Fix sandbox_proxy.html static file location in MCP inspector server#1086jimmydief wants to merge 1 commit intomodelcontextprotocol:mainfrom
jimmydief wants to merge 1 commit intomodelcontextprotocol:mainfrom
Conversation
6 tasks
olaservo
requested changes
Feb 19, 2026
Member
olaservo
left a comment
There was a problem hiding this comment.
Thanks for the PR! I think this breaks dev mode? Maybe something like this instead:
import { existsSync } from "fs";
// Inside the route handler (or better, at module scope):
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
// Production: static/ is copied into build/ alongside index.js
let filePath = join(__dirname, "static", "sandbox_proxy.html");
// Dev (tsx): static/ is a sibling of src/, one level up from __dirname
if (!existsSync(filePath)) {
filePath = join(__dirname, "..", "static", "sandbox_proxy.html");
}e56c2db to
2b409cd
Compare
Author
|
@olaservo Thanks! Pushed. |
2b409cd to
ddbf22a
Compare
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
This PR fixes #1082 which prevents the MCP App sandbox from working.
Type of Change
Changes Made
Update the static resource path so that it can be loaded correctly on the inspector server.
Related Issues
Fixes #1082.
Testing
Test Results and/or Instructions
Screenshots are encouraged to share your testing results for this change.
Checklist
npm run prettier-fix)Breaking Changes
Additional Context