Why You Need a ChatGPT App Framework (July 2026)

ChatGPT Apps are MCP Apps that render interactive UI inside ChatGPT conversations.
ChatGPT Apps have a cleaner shape than they did a few months ago. OpenAI now documents ChatGPT App UI work through the MCP Apps standard: use _meta.ui.resourceUri, talk to the host through the ui/* bridge, call server tools through the MCP tool surface, and reserve window.openai for ChatGPT-specific extensions.
That makes the case for a ChatGPT App framework more practical. The hard part has moved beyond getting an iframe onto the screen. The hard part is keeping the MCP server, UI resource, host bridge, schemas, resource metadata, and tests in sync while the app grows.
TL;DR: A current ChatGPT App framework should be MCP-first. It should help you define tools and resources, validate structuredContent with outputSchema, handle _meta.ui.resourceUri, wrap the ui/* host bridge, test display modes and host context locally, and keep ChatGPT-only window.openai calls behind feature detection. sunpeak does this with a local inspector, project scaffolding, React hooks, UI components, simulation fixtures, Playwright tests, visual regression tests, live host tests, and multi-model evals.
What Changed Since Early ChatGPT Apps
Early ChatGPT App examples often started from the Apps SDK surface and the window.openai global. That worked for getting a demo running in ChatGPT, but it pushed teams toward code that knew too much about one host.
The current guidance is different. OpenAI says ChatGPT supports the MCP Apps open standard, where app UIs run in sandboxed iframes and communicate with the host through ui/* JSON-RPC over postMessage. The same page recommends building with MCP Apps standard keys and bridge methods by default, then adding ChatGPT extensions only when the shared spec does not cover the feature.
That means a framework should help you write this kind of app:
| App need | Portable MCP Apps path | ChatGPT-specific path |
|---|---|---|
| Link a tool to a UI | _meta.ui.resourceUri | _meta["openai/outputTemplate"] as a compatibility alias |
| Receive host and tool state | ui/initialize, ui/notifications/tool-input, ui/notifications/tool-result | window.openai compatibility state |
| Call a server tool from UI | tools/call through the bridge | window.openai.callTool |
| Send a follow-up message | ui/message | window.openai.sendFollowUpMessage |
| Update model-visible UI context | ui/update-model-context | window.openai.setWidgetState |
| Use ChatGPT-only features | Feature-detected extension layer | File handling, checkout, host modals |
This is the biggest reason a framework matters in June 2026. It should keep the standard path boring and repeatable, while still letting you use ChatGPT features when they are worth it.
What a ChatGPT App Framework Actually Does
A ChatGPT App has more moving pieces than a normal React app.
At minimum, you need:
- An MCP server that exposes tools and resources.
- Tool descriptors with useful names, descriptions,
inputSchema, optionaloutputSchema, annotations, and_meta.ui.resourceUri. - A UI resource that the host can fetch and render in a sandboxed iframe.
- Resource metadata for CSP, permissions, border hints, and host behavior.
- A bridge layer that receives tool input, tool results, host context, display mode, theme, safe area, locale, and viewport data.
- Tool results that separate
content,structuredContent, and_meta. - A local test loop that does not require refreshing a live ChatGPT development app after every save.
You can wire all of that by hand. For a small proof of concept, that may be fine.
For a maintained app, the problem is drift. The server thinks the tool returns one shape. The resource reads another shape. The model sees too much data in structuredContent. The app-only pagination tool shows up to the model. The resource loads locally but fails in ChatGPT because the CSP forgot an API domain. A fullscreen layout works, but picture-in-picture cuts off the primary button.
A good framework turns those failure points into defaults, helpers, and tests.
The Framework Checklist I Would Use
If you are choosing a ChatGPT App framework today, I would ask these questions before writing product code.
1. Is it MCP-first?
The framework should treat ChatGPT Apps as MCP Apps, not as ChatGPT-only widgets. That means the standard fields should be first-class:
_meta.ui.resourceUrifor linking a tool to a UI resource._meta.ui.visibilityfor model-visible, app-visible, or app-only tools.ui/*bridge methods for host communication.tools/callfor server calls from the rendered UI.content,structuredContent, and_metaas separate result channels.outputSchemawhen a tool returns structured data.
The framework can still include ChatGPT-specific helpers. It just should not make those helpers the base contract.
In sunpeak, the base APIs are built for portable MCP Apps. ChatGPT and Claude-specific behavior lives behind host-specific imports and feature gates, which keeps the shared app code easier to test.
2. Can you run the app locally like a host would run it?
A normal browser tab is not enough. Your app is going to run inside a host-controlled iframe with display modes, theme variables, safe areas, bridge events, tool lifecycle messages, and resource metadata.
A framework should give you a local inspector that can render realistic states:
- Initial load before a tool result arrives.
- Successful tool results.
- Empty results.
- Server errors.
- User-cancelled or approval-gated flows.
- Inline, fullscreen, and picture-in-picture layouts.
- Light and dark themes.
- Mobile widths and safe area constraints.
sunpeak includes a replicated ChatGPT and Claude inspector for this. For a new project, run:
npx sunpeak new chatgpt-app
cd chatgpt-app
pnpm dev
For an existing MCP server, run:
npx sunpeak inspect --server http://localhost:8000/mcp
That local loop is the fastest way to find UI and data-contract bugs before you connect the app to ChatGPT developer mode.
3. Does it make schemas hard to skip?
The MCP tools specification defines inputSchema, optional outputSchema, and annotations on tool definitions. For UI-backed tools, skipping the output side is a common source of broken apps.
Use this split:
contentis the short model-readable text summary.structuredContentis the JSON object the model and app can reason over._metais for UI-only helper data when the host supports it.outputSchemadescribes thestructuredContentcontract.
For example, a search tool should not return a vague array and hope the resource knows what to do:
return {
content: [{ type: 'text', text: `Found ${items.length} tickets.` }],
structuredContent: {
tickets: items.map((item) => ({
id: item.id,
title: item.title,
status: item.status,
updatedAt: item.updatedAt,
})),
},
_meta: {
nextCursor: page.nextCursor,
},
};
The app resource can render structuredContent.tickets. The model gets a useful summary and safe structured data. The pagination cursor stays out of the model-visible result.
The framework should make that pattern normal, then help you test it.
4. Can it test the whole MCP boundary?
ChatGPT App bugs often cross boundaries. A unit test for a React component will not catch a stale ui:// resource URI. A tool handler test will not catch a broken fullscreen layout. A manual ChatGPT test will catch too much too late.
A useful framework should support several layers:
| Test layer | What it catches |
|---|---|
| Unit tests | Pure helpers, tool handlers, component branches |
| Integration tests | MCP server calls, tool schemas, result shape, auth errors |
| E2E tests | Resource rendering inside a replicated host |
| Visual regression tests | Theme, display mode, viewport, and styling drift |
| Conformance tests | tools/list, resources/read, resource metadata, CSP, visibility |
| Live host tests | Real ChatGPT or Claude connection behavior |
| Multi-model evals | Whether models call the right tools with useful arguments |
sunpeak’s testing framework covers this stack with local and CI-friendly tests. You still should run a smaller live pass in ChatGPT before launch, but live testing should not be where you first learn that structuredContent changed shape.
What Building Without a Framework Looks Like
Going framework-free means you own every layer.
You can absolutely do this:
mkdir chatgpt-app
cd chatgpt-app
pnpm init
pnpm add @modelcontextprotocol/sdk express zod
Then you need to:
- Register an MCP server endpoint.
- Define tools, schemas, annotations, and metadata.
- Bundle a UI resource.
- Return the right MIME type and resource metadata.
- Implement or wrap the host bridge.
- Keep ChatGPT compatibility aliases aligned with the standard MCP Apps fields.
- Handle CSP and permissions.
- Write local fixtures for tool states.
- Build a browser harness or use an inspector.
- Add tests for server contracts, rendered resources, and host modes.
- Configure deployment and live testing.
That is a reasonable path if the goal is learning the protocol. It is less reasonable if the goal is shipping an app with users, auth, state, error handling, and ongoing host changes.
When You Do Not Need a Framework
You probably do not need a ChatGPT App framework when:
- You are building a server-only MCP tool with no rendered UI.
- You are writing a throwaway prototype to learn the protocol.
- You have one internal tool, no app UI, and no need for cross-host testing.
- You already have an internal platform team maintaining MCP server, resource, bridge, test, and deployment infrastructure.
If the app has a real UI, multiple states, user data, authentication, app-only server actions, or launch plans, a framework starts paying for itself quickly.
Where sunpeak Fits
sunpeak is an open-source MCP App framework and MCP testing framework. Because ChatGPT Apps are MCP Apps, sunpeak is also a ChatGPT App framework. Because interactive Claude Connectors follow the same app pattern, sunpeak is also a Claude Connector framework.
The important part is the workflow:
- Scaffold a project with
npx sunpeak new. - Build tools and resources with typed contracts.
- Develop in a local inspector that replicates ChatGPT and Claude runtimes.
- Pin tool states with simulation fixtures.
- Run unit, integration, E2E, visual regression, live host, and eval tests.
- Deploy the MCP server and run a smaller real-host launch pass.
That flow keeps the expensive manual loop small. You still test the real host, because real hosts matter. You just do not use ChatGPT developer mode as your first line of feedback for every UI state.
Get Started
For a new ChatGPT App:
npx sunpeak new chatgpt-app
cd chatgpt-app
pnpm dev
For an existing MCP server:
npx sunpeak inspect --server <url-or-command>
Start with the quickstart guide, then read the current OpenAI Apps SDK docs, the MCP Apps compatibility guide, and the MCP Apps overview. Those are the references I would keep open while building any ChatGPT App in June 2026.
Get Started
npx sunpeak newFurther Reading
- ChatGPT App framework - build and test ChatGPT Apps with sunpeak
- MCP App framework - portable app architecture across supported hosts
- MCP testing framework - local, E2E, visual, live, and eval testing
- How to Build a ChatGPT App - current setup, UI, testing, and deployment guide
- What I Wish I Knew About Building ChatGPT Apps - bridge, lifecycle, and testing lessons
- MCP App Tool Metadata - resourceUri, visibility, and app-only tools
- MCP App outputSchema - validate structuredContent for ChatGPT Apps
- Complete Guide to Testing ChatGPT Apps and MCP Apps
- sunpeak quickstart - create an MCP App or inspect an existing server
- sunpeak MCP Apps documentation - core concepts and APIs
- OpenAI Apps SDK documentation - official ChatGPT App docs
- MCP Apps compatibility in ChatGPT - OpenAI guidance on the standard bridge
- MCP Apps overview - official Model Context Protocol extension docs
- MCP tools specification - inputSchema, outputSchema, and tool annotations
- GitHub - sunpeak source code
Frequently Asked Questions
What is a ChatGPT App framework?
A ChatGPT App framework is development infrastructure for building interactive apps that run inside ChatGPT. Because current ChatGPT Apps are MCP Apps, a useful framework should help with MCP tools, UI resources, _meta.ui.resourceUri, the ui/* host bridge, structuredContent, outputSchema, local inspection, and automated testing.
Why do I need a framework to build ChatGPT Apps?
You can build a ChatGPT App without a framework, but you still need to solve project structure, MCP server setup, UI resource bundling, host bridge behavior, local testing, schema validation, display modes, resource metadata, and deployment. A framework is useful when it turns those repeated decisions into tested defaults.
Should new ChatGPT Apps use window.openai or the MCP Apps standard?
Use the MCP Apps standard first for portable behavior: _meta.ui.resourceUri, ui/* bridge methods, tools/call, ui/message, and ui/update-model-context. Use window.openai only for ChatGPT-specific features such as file handling, checkout, or host modals, and feature-detect those APIs before calling them.
What should a ChatGPT App framework test?
It should test tool discovery, inputSchema, outputSchema, content, structuredContent, _meta, UI resource loading, CSP, display modes, host context, app-only tools, loading states, error states, visual regressions, and model tool-calling behavior. The best tests run locally and in CI before you spend time in live ChatGPT developer mode.
Can I build a ChatGPT App without a framework?
Yes. You can use the OpenAI Apps SDK documentation, the MCP specification, and an MCP SDK directly. That works for small experiments. For a product you plan to maintain, a framework reduces drift between the server contract, rendered resource, host bridge, local tests, and deployment shape.
Does sunpeak work across ChatGPT, Claude, and other MCP hosts?
Yes. sunpeak is an open-source MCP App framework, ChatGPT App framework, Claude Connector framework, and MCP testing framework. Core APIs target the portable MCP Apps path, while host-specific capabilities are opt-in so the same app can be tested against replicated ChatGPT and Claude runtimes.
How do I test a ChatGPT App without a paid ChatGPT account?
Use a local inspector such as sunpeak. Run npx sunpeak new for a new app, or npx sunpeak inspect --server <url-or-command> for an existing MCP server. The inspector renders tools and UI resources in replicated ChatGPT and Claude runtimes, so most development and CI testing does not need a live ChatGPT session.
What is the best ChatGPT App framework?
The best framework is the one that follows the MCP Apps standard, keeps ChatGPT-specific extensions optional, validates tool and resource contracts, supports local inspection, and runs automated tests in CI. sunpeak is built around that shape and is a strong default for teams building portable ChatGPT Apps.