---
title: "Give your Supabase app its own MCP server"
description: "Supabase apps can expose their own MCP server so customers use the app from ChatGPT, Claude or other MCP clients, signed in with their existing account."
url: "https://swe.quest/articles/give-your-supabase-app-its-own-mcp-server-db89f29412fb7983"
canonical: "https://supabase.com/blog/give-your-supabase-app-its-own-mcp-server"
source: "Supabase"
published: "2026-10-22"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 5
tags: ["ai-agents","identity-auth","postgres","serverless","typescript"]
---

# Give your Supabase app its own MCP server

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2026-10-22, 5 min read, Announcement. Original: [https://supabase.com/blog/give-your-supabase-app-its-own-mcp-server](https://supabase.com/blog/give-your-supabase-app-its-own-mcp-server)

## Summary

Supabase apps can expose their own MCP server so customers use the app from ChatGPT, Claude or other MCP clients, signed in with their existing account. An installable MCP Server block generates an Edge Function with an MCP handler, OAuth middleware and per-file tools. Supabase Auth acts as the OAuth 2.1 server, and \`withSupabase({ auth: 'user' })\` gives each tool a user-scoped client, so Postgres RLS policies govern what an agent can reach without a service role key. Setup requires asymmetric signing keys, dynamic client registration, a consent page and \`verify\_jwt = false\` on the function; MCP Apps can render reused React components inside the chat.

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)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)

## Prerequisites

- Supabase Auth and RLS ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))
- OAuth 2.1 basics ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))
- Model Context Protocol

## Keywords

Supabase, Model Context Protocol, Supabase Edge Functions, Row Level Security, OAuth 2.1, MCP Apps, Zod

## Related posts

- [Supabase MCP Server](https://swe.quest/articles/supabase-mcp-server-d66dd26bdd24699a.md): Supabase · 2025-04-04 · Medium · 6 min read · AI agents, PostgreSQL, Developer tools, LLMs
  Supabase ships an official MCP server with 20+ tools that let AI clients like Cursor and Claude create projects, manage tables via migrations, run SQL, create database branches, fetch config and logs, and generate TypeScript types.
- [Build "Sign in with Your App" using Supabase Auth](https://swe.quest/articles/build-sign-in-with-your-app-using-supabase-auth-a42222eedce43362.md): Supabase · 2025-12-04 · Medium · 6 min read · Identity & auth, AI agents, PostgreSQL
  Supabase Auth can now act as an OAuth 2.1 and OpenID Connect identity provider, letting a project offer "Sign in with \[Your App\]" to third-party apps, MCP-based AI agents, partner integrations and enterprise SSO.
- [Introducing @supabase/server](https://swe.quest/articles/introducing-supabase-server-014f7e505754650d.md): Supabase · 2026-05-06 · Medium · 8 min read · Identity & auth, Serverless, TypeScript, Developer tools
  @supabase/server, now in public beta, replaces the repeated setup code found across 25,000 analyzed Edge Functions: client creation, JWT verification, claims parsing, CORS and auth wiring.
- [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.
- [Every app needs an MCP server, and you can build it with Neon](https://swe.quest/articles/every-app-needs-an-mcp-server-and-you-can-build-it-with-neon-1a5ce4eab0583eca.md): Neon · 2026-11-25 · Easy · 11 min read · AI agents, Identity & auth, Serverless, PostgreSQL
  An MCP server lets users drive an app from AI assistants like ChatGPT, Claude and Cursor through tools the app defines, which keeps authorization and validation in app code instead of exposing the UI or raw database access.

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)
