Edge Functions

Server-side logic without servers.

We host your TypeScript functions on the Deno Edge Runtime inside your project's stack. Webhooks, payments, e-mails or AI model calls — write them in the dashboard editor and deploy with ⌘S, through the API or from an AI agent.

Deploy from dashboard, API and MCPSecrets and verify_jwtp50/p95 metrics and logsnpm: and jsr: packages
functions/stripe-webhook/index.ts
import { createClient } from 'npm:@supabase/supabase-js@2'

const db = createClient(
  Deno.env.get('SUPABASE_URL')!,
  Deno.env.get('SUPABASE_SERVICE_ROLE_KEY')!,
)

Deno.serve(async (req) => {
  const event = await req.json()

  if (event.type === 'checkout.session.completed') {
    await db.from('orders')
      .update({ status: 'paid' })
      .eq('session_id', event.data.object.id)
  }

  return new Response('ok')
})

Capabilities

What you get with Edge Functions

TypeScript and Deno

A modern runtime with npm imports, Web APIs and native TypeScript.

Deploy from dashboard, API and MCP

A code editor in the dashboard, the Management API (PUT /functions/:name) or the deploy_edge_function tool for AI agents.

Templates

Hello world, Supabase client, Stripe webhook, e-mail via Resend, AI chat with Claude, CORS and scheduled jobs.

Secrets and verify_jwt

Environment variables kept out of code (import from .env) and per-function JWT enforcement.

Tester, metrics and logs

Invoke from the dashboard with the anon or service_role key, charts for invocations, errors and p95, plus console logs.

Database access

SUPABASE_URL and the project keys are available in every function — with user context or service_role.

Use cases

What teams use it for

Webhooks

Stripe, Adyen, PayU, GitHub — handle events from the outside world.

AI integrations

Call language models with keys kept on the server.

Background jobs

PDF generation, notifications, data sync.

Build in a weekend. Scale to millions.

Spin up a free project in 2 minutes. No credit card, no pausing after a week.