Overview
The simulator is a local development environment that replicates the ChatGPT App host runtime. It uses theChatGPTSimulator React component.
Why Use the Simulator?
Instant Feedback
See changes immediately with hot module replacement. No more cache issues or constantly reloading the host.
Visualize Design Variations
Toggle between light/dark themes, mobile/tablet/desktop views, and other platform states.
Testing
Perform manual and automated tests locally. Create CI/CD integration and regression tests.
No Deployment Needed
Develop locally without setting up MCP servers.
Quick Start
If you set up your project via the sunpeak framework, the simulator is already set up! Simply run it with:To configure the simulator manually, see Add to Existing Project.
Simulations
Simulations define test scenarios for your resources — combining tool definitions, mock data, and platform state.- Framework (JSON)
- Library (TypeScript)
In the sunpeak framework, simulations are JSON files that live in The resource component and metadata are co-located in a single file (See Framework Simulations for the complete JSON schema and conventions.
tests/simulations/.Simulations live in tests/simulations/{name}/:src/resources/example/example-resource.tsx) and automatically linked to simulations based on matching folder names.For library users not using the framework, see the Simulation API Reference for creating simulations programmatically in TypeScript.
ChatGPTSimulator - for local testing
ChatGPTSimulator - for local testing
The For custom setups, you can manually configure the simulator:View ChatGPTSimulator API Reference
ChatGPTSimulator component provides a local development environment that replicates the host runtime.For projects using the sunpeak framework, simulations are auto-discovered. Just run:runMCPServer - for host testing
runMCPServer - for host testing
The See runMCPServer API Reference for configuration options and connecting to a host.View MCP Server API Reference
runMCPServer function serves your simulations to hosts like ChatGPT via the Model Context Protocol.Dive Deeper
Framework Simulations
JSON-based simulations with auto-discovery for framework users.
Simulation API Reference
TypeScript interface for library users.
ChatGPTSimulator API Reference
Full component documentation and configuration options.