Overview
Thesunpeak start command starts a production MCP server that serves your built resources and executes real tool handlers. Run sunpeak build first to compile your resources and tools.
What It Does
The production server loads everything fromdist/:
- Resources — Pre-built HTML bundles from
dist/{name}/{name}.htmlwith metadata fromdist/{name}/{name}.json - Tools — Compiled tool modules from
dist/tools/*.js, registered with real handlers and Zod schemas for input validation - Server entry — Optional
dist/server.jsfor authentication and server metadata
registerAppTool from the MCP Apps SDK. When a host calls a tool, the real handler executes — not simulation fixture data.
Options
| Option | Short | Description |
|---|---|---|
--port <number> | -p | Server port (default: 8000, also respects PORT env var) |
Usage
Server Endpoints
| Endpoint | Method | Description |
|---|---|---|
/ | GET | Server info page |
/mcp | POST | Initialize a session or send messages |
/mcp | GET | Open an SSE stream for server-initiated notifications |
/mcp | DELETE | Terminate a session |
mcp-session-id header.
Authentication
If your project includes asrc/server.ts with an auth() export, the production server calls it on every MCP request. See Server Entry for details.
Testing Locally
To test production behavior locally, run the build and start commands together:ngrok http 8000) and connect from ChatGPT.