---
title: "Building ChatGPT Plugins with Supabase Edge Runtime"
description: "A TypeScript template for ChatGPT Plugins runs on Supabase Edge Runtime (Deno)."
url: "https://swe.quest/articles/building-chatgpt-plugins-with-supabase-edge-runtime-b0cdffa93584d3d5"
canonical: "https://supabase.com/blog/building-chatgpt-plugins-template"
source: "Supabase"
published: "2023-05-15"
difficulty: "medium"
kind: "How-to"
reading_minutes: 6
tags: ["ai-agents","serverless","typescript","api-design"]
---

# Building ChatGPT Plugins with Supabase Edge Runtime

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2023-05-15, 6 min read, How-to. Original: [https://supabase.com/blog/building-chatgpt-plugins-template](https://supabase.com/blog/building-chatgpt-plugins-template)

## Summary

A TypeScript template for ChatGPT Plugins runs on Supabase Edge Runtime (Deno). The required ai-plugin.json manifest is served by importing JSON into the main function handler, since Edge Runtime can't serve static files. The OpenAPI definition is generated from JSDoc annotations on Deno oak routes using swagger-jsdoc. The guide also covers adding ChatGPT-specific CORS headers via oak middleware, running locally with Docker and docker-compose bind mounts, installing the localhost plugin in the ChatGPT UI, and deploying to Fly.io.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)
- [API design](https://swe.quest/tags/api-design.md) (Backend & APIs)

## Prerequisites

- TypeScript basics ([easy posts on TypeScript](https://swe.quest/tags/typescript.md?difficulty=easy))
- Docker and docker-compose ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- OpenAPI specifications

## Keywords

ChatGPT Plugins, Supabase Edge Runtime, Deno, oak, swagger-jsdoc, OpenAPI, Fly.io, Docker

## Related posts

- [Building ChatGPT Apps with Supabase Edge Functions and mcp-use](https://swe.quest/articles/building-chatgpt-apps-with-supabase-edge-functions-and-mcp-use-0df00526c3d8cd4e.md): Supabase · 2025-12-17 · Medium · 9 min read · AI agents, Serverless, TypeScript, React
  ChatGPT apps built on OpenAI's Apps SDK consist of an MCP server backend and an iframe-rendered web component, and mcp-use lets that MCP server run on Supabase Edge Functions by using Hono instead of the Express-based official SDK.
- [Edge Functions are now available in Supabase](https://swe.quest/articles/edge-functions-are-now-available-in-supabase-3c06235615e01037.md): Supabase · 2022-03-31 · Easy · 7 min read · Serverless, CDN & edge, TypeScript, System design
  Supabase Edge Functions run TypeScript globally on the Deno runtime via Deno Deploy across 30+ data centers.
- [Mozilla Llamafile in Supabase Edge Functions](https://swe.quest/articles/mozilla-llamafile-in-supabase-edge-functions-f67e9f7e5ebbcb62.md): Supabase · 2024-08-21 · Medium · 4 min read · Serverless, Inference & serving, LLMs, TypeScript
  Supabase Edge Functions can now use Mozilla Llamafile, alongside Ollama, as the inference server via an OpenAI-API-compatible mode.
- [Supabase Middleware: composable, reusable middleware for Web Fetch handlers](https://swe.quest/articles/supabase-middleware-composable-reusable-middleware-for-web-fetch-handlers-136b7931628c402b.md): Supabase · 2026-10-15 · Medium · 8 min read · TypeScript, Serverless, Identity & auth, API design, AI agents
  \`@supabase/middleware\` is an MIT-licensed, type-safe middleware engine for Web Fetch handlers.
- [Supabase Edge Runtime: Self-hosted Deno Functions](https://swe.quest/articles/supabase-edge-runtime-self-hosted-deno-functions-55b12d1d5db96506.md): Supabase · 2023-04-11 · Medium · 7 min read · Serverless, Runtimes & VMs, JavaScript, Rust, Open source
  Supabase Edge Runtime is an MIT-licensed, Rust-based web server built on deno\_core that self-hosts Deno Edge Functions (TypeScript, JavaScript, WASM) without code changes.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
