Overview
sunpeak provides a multi-platform runtime abstraction layer that helps you build MCP Apps once and deploy them across different AI chat hosts like ChatGPT, Claude, and more.Why Multi-Platform?
Write Once, Deploy Everywhere
Build your app logic once, run it on multiple platforms without rewriting.
Consistent Developer Experience
Same React hooks and patterns across all platforms.
Future-Proof
Automatically support new platforms as they emerge.
Easy Migration
Switch platforms without major code changes.
React Hooks
sunpeak provides access to the entire MCP Apps runtime API via platform-agnostic React hooks. All hooks read from context automatically — no need to pass anapp instance:
Action Hooks
sunpeak provides individual hooks for interacting with the host runtime, including calling MCP tools, sending messages, opening links, and pushing model context updates.Bidirectional Tool Calling
Apps can also register tools that the host can call, enabling two-way communication:ChatGPT-Specific Hooks
Some ChatGPT features go beyond the MCP Apps standard. sunpeak provides typed hooks for these platform-specific APIs, imported fromsunpeak/platform/chatgpt:
| Hook | Description |
|---|---|
useUploadFile | Upload files into the ChatGPT conversation |
useGetFileDownloadUrl | Get temporary download URLs for uploaded files |
useRequestModal | Open a host-controlled modal |
useRequestCheckout | Trigger the instant checkout flow |
Dive Deeper
Runtime API Reference
All hooks provided by sunpeak.
ChatGPT Hooks
ChatGPT-specific hook API reference.
Platform Detection
Detect which host platform is running your app.