Overview
Thesunpeak build command creates optimized, production-ready bundles for your MCP Resources. Each Resource file is built as a separate, standalone HTML bundle.
Output
The build process creates:- HTML - Optimized and compressed for minimal file size
- CSS extraction - Unused Tailwind styles removed automatically
- Asset optimization - Static assets with hashed filenames for caching
- Source maps - For debugging production issues
Output Directory
src/resources/{name}/ is built to dist/{name}/, containing the HTML bundle and metadata. The .json file is extracted from the resource export in your .tsx file. Simulation files are not included in the build output.
Automatic Discovery
The build automatically discovers and builds all resource folders:src/resources/search/→dist/search/search.html+dist/search/search.jsonsrc/resources/calendar/→dist/calendar/calendar.html+dist/calendar/calendar.json
Metadata JSON Files
The build extracts theresource export from each *-resource.tsx file and writes it to a JSON file with a generated uri field:
uri is generated using the resource name and a build timestamp for cache invalidation.
Build Optimizations
Tree Shaking
Unused code is automatically removed from the bundle:CSS Purging
Tailwind CSS automatically removes unused utility classes:- Only classes actually used in your components are included
- Significantly reduces CSS file size
- No manual configuration required
Usage
Deployment
After building, deploy thedist/ directory to any static hosting service:
Deployment Guide
Learn how to deploy your built apps to production.