Building ChatGPT Apps with Supabase Edge Functions and mcp-use
Blog post from Supabase
ChatGPT apps are extensions that allow ChatGPT to display interactive interfaces and connect to external services, consisting of an MCP server and a web component, with ChatGPT serving as the intermediary that determines which tool to call. The mcp-use is an open-source TypeScript SDK used for building MCP servers, enabling compatibility with edge environments by using Hono instead of Express. This allows MCP servers to operate on serverless platforms like Supabase Edge Functions and Cloudflare Workers. The guide outlines building a ChatGPT app for exploring Supabase databases, featuring tools like List tables and Execute SQL, which provide both data and interactive React widgets. The deployment process involves Supabase Edge Functions, known for their speed and scalability, and the app integrates with ChatGPT by enabling developer mode and connecting through a new ChatGPT App. The document also discusses organizing UI widgets, registering tools, and suggests extending the app by adding more tools, custom widgets, and implementing write operations with proper authorization checks.