I Built a Local Dev Tool for ChatGPT Apps SDK (itsnikhil.github.io)

🤖 AI Summary
A developer-built local dev tool recreates the ChatGPT Apps SDK runtime so you can build, preview, and test MCP components entirely offline—no paid ChatGPT account, ngrok tunnel, or MCP server required. It’s a Storybook-like IDE that injects a mock window.openai API into a sandboxed iframe so components behave as if they’re running inside ChatGPT. The goal is to remove the painful setup and long feedback loops that make simple UI iterations and multi-step tool flows slow with the official SDK. Technically, the tool is a React + Vite + TypeScript app with hot reload, a Monaco-based JSON editor for mock data, and IndexedDB-backed widget state simulation. Each component lives in its own folder (manifest.json, component.tsx, mocks/*.json) and the bridge script implements window.openai methods (callTool, getWidgetState, setWidgetState, openExternal, requestDisplayMode, sendFollowUpMessage) using postMessage and local DB operations. It also supports simulating tool routing/switching, exports production-ready bundles via esbuild, and includes templates (List Card, Map Card, Carousel, etc.) to scaffold components quickly. For the AI/ML community this lowers the barrier to experimenting with ChatGPT Apps, speeds iteration, and enables broader frontend contributions to the ecosystem without depending on OpenAI’s live UI.
Loading comments...
loading comments...