Build a pizza app with the Apps SDK

by SkillAiNest

Openei has recently introduced ChatGPT apps, powered by new Apps SDK and Model Context Protocol (MCP).

Think of these apps as plugins for ChatGPT:

  • You can ask them naturally in conversation.

  • They can offer custom interactive UIs within ChatGPT (maps, carousels, videos, and more).

  • They run on an MCP server that you control, which defines the tools, resources, and widgets provided to the app.

In this step-by-step guide, you will create a ChatGPT app using official An example of a pizza app. This app shows how ChatGPT can render UI widgets like pizza maps or carousels powered by your local server.

will you learn

By following this tutorial, you will learn how to:

  • Compile and run the ChatGPT app with the OpenAApps SDK.

  • Understand the basic building blocks: tools, resources and widgets.

  • Connect your local app server to ChatGPT using developer mode.

  • Present a custom UI directly within a Chat GPT conversation.

Table of Contents

How Chat GPT Apps Work (Big Picture)

Here is the architecture in simple terms:

ChatGPT (frontend)
   |
   v
MCP Server (your backend)
   |
   v
Widgets (HTML/JS markup displayed inside ChatGPT)
  • Chat GPT Sends requests such as: “Show me a pizza carousel.”

  • MCP server Responds with resources (HTML markup) and tool logic.

  • Widget Chat is offered online in GPT.

Step 1. Clone the examples repo

Openeye provides an official examples repo that includes the Pizza app. Clone it and install the dependencies using these commands:

git clone https://github.com/openai/openai-apps-sdk-examples.git
cd openai-apps-sdk-examples
pnpm install

Step 2. Run the Pizza App Server

Go to the Pizza App server and start it:

cd pizzaz_server_node
pnpm start

If it works, you should see:

Pizzaz MCP server listening on http://localhost:8000
  SSE stream: GET http://localhost:8000/mcp
  Message post endpoint: POST http://localhost:8000/mcp/messages

This means your server is running locally.

Step 3. Expose your local server

In order for ChatGPT to communicate with your app, your local server needs a public URL. NGROK provides a quick way to expose this during development.

3.1 Get ngrok

Sign up ngrok.com And make your own copy AuthToken.

3.2 Install ngrok

macOS:

brew install ngrok

Windows:

  • Download and unzip ngrok.

  • Optionally, add the folder to your path.

3.3 Connect your account

ngrok config add-authtoken 

3.4 Start a tunnel

ngrok http 8000

This gives you a public HTTPS URL (eg https://xyz.ngrok.app/mcp)

Step 4. Run through the Pizza App code

The complete Pizza App server code is long, so let’s break it down into digestible parts.

4.1 Imports and Setup

import { createServer } from "node:http";
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
import { z } from "zod";

4.2 Description of the Pizza Widget

Widgets are the heart of the app. Each UI represents a piece of chat that can display.

Here is the Pizza Map widget:

{
id: "pizza-map",
title: "Show Pizza Map",
templateUri: "ui://widget/pizza-map.html",
html: ` 

Subscribe my Newsletter for new blog posts, tips & new photos. Let's stay updated!

At Skillainest, we believe the future belongs to those who embrace AI, upgrade their skills, and stay ahead of the curve.

Get latest news

Subscribe my Newsletter for new blog posts, tips & new photos. Let's stay updated!

@2025 Skillainest.Designed and Developed by Pro