The sunpeak dev command starts a local development server with a built-in inspector and MCP server, allowing you to develop and test your MCP Resources both locally and with hosts like ChatGPT.
Tool dropdown — selects which tool to inspect. Always visible when tools exist.
Simulation dropdown — selects a simulation fixture with mock data. Shown when fixtures exist for the selected tool. Includes a “None (call server)” option to bypass mock data and call the real handler via the Run button.
For programmatic testing, these map to URL parameters:
# Mock data renders immediately (simulation fixture selected):http://localhost:3000/?simulation=show-albums&theme=dark# No mock data — user clicks Run for real handler:http://localhost:3000/?tool=show-albums&theme=dark# Hide the sidebar (resource viewer only):http://localhost:3000/?simulation=show-albums&sidebar=false# Hide the dev overlay (for e2e tests):http://localhost:3000/?simulation=show-albums&devOverlay=false
When --prod-tools is used, tool calls execute your real handlers in src/tools/ instead of returning simulation mock data. The sidebar’s “Prod Tools” checkbox starts enabled (and can be toggled at runtime).
# Integration testing: real handlers with HMR UIsunpeak dev --prod-tools
When --prod-resources is used, sunpeak build runs automatically before the dev server starts. The built HTML is served from dist/ instead of Vite HMR. Useful for catching build regressions in CI/E2E testing.
# CI/E2E: production bundles with simulation mock datasunpeak dev --prod-resources
The dev server runs multiple services on different ports:
Port
Service
Purpose
Configurable
3000
Inspector UI
Main dev server with HMR
--port flag or PORT env
8000
MCP server
Tool execution endpoint (tunnel this for ChatGPT/Claude)
Auto-allocated
24679
HMR WebSocket
Vite HMR for MCP resource bundles
SUNPEAK_HMR_PORT env
24680
Sandbox proxy
Cross-origin iframe isolation (local only, not tunneled)
SUNPEAK_SANDBOX_PORT env
Set SUNPEAK_DEV_OVERLAY=false to disable the dev overlay across all resources served by this server.Only port 8000 needs to be tunneled (e.g., via ngrok) for ChatGPT/Claude connections. The sandbox proxy server provides real cross-origin isolation for the inspector’s iframe architecture, matching how production hosts run apps on a separate sandbox origin.
To test with the real ChatGPT, expose the MCP server with a tunnel:
# In another terminal, run a tunnelngrok http 8000
Then connect the tunnel URL at the /mcp path (e.g., https://your-subdomain.ngrok.io/mcp) from ChatGPT in developer mode: User > Settings > Apps & Connectors > Create.