How to Run Your ChatGPT App Locally (April 2026)
The sunpeak Inspector replicating the ChatGPT App runtime locally.
You don’t need a paid ChatGPT account to build a ChatGPT App. With sunpeak, you can develop and test ChatGPT Apps entirely on your local machine using a built-in replica of the ChatGPT runtime called the Inspector. This guide covers everything from first install to connecting with the real ChatGPT.
TL;DR: Run npx sunpeak new sunpeak-app, then cd sunpeak-app && pnpm dev. Open localhost:3000 to test your ChatGPT App in the Inspector. No account, no credits, no manual refreshing.
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, dashboards, carousels, data visualizations, multi-step workflows, anything you can build as a web app.
ChatGPT Apps are built on the Model Context Protocol (MCP). Your App is structured around two MCP primitives:
- Resources are HTML pages rendered in sandboxed iframes inside the chat. These are the UI your user sees.
- Tools are actions the AI model can invoke, like fetching data or running a calculation. When a tool has an associated resource, ChatGPT renders that resource as an interactive App view.
Because ChatGPT Apps use MCP, the same App also works in Claude (as a connector) and other MCP-compatible hosts. The MCP concepts explained post covers the architecture in more detail.
Setting up your local environment
You need Node.js 20 or higher. Then scaffold a project:
npx sunpeak new sunpeak-app
This creates a project with a working ChatGPT App out of the box:
sunpeak-app/
├── src/
│ ├── resources/ # UI components (React views rendered inside ChatGPT)
│ ├── tools/ # Tool handlers (actions the model invokes)
│ └── server.ts # MCP server configuration
├── tests/
│ └── simulations/ # Deterministic test fixtures
└── package.json
Start the development server:
cd sunpeak-app && pnpm dev
This starts two things: your MCP server on port 8000 (handles tool calls and serves resources) and the sunpeak Inspector on port 3000 (a local replica of the ChatGPT App runtime). Open localhost:3000 and you’ll see your App running immediately.
Developing with the Inspector
The sunpeak Inspector replicates how ChatGPT renders MCP Apps, so you can build and test without deploying anything. It shows you exactly how your App will look and behave, including:
- All three display modes: inline, fullscreen, and picture-in-picture
- Light and dark themes
- Tool invocations with configurable mock responses
- Simulation files that load specific App states for repeatable testing
Every code change hot-reloads instantly. No manual browser refresh, no reconnecting to ChatGPT, no 4-click refresh cycle.
The Inspector also supports Claude, so you can switch hosts from the sidebar dropdown and see how your App renders in both environments from one codebase. This works because sunpeak Apps are MCP Apps that run across hosts without code changes.
Testing your App locally
Beyond manual testing in the Inspector, sunpeak includes a testing framework for automated testing. Tests run against the local Inspector using Playwright, which means they replicate real ChatGPT behavior without a paid account or API credits.
pnpm test # run unit + e2e tests
pnpm test:visual # visual regression testing
pnpm test:eval # multi-model LLM evals
Simulation files in tests/simulations/ provide deterministic mock data, so your tests produce the same result every time. You can add these tests to a CI/CD pipeline so every pull request gets validated automatically. The complete guide to testing ChatGPT Apps covers unit tests, E2E tests, visual regression, and evals in depth.
Connecting to the real ChatGPT
When you’re ready to see your App in ChatGPT, expose your local MCP server with a tunneling tool like ngrok (a free account works):
ngrok http 8000
Copy the forwarding URL, then add it in ChatGPT:
- Go to Settings > Apps > Advanced settings
- Enable Developer mode (requires a Plus, Team, or Enterprise account)
- Click Create app and enter your ngrok URL with the
/mcppath, for example:https://abc123.ngrok-free.dev/mcp
Start a new conversation and invoke one of your tools. ChatGPT will call your local MCP server and render your App UI in the chat.
If you don’t have a paid ChatGPT account, the Inspector fully covers local development and testing. You can build and ship your App without connecting to ChatGPT until you’re ready to deploy. See the ChatGPT App without a paid account post for more on this workflow.
Deploying to production
When your App is ready, build and start the production server:
pnpm build && pnpm start
pnpm build compiles your resources into optimized bundles and your tools into production-ready modules. pnpm start launches the MCP server on port 8000 (configurable via the PORT environment variable). Deploy to any Node.js host, or use createMcpHandler for custom Express setups and createHandler for serverless platforms. The deployment guide covers production configuration in detail.
Get started with the quickstart guide, explore the ChatGPT App framework, or try the full tutorial for a deeper walkthrough.
Get Started
npx sunpeak new
Further Reading
- ChatGPT App tutorial - full walkthrough from setup to deployment
- Ship a ChatGPT App in 2 commands - quick-start guide
- Complete guide to testing ChatGPT Apps - unit, E2E, visual, and eval testing
- Building a ChatGPT App without a paid account
- How to deploy an MCP App to production
- ChatGPT App framework - sunpeak overview
- Interactive Inspector demo
- sunpeak quickstart guide
Frequently Asked Questions
How do I run a ChatGPT App on my local machine?
Run "npx sunpeak new", then run "pnpm dev" inside the project directory. This starts an MCP server on port 8000 and the sunpeak Inspector on port 3000. Open localhost:3000 in your browser to see your ChatGPT App running in a replicated ChatGPT runtime. No paid ChatGPT account is needed for local development.
What is the sunpeak Inspector for ChatGPT App development?
The sunpeak Inspector is a local development tool that replicates the ChatGPT and Claude MCP App runtimes at localhost:3000. It renders your App resources exactly as they appear in real hosts, supports all three display modes (inline, fullscreen, picture-in-picture), light and dark themes, tool invocations with mock responses, and hot module replacement so every code change appears instantly.
Do I need a paid ChatGPT account to develop ChatGPT Apps?
No. The sunpeak Inspector replicates the full ChatGPT App runtime locally, so you can build and test without any ChatGPT account. A paid ChatGPT Plus, Team, or Enterprise subscription with developer mode is only needed when you want to connect your App to the real ChatGPT for live testing.
What are ChatGPT Apps and how do they relate to MCP?
ChatGPT Apps are interactive UIs that run inside ChatGPT conversations, built on the Model Context Protocol (MCP). They consist of Resources (HTML pages rendered in sandboxed iframes) and Tools (actions the AI model can invoke). Because they use MCP, ChatGPT Apps also work in Claude and other MCP-compatible hosts without code changes.
How do I test a ChatGPT App automatically?
sunpeak includes a built-in testing framework. Run "pnpm test" to execute unit and end-to-end tests against the local Inspector using Playwright. You can also run "pnpm test:visual" for visual regression testing and "pnpm test:eval" for multi-model LLM evals. Simulation files in tests/simulations/ provide deterministic mock data so tests produce consistent results.
What is the project structure for a sunpeak ChatGPT App?
A sunpeak project has src/resources/ for your App UI components (React views rendered inside ChatGPT), src/tools/ for tool handlers, src/server.ts for server configuration, and tests/ for Playwright test files and simulation fixtures. It comes pre-configured with TypeScript, Vite, and hot module replacement.
What ports does sunpeak use for local ChatGPT App development?
sunpeak uses two ports: localhost:3000 for the Inspector UI where you test your ChatGPT App, and localhost:8000 for the MCP server that handles tool calls and serves your App resources. When connecting to the real ChatGPT, expose port 8000 via a tunneling tool like ngrok.
Can I build one App that works in both ChatGPT and Claude?
Yes. sunpeak Apps are MCP Apps, which means they work across any MCP-compatible host. Write your UI once using portable APIs like useToolData, useHostContext, and useDisplayMode, then test in both ChatGPT and Claude using the Inspector host dropdown. The same codebase runs in both hosts without changes.