Skip to main content

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. These hooks wrap the MCP Apps protocol — see that reference for the underlying request and notification types.

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 an app 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 host-specific APIs, imported from sunpeak/host/chatgpt:
These hooks throw if called outside ChatGPT. Always feature-detect with isChatGPT() first. See Host Detection.

Dive Deeper

Runtime API Reference

All hooks provided by sunpeak.

ChatGPT Hooks

ChatGPT-specific hook API reference.

Host Detection

Detect which host is running your app.