ChatGPT App framework
Build ChatGPT Apps
without the guesswork.
ChatGPT Apps are MCP Apps. moonpeak writes the ChatGPT Apps SDK metadata for you, replicates window.openai on localhost and tests your app in a ChatGPT-style host before you ever open ChatGPT.
One app, ChatGPT included.
Every moonpeak resource carries the MCP Apps metadata and the older ChatGPT keys side by side, so the same build renders in ChatGPT, Claude and every other host.
resourcebecomesopenai/outputTemplate.invoking/invokedbecome ChatGPT's status texts.- App-only tools get
openai/visibility: privateandopenai/widgetAccessible. - Resource
cspbecomesopenai/widgetCSP. useAppStatesaves to ChatGPT widget state automatically.
export const tool = {
title: "Show moon phase",
description: "Show the moon phase for a date.",
resource: "moon",
invoking: "Looking up", // ChatGPT status while running
invoked: "Here's the moon", // ...and after
};import { useIsChatGPT, useWidgetState, useUploadFile } from "moonpeak/chatgpt";
export default function Gallery() {
const chatgpt = useIsChatGPT();
const upload = useUploadFile(); // null outside ChatGPT
// ...
}ChatGPT extras when you need them.
moonpeak/chatgpt exposes widget state, file upload, modals, user agent and any window.openai global. Each hook is safe to call in other hosts, where it returns an empty value.
Try it in ChatGPT.
Deploy over HTTPS, then in ChatGPT open Settings → Apps, turn on Developer mode and create an app with your /mcp URL. Or add the live demo, https://moonpeak-ai.com/mcp, to see it first.
npm run build && npm start # http://localhost:8000/mcp npx moonpeak test --server https://your-domain/mcp