Deploy to Sunpeak
Deploy your widget using the Sunpeak CLI.1
Login to Sunpeak
Authenticate with your Sunpeak account:This opens your browser for authentication. You only need to do this once.
2
Build and deploy
Build your widget and deploy to production:The
deploy command pushes your built resources with the prod tag,
so that they can be easily pulled and served by your production MCP server.Version Management
Use tags to manage different versions of your resources:Resource names must be unique within a repository. If you push a resource with a name that already exists, it will update the existing resource.
Production MCP Server
Your production MCP server pulls resources from Sunpeak at startup usingsunpeak pull. This ensures your server always serves the latest deployed version.
Pulling Resources at Startup
Runsunpeak pull before starting your MCP server to download your production resources:
prod to the ./resources directory:
Example Startup Script
Add a startup script to your production MCP server’spackage.json:
Your production server needs Sunpeak credentials. Run
sunpeak login on the server, or set the SUNPEAK_ACCESS_TOKEN environment variable with a valid token.Serving Pulled Resources
Your MCP server reads the pulled.js and .json files to serve resources. The metadata JSON contains the resource URI and other properties needed by ChatGPT: