How to Run Your ChatGPT App Locally
The sunpeak ChatGPT App simulator running locally.
[Updated 2026-02-05] If you’ve heard about ChatGPT Apps and want to try building one, you might think you need a paid ChatGPT account to get started. You don’t. With sunpeak, you can develop and test ChatGPT Apps entirely on your local machine using a built-in ChatGPT simulator.
TL;DR: Install sunpeak globally, run sunpeak new and sunpeak dev, then open localhost:6767 to use the ChatGPT simulator. No paid ChatGPT account needed.
What is Sunpeak?
Sunpeak is an open-source ChatGPT App Framework built on the MCP Apps protocol. It gives you:
- A local ChatGPT simulator - Test your apps without connecting to ChatGPT
- Project scaffolding - Start with working code, not a blank file
- Hot reloading - See changes instantly as you code
- MCP server - The backend your app needs, already configured
Think of it as “create-react-app” for ChatGPT Apps.
What are ChatGPT Apps?
ChatGPT Apps are interactive UIs that run inside ChatGPT conversations. When a user asks ChatGPT to do something, your app can render a rich interface directly in the chat - forms, charts, carousels, games, anything you can build with React.
Under the hood, ChatGPT Apps are built on the Model Context Protocol (MCP), which means your app is structured around Resources (pages/views) and Tools (actions the AI can invoke).
Getting Started
Prerequisites
You’ll need Node.js 20 or higher installed on your machine.
Step 1: Install sunpeak and create a project
pnpm add -g sunpeak && sunpeak new
This installs sunpeak globally and walks you through creating a new project. Pick a name and choose a template to start with.
Step 2: Start the development server
cd my-app
sunpeak dev
That’s it. Open http://localhost:6767 in your browser.
Using the Local Simulator
The sunpeak simulator mimics the ChatGPT interface so you can test your ChatGPT App without deploying anything. You’ll see a chat interface where you can invoke your app’s tools.
The simulator shows you exactly how your ChatGPT App will look and behave inside ChatGPT, including:
- Different display modes (inline, modal, full-screen)
- Light and dark themes
- Tool invocations and responses
As you edit your code, the simulator hot-reloads automatically. No manual refresh needed.
Project Structure
When you create a sunpeak project, you get:
my-app/
├── src/
│ └── resources/ # Your app's pages/views
├── tests/
│ └── simulations/ # Your app's common test states
└── package.json
Start by editing the files in src/resources/ to customize your UI.
When You’re Ready to Deploy
Once your app works locally, you can connect it to the real ChatGPT:
-
Expose your local server with ngrok:
ngrok http 6766 -
In ChatGPT, go to User > Settings > Apps & Connectors > Create (requires a paid account and developer mode)
-
Add your ngrok URL with the
/mcppath
But there’s no rush. The local simulator is fully functional for development and learning.
Next Steps
- Try the interactive simulator demo in your browser
- Explore the sunpeak documentation
- Please star sunpeak on GitHub!
Frequently Asked Questions
What is sunpeak for ChatGPT App development?
Sunpeak is an open-source framework for building ChatGPT Apps (built as MCP Apps), often described as "Next.js for ChatGPT Apps." It provides a local ChatGPT simulator, project scaffolding, hot reloading, 14+ React hooks, and a pre-configured MCP server.
What are ChatGPT Apps and how do they work?
ChatGPT Apps (also known as MCP Apps) are interactive UIs that run inside ChatGPT conversations. Built on the Model Context Protocol (MCP), they consist of Resources (UI pages/views) and Tools (actions ChatGPT can invoke). Users see rich interfaces like forms, charts, and carousels directly in chat. Use sunpeak to build them quickly.
How do I run a ChatGPT App on my local machine?
Install sunpeak globally with "pnpm add -g sunpeak && sunpeak new", then run "sunpeak dev" in your project directory. Open localhost:6767 in your browser to access the ChatGPT simulator where you can test your ChatGPT App locally.
What can I test in the sunpeak ChatGPT App simulator?
The sunpeak simulator supports testing all three display modes (inline, fullscreen, picture-in-picture), light and dark themes, tool invocations with mock responses, app state management, and real-time hot reloading as you edit code.
What is the project structure for a sunpeak ChatGPT App?
A sunpeak project has src/resources/ for your ChatGPT App's UI components (React files ending in -resource.tsx), and tests/simulations/ for test states. Follow convention over configuration for simplest setup.
Do I need Node.js to develop ChatGPT Apps locally?
Yes. You need Node.js version 20 or higher installed on your machine. Sunpeak uses Node.js to run the development server, build tools, and the local MCP server that serves your ChatGPT App resources.
What ports does sunpeak use for local ChatGPT App development?
Sunpeak uses two ports: localhost:6767 for the ChatGPT simulator UI where you test your ChatGPT App, and port 6766 for the MCP server that serves your app resources. Use ngrok on port 6766 when connecting to the real ChatGPT.
Can I deploy my locally developed ChatGPT App to production?
Yes. After developing your ChatGPT App locally with sunpeak, run "sunpeak build" to create production bundles. You can then deploy to your own MCP server or use the sunpeak Resource Repository with "sunpeak push" to host and version your app resources.