---
title: "Supabase MCP server: manage Postgres and migrations with AI agents"
canonical_url: https://cookiesforai.app/mcp/supabase
last_updated: 2026-10-03T10:04:47+02:00
type: mcp
summary: "The Supabase MCP server gives AI agents access to your Supabase projects: list tables, run SQL, apply migrations, read logs and advisors, deploy edge functions, manage branches and search Supabase docs."
install: "claude mcp add --scope project --transport http supabase \"https://mcp.supabase.com/mcp\""
related:
  - "https://cookiesforai.app/mcp/dbhub"
  - "https://cookiesforai.app/mcp/mongodb"
  - "https://cookiesforai.app/mcp/neon"
  - "https://cookiesforai.app/mcp/postgres-mcp-pro"
---

# Supabase MCP server

The Supabase MCP server gives AI agents access to your Supabase projects: list tables, run SQL, apply migrations, read logs and advisors, deploy edge functions, manage branches and search Supabase docs.

| Fact | Value |
|---|---|
| Publisher | Supabase (official) |
| Source | https://github.com/supabase/mcp |
| License | Apache-2.0 |
| GitHub stars | 2,927 on 2026-10-02 |
| Last code push | 2026-10-01 |
| Page updated | 2026-10-03 |
| Hosted endpoint | https://mcp.supabase.com/mcp |
| Official MCP Registry | com.supabase/mcp |
| Documented clients | Claude Code, Claude.ai, ChatGPT, Codex, Cursor, VS Code, GitHub Copilot, Gemini CLI, Grok, OpenCode, Goose, Google Antigravity, Kiro, Devin Desktop, Kimi Code, Warp, Factory, fx |
| Category | Databases |
| Free tier | Free plan |
| Cost | The server costs nothing extra and is open source under Apache-2.0; it works with any Supabase plan, including the Free plan. |
| Current prices | https://supabase.com/pricing |
| Facts checked | 2026-10-02 |

## Connect

Claude Code, project config (then run claude /mcp and choose Authenticate):

```
claude mcp add --scope project --transport http supabase "https://mcp.supabase.com/mcp"
```

Codex (then run codex mcp login supabase):

```
codex mcp add supabase --url "https://mcp.supabase.com/mcp"
```

Gemini CLI:

```
gemini mcp add -t http supabase "https://mcp.supabase.com/mcp"
```

Cursor, VS Code and most clients:

```
{"mcpServers": {"supabase": {"type": "http", "url": "https://mcp.supabase.com/mcp"}}}
```

Append ?project_ref=<id>&read_only=true to the URL to limit the agent to one project with read-only SQL. The connection tab in the Supabase dashboard builds a custom URL for your project.

## Ask your coding agent

```text
Connect the Supabase MCP server to my coding agent using its documented setup: https://github.com/supabase/mcp.
```

## What it does

The Supabase MCP server connects an AI agent to Supabase, the Postgres-based backend platform. Through it an agent can list your projects and tables, run SQL, write and apply migrations, list extensions, generate TypeScript types from the schema, and read the security and performance advisors. It can also read logs, deploy edge functions, fetch project URLs and keys, and search Supabase's documentation.

Supabase's server ties into its development branches: an agent can create a branch database, test a migration there and merge it back, which keeps experiments off production. URL parameters narrow what the agent can reach: project_ref limits it to one project, read_only=true runs SQL as a read-only Postgres user, and features picks tool groups such as database or docs. Supabase also wraps SQL results with instructions meant to discourage the model from following commands hidden in your data.

Supabase hosts the server at mcp.supabase.com with OAuth sign-in, and a local Supabase CLI stack serves a smaller tool set at localhost:54321/mcp. The open-source package also lets you serve the tools from your own endpoint. The GitHub repo had 2,925 stars on 2026-10-01.

Tools it gives your agent: `list_projects`, `list_tables`, `execute_sql`, `apply_migration`, `list_migrations`, `list_extensions`, `get_advisors`, `generate_typescript_types`, `deploy_edge_function`, `create_branch`, `merge_branch`, `search_docs`

## When to use it

- You build on Supabase and want the agent to design tables and write migrations against the real schema.
- You want the agent to read the security advisor and fix missing row level security policies.
- You need to deploy or debug an edge function from your editor.
- You want schema experiments to happen on a branch database, not on production.

## When to pick something else

- Giving to customers or end users: Supabase warns the server runs with your developer permissions.
- Production data with full access: prompt injection in stored data could trick the agent into harmful queries, so use read_only=true and project_ref there.

## What it needs

- A Supabase account (OAuth sign-in on first use)

## Questions people ask

### Is the Supabase MCP server free?

Yes. The server has no separate price and works on Supabase's Free plan; you pay only if you move to a paid Supabase plan (pricing page, 2026-10-01).

### Can the Supabase MCP server write to my database?

Yes by default: it can run any SQL, apply migrations and deploy functions. Add read_only=true to the URL to run queries as a read-only Postgres user and drop the mutating tools.

### Does the Supabase MCP server work with ChatGPT?

Yes. Supabase's setup docs list ChatGPT and Claude.ai among web clients, along with Codex, Claude Code, Cursor, VS Code, Gemini CLI and Grok.

## Related

### Other MCP servers for databases

- [DBHub](https://cookiesforai.app/mcp/dbhub): DBHub is an open-source MCP server by Bytebase that gives AI agents SQL access to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle and SQLite through one server with two default tools.
- [MongoDB](https://cookiesforai.app/mcp/mongodb): The MongoDB MCP server gives AI agents access to MongoDB databases and MongoDB Atlas: run find and aggregate queries, inspect schemas and indexes, and create or manage Atlas clusters and users.
- [Neon](https://cookiesforai.app/mcp/neon): The Neon MCP server gives AI agents control of Neon serverless Postgres: create projects and branches, run SQL, inspect schemas, find slow queries and run migrations on a branch before applying them.
- [Postgres MCP Pro](https://cookiesforai.app/mcp/postgres-mcp-pro): Postgres MCP Pro is an open-source MCP server that gives AI agents access to a PostgreSQL database, with schema browsing, safe SQL execution, EXPLAIN plans, index recommendations and database health checks.

