A laptop open on a long wooden table in a quiet library, a database schema diagram on screen

How to Connect Codex to Supabase (and What It Can't Do)

Yes — and it’s one of the most capable vendor MCP servers Codex can connect to. Supabase ships an official MCP server with more than 20 tools: query your database, inspect schemas, generate and apply migrations, manage Edge Functions, and work with database branches — all from a Codex session. Auth is OAuth by default now (a personal access token is no longer required), so the connection is a browser approval, not a token hunt. For full-stack work — “add this column, write the migration, update the API route” — it turns Codex into an agent that touches both halves of the stack. What it doesn’t make Codex: a database operator. Codex won’t watch your Supabase project, notice an Edge Function erroring at 3 a.m., or send anyone a usage report.

Here’s what the Supabase MCP gives Codex, how to connect it, the safety knobs worth setting, and what to use for the always-on layer.


What Codex can actually do with Supabase

Codex — a surface inside the single ChatGPT app on every plan since the July 9, 2026 merge, usage-metered — supports MCP servers across the CLI, desktop app, and IDE extension. Supabase’s server is the deep end of what that unlocks. Connected, Codex can:

  • Query your database in natural language — run SQL against your project, fetch rows, and check data while it reasons about code that depends on it.
  • Inspect and evolve the schema — read table definitions, then generate and apply migrations when a feature needs a schema change.
  • Manage Edge Functions — read, write, and deploy Supabase Edge Functions as part of a coding task.
  • Work with database branches — spin up a branch, test a migration against it, and keep production untouched — which is what makes agent-driven schema work sane.
  • Ship features end to end — schema change, migration, API route, and frontend code in one session, because the agent can see the real database instead of guessing at it.

This is the strongest version of the Codex-plus-MCP story: not just context, but a substantial toolset from the vendor itself.


How to set it up

  1. Add the server to Codex — codex mcp add supabase --url https://mcp.supabase.com/mcp — or via Settings → MCP servers in the ChatGPT desktop app (Streamable HTTP).
  2. Authenticate with OAuth. The Supabase MCP server uses OAuth by default via dynamic client registration — a browser flow, no personal access token to mint.
  3. Scope it down. Supabase supports flags worth using: pin the server to a specific project, and enable read-only mode if you want queries without the ability to mutate.
  4. Ask Codex something database-shaped — “what tables are in this project and how are they related?” — to confirm the tools resolve.

The safety knobs matter here more than with most MCP servers: this one can run migrations against a real database. Use branches for schema work, keep read-only mode on when you don’t need writes, and don’t point an agent with write access at production while you’re still building trust.


The limits that actually matter

  • Codex only touches Supabase inside a session. No watcher, no schedule. Slow queries can pile up, an Edge Function can start failing, storage can creep toward its limit — Codex finds out when you open a terminal and ask.
  • It’s a development tool, not a database operator. The toolset is built for building: migrations, branches, schema work. Monitoring, alerting, usage reporting, and routine data chores on a schedule aren’t what it’s for.
  • Nobody else can use it. The whole surface assumes a developer in a terminal with OAuth scopes and an appetite for approval prompts. A founder who wants “how many new signups this week, emailed to me Monday morning” is not served by any of this.

Codex + Supabase MCP is great for “add the table, write the migration, wire up the API.” It is not built for “keep an eye on the database and tell me what I need to know.”


If you want Supabase watched and reported: Carly

The moment you want your Supabase project handled — an Edge Function that starts erroring becomes a Slack alert, a Monday-morning email reports new signups from your users table, a weekly digest tracks database growth — you need triggers and schedules, not sessions.

That’s where Carly fits. Carly is an AI executive assistant built to act on events across your whole stack, set up by conversation instead of config:

  • No-code setup. Tell Carly “every Monday, query our Supabase users table and email me the week’s signup count” in plain English; it interviews you and builds the workflow.
  • Fires on events and schedules, 24/7, in the cloud — nothing to keep running on your machine.
  • Connects Supabase to the rest of your work — database activity flows into email, Slack, Linear, and your calendar.
  • Actually sends and updates — drafts and sends email (Gmail and Outlook), posts messages, files and updates tickets.

AI agents start at $35/month, and workflow steps that don’t use AI run free and unlimited. Carly connects to 200+ tools natively — including Supabase — and reaches anything else via your own API key.


Codex + Supabase vs Carly

Codex (Supabase via MCP)Carly
Official integrationYes (Supabase’s own MCP, 20+ tools)Yes (/integrations/supabase)
PurposeBuild against the databaseWatch the database, run the routine
Setupcodex mcp add + OAuthDescribe it in plain English
Queries data & schemasYes (in-session)Yes
Runs migrations / manages branchesYesNot its job — it’s an ops layer
Acts on triggers / schedulesNo (pull-only)Yes
Sends reports / notifies the teamNoYes (email, Slack)
Runs without your machineNo (session-scoped)Yes (cloud, 24/7)
Built forDevelopersExecs, EAs, operators
PricingChatGPT plan (usage-metered)AI agents from $35/mo

Codex-with-Supabase is a full-stack coding agent with real database access. Carly is an assistant that keeps you informed about the database and acts when something changes.


Frequently Asked Questions

Does OpenAI Codex integrate with Supabase?

Yes, via Supabase’s official MCP server — 20+ tools covering database queries, schema inspection, migrations, Edge Functions, and database branches. Add it with codex mcp add and authenticate through the default OAuth flow; a personal access token is no longer required.

Can Codex run migrations on my Supabase database?

Yes — that’s a headline capability, and also the reason to be careful. Use Supabase’s database branches so Codex tests schema changes against a branch instead of production, enable read-only mode when you don’t need writes, and keep approval prompts on.

Can Codex monitor my Supabase project for problems?

No. The MCP connection is session-scoped and pull-only — Codex checks your database when you ask, not when something breaks. For alerts, scheduled reports, and trigger-based database workflows, use an agent platform like Carly, which connects to Supabase natively and runs 24/7 in the cloud.

Is the Supabase MCP server official?

Yes — built and maintained by Supabase, announced on their blog and documented in their AI-tools guides, with OAuth by default, project scoping, and a read-only mode. It works with Codex, Claude Code, Cursor, and any MCP client.


More: Codex + GitHub · Codex + Vercel · Codex + Sentry · Claude + Supabase · ChatGPT MCP explained · Codex alternatives

Ready to automate your busywork?

Carly schedules, researches, and briefs you—so you can focus on what matters.

See what people say

"Before Carly, I relied on a Calendly link, but the whole process felt impersonal and not very professional. Carly changed that by handling all the back-and-forth, so I'm no longer stuck in endless email threads trying to line up schedules.

Now Carly reaches out to candidates, shares my real-time availability, lets them pick a slot, then sends a Zoom link and drops it straight into my calendar. She sends reminders to both of us before each call, which has significantly reduced no-shows and last-minute confusion.

On top of scheduling, Carly acts like a full executive assistant, sending me my schedule the night before so I can prepare for each call. It reminds me of the old x.ai assistant, but Carly is noticeably smarter, faster, and better suited to my healthcare recruitment business."

Gus Ibrahim, Founder & Director, IHR