Architecture
ChatGPT Apps consist of two main parts — a MCP Server and a Web Client. From the ChatGPT interface, the app connects directly to the MCP Server, which handles authentication and provides tools, prompts, and resources. The MCP Server also serves the app’s UI — either by sending the HTML, JavaScript, and CSS directly, or by returning a URL to the Web Client that hosts these assets. Once loaded, the Web Client’s content is rendered back inside ChatGPT for the user to interact with.Application Design
The best ChatGPT apps are those that help people accomplish something meaningful. The experience is a combination of chat with a visual and interactive elements. Good use cases include ride booking, ordering food, or tracking a delivery. The hardest part is differentiating whether the experience is better suited as a Chat-based app or a Web app/Website. The design principles mentioned by OpenAI:- Conversational: Experiences should feel like a natural extension of ChatGPT, fitting seamlessly into the conversational flow and UI.
- Intelligent: Tools should be aware of conversation context, supporting and anticipating user intent. Responses and UI should feel individually relevant.
- Simple: Each interaction should focus on a single clear action or outcome. Information and UI should be reduced to the absolute minimum to support the context.
- Responsive: Tools should feel fast and lightweight, enhancing conversation rather than overwhelming it.
- Accessible: Designs must support a wide range of users, including those who rely on assistive technologies.
Recommended project structure
1. Build the app web assets
In the example project:2. Define widget metadata
ChatGPT Apps understand OpenAI-specific tool annotations. This example widget uses:EmbeddedResource, ChatGPT hydrates the widget using the referenced HTML template.
3. Testing your app
Install the dependencies:- Start the MCP server on port 8000
- Serve the web client at http://127.0.0.1:8000
- Serve static assets (JS/CSS) at http://127.0.0.1:8000/static
- Click Tools > List Tools to see the tools
- Click Resources > List Resources to see the widget HTML template
- Run the a tool to see the widget metadata and structured result
