Skip to content

fix: resolve sandbox_proxy.html path in Docker container#1736

Open
safe049 wants to merge 1 commit into
modelcontextprotocol:mainfrom
safe049:fix/docker-sandbox-proxy-1082
Open

fix: resolve sandbox_proxy.html path in Docker container#1736
safe049 wants to merge 1 commit into
modelcontextprotocol:mainfrom
safe049:fix/docker-sandbox-proxy-1082

Conversation

@safe049

@safe049 safe049 commented Jul 22, 2026

Copy link
Copy Markdown

Summary

Note: Inspector V2 is under development to address architectural and UX improvements. During this time, V1 contributions should focus on bug fixes and MCP spec compliance. See CONTRIBUTING.md for more details.

The compiled server looks for sandbox_proxy.html at join(__dirname, '..', 'static', ...) which resolves to /app/server/static/ in Docker. However, the Dockerfile only copies server/build/ to the production image, not server/static/.

reference static files relative to the build output (join(__dirname, 'static', ...)) since the build process already copies static/ into build/static/. Also add explicit COPY of server/static/ in the Dockerfile for insurance

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Refactoring (no functional changes)
  • Test updates
  • Build/CI improvements

Changes Made

Related Issues

Testing

  • Tested in UI mode
  • Tested in CLI mode
  • Tested with STDIO transport
  • Tested with SSE transport
  • Tested with Streamable HTTP transport
  • Added/updated automated tests
  • Manual testing performed

Test Results and/or Instructions

use curl -v http://localhost:6277/sandbox when you started docker container with network host,normally it return html

Screenshots are encouraged to share your testing results for this change.

Checklist

  • Code follows the style guidelines (ran npm run prettier-fix)
  • Self-review completed
  • Code is commented where necessary
  • Documentation updated (README, comments, etc.)

Breaking Changes

None

Additional Context

None

The compiled server looks for sandbox_proxy.html at
join(__dirname, '..', 'static', ...) which resolves to
/app/server/static/ in Docker. However, the Dockerfile only
copies server/build/ to the production image, not server/static/.

Fix: reference static files relative to the build output
(join(__dirname, 'static', ...)) since the build process already
copies static/ into build/static/. Also add explicit COPY of
server/static/ in the Dockerfile as a safety net.

Fixes modelcontextprotocol#1082
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