ChatGPT App Framework for Building, Testing, and Shipping ChatGPT Apps
sunpeak is an open-source ChatGPT App framework that layers ChatGPT-specific tooling, a ChatGPT runtime inspector, and OpenAI design components on top of a portable MCP App base, so you can build ChatGPT Apps that take full advantage of the OpenAI ecosystem.
npx sunpeak new
What is a ChatGPT App Framework?
ChatGPT Apps are MCP Apps — interactive applications that run inside ChatGPT via the Model Context Protocol (MCP). These apps display rich UI components, handle user interactions, and integrate with external services through MCP servers.
A ChatGPT App framework provides the development infrastructure needed to build MCP Apps for ChatGPT: project scaffolding, local development servers, testing utilities, component libraries, and deployment tooling.
sunpeak is that framework. It handles the complexity of MCP App development, MCP server configuration, and ChatGPT runtime inspection so developers can focus on building their application logic.
Built for the OpenAI Ecosystem
sunpeak's core MCP App APIs work on every host. On top of that portable base, sunpeak layers in optional ChatGPT-specific functionality so your apps feel native inside ChatGPT.
ChatGPT Runtime Inspector
A local inspector that replicates the ChatGPT rendering environment — display modes, themes, safe areas, and conversation context — so you can develop without deploying.
OpenAI Design Components
Pre-built UI components that follow OpenAI's design guidelines. Your ChatGPT App looks and feels like a native part of the ChatGPT interface.
Display Mode APIs
ChatGPT-specific display modes (inline, picture-in-picture, full) via
sunpeak/chatgpt imports.
Adapt your layout to how ChatGPT presents your app. See the App class reference.
Output Templates
Use ChatGPT output templates to control how the model presents your app's data in conversation, giving you control over the full user experience.
CSP & Security
Built-in Content Security Policy configuration for ChatGPT's sandboxed iframe environment. Declare resource domains and permissions in your resource config.
Portable Foundation
All ChatGPT-specific features are opt-in imports. Your core app logic stays portable across ChatGPT, Claude, and other MCP hosts.
How sunpeak works
Scaffold a Project
Run npx sunpeak new to create a new project with TypeScript, React, Vite, and all necessary configuration
pre-configured.
Develop Locally
Use the built-in ChatGPT App inspector to develop and test your ChatGPT App without deploying. Hot Module Replacement (HMR) keeps your development loop fast.
Test in ChatGPT
Connect your local MCP server to the real ChatGPT for integration testing. Mock data and HMR let you iterate without manual refreshes or cache issues.
Build and Ship
Run pnpm build to generate production bundles, then pnpm start to launch a production MCP server. Or mount on your own Express, Cloudflare Workers,
or any HTTP server.
Core Framework Features
- Local ChatGPT Runtime Inspector
A React-based inspector that replicates the ChatGPT and MCP App environment for local development and automated testing.
- MCP App Component Library
Pre-built UI components for ChatGPT Apps, following OpenAI design guidelines.
- Built-in MCP Server
A development MCP server that serves your resources with mock data and hot module replacement.
- TypeScript-First APIs
Strongly typed hooks and utilities for interacting with the MCP App runtime, host APIs, and state management.
- Testing Infrastructure
Built-in testing framework for unit, end-to-end, visual regression, and multi-model eval testing of your MCP Apps and ChatGPT Apps. Run
pnpm testfor unit + e2e,pnpm test:visualfor visual regression, orpnpm test:evalfor LLM tool calling evals. - Production Server
Zero-config production server with
pnpm start, or mount on Express, Cloudflare Workers, and other runtimes.
Test ChatGPT Apps Locally
Use the sunpeak inspector for ChatGPT App testing locally and in CI/CD. The inspector replicates the ChatGPT runtime for deterministic and automatic UI testing.
Who sunpeak is for
Coding Agents
Agents like Claude Code, Codex, and Cursor can scaffold, build, and test ChatGPT Apps with sunpeak's CLI and structured project conventions. No manual setup required.
React Developers
If you know React, you can build MCP Apps. sunpeak uses familiar patterns: functional components, hooks, and JSX.
MCP Server Authors
Decouple your MCP App resources from your MCP server. Develop and version them independently with sunpeak.
Teams Building ChatGPT Integrations
Frontend and backend teams can work independently. Ship UI updates without redeploying your MCP server.
Getting Started
Install sunpeak globally and create a new project:
npx sunpeak new
This scaffolds a complete MCP App project with TypeScript, React, Vite, and the sunpeak
runtime pre-configured. Run pnpm dev to start the development server with the ChatGPT App inspector.
Open Source & MIT Licensed
sunpeak is free to use, modify, and distribute.
Testing ChatGPT Apps? See the Testing Framework page.
Building for multiple hosts? See the MCP App Framework page. Building for Claude? See the Claude Connector Framework page.