Overview
The sunpeak dev command starts a local development server with a built-in ChatGPT simulator, allowing you to develop and test your MCP Resources without connecting to ChatGPT.
Features
Hot Module Reload (HMR)
The dev server uses Vite’s hot reload technology for instant feedback:
- Component changes reflect immediately without full page refresh
- State is preserved across updates when possible
- CSS updates apply instantly
ChatGPT Simulator
Access the simulator at http://localhost:6767 to:
- Test your MCP Resources in a ChatGPT-like environment
- Simulate tool calls and responses
- Preview your UI components with realistic styling
- Iterate quickly without needing a tunnel or ChatGPT connection
Automatic Discovery
The dev server automatically discovers and loads:
- All simulations exported from
src/simulations/index.ts
- All MCP Resources from
src/resources/*-resource.tsx
No manual configuration or entry point files needed!
Configuration
Port
Default port: 6767
To use a different port, modify your package.json script:
{
"scripts": {
"dev": "sunpeak dev --port 3000"
}
}
Host
To expose the server on your network:
{
"scripts": {
"dev": "sunpeak dev --host"
}
}
Usage
When to Use
Use sunpeak dev for:
- Local component development
- Rapid iteration with hot reload
- Testing UI behavior in the ChatGPT simulator
- Debugging without ChatGPT integration
The dev server is for development only. For production, use sunpeak build to create optimized bundles.