Database

Supabase MCP server: scoped database access for every agent

Supabase MCP connects an agent to the official hosted Supabase tools for database and project work. AIPx proxies the OAuth server with configurable project, read-only and feature settings, then applies a separate tool policy for each agent.

Updated 14 October 2026 9 highlighted tools 6 read · 3 write

What your agent can do with Supabase

Inspect tables, extensions, migrations, logs and advisors before considering a write. Project feature settings determine whether migrations, Edge Functions and other tool groups appear. The highlights table is not a permanently complete catalog. SQL execution needs special care: arbitrary SQL can write even when the surrounding task sounds like a query.

Tool What it does Access Mode
list_tables Inspect schema read Allow
list_extensions Extensions read Allow
list_migrations Migration history read Allow
query_logs Read project logs read Allow
get_advisors Security/performance advice read Allow
generate_typescript_types Types from schema read Allow
execute_sql SQL; read only when connection read_only=true write Confirm
apply_migration DDL migration write Confirm
deploy_edge_function Deploy function write Confirm

Source labels describe the checked connection. Live discovery and provider access determine availability; account-specific agent names may be normalized. Modes in this table are recommendations, not a change to upstream permissions.

Capability snapshot: 14 October 2026 · provider source

Choose a development project first. Set project_ref to the intended project and leave read_only enabled while the agent inspects the schema. These upstream settings reduce the surface before AIPx modes apply. The features option further controls which vendor tool groups are available.

Schema context is often enough to improve code. An agent can inspect tables, compare generated TypeScript types with application interfaces, and read advisor findings without changing data. Ask for a proposed migration file in your repository as the output; that leaves the database untouched until your usual review process approves it.

If you disable read-only mode, treat execute_sql as mixed authority. A SQL statement can alter data or schema, and a read-like tool name does not make the statement safe. Set the entire tool to Confirm or Hide for that agent. There is no separate AIPx switch for each SQL keyword inside a call.

Supabase MCP server: official vs AIPx

RouteDatabase boundaryOperational cost
Official remote SupabaseVendor project and read-only optionsOne direct connection per client
Official local or community self-hosted routeChosen implementation and database credentialsYou maintain its runtime and access controls
Official Supabase through AIPxUpstream settings plus agent-specific toolsAnother gateway handles request data

The Supabase MCP guide is the authority for project, read-only and feature settings. The official implementation and a self-hosted community project represent different hosting choices; do not assume they expose identical tools.

For one client with one development project, the direct official route is simpler. AIPx becomes useful when the same agent also needs GitHub code context or Sentry errors, and each agent should have its own database tool set.

Supabase MCP in Claude Code, Cursor and Codex

Choose Supabase, complete OAuth and configure the development project_ref. Keep read_only true initially and select only the necessary features.

  1. Open the AIPx dashboard, choose Supabase under Integrations and complete its connection form or authorization.
  2. Create an MCP agent, enable that connection and choose the tools this particular agent needs. Save the rules before opening your AI client.
  3. Copy the agent’s complete URL. The examples below use AGENT_ID; replace it with the actual value from your dashboard.

An endpoint identifies the AIPx agent, not a provider API key. Client authentication to AIPx is separate from connecting Supabase; adding the URL does not grant extra provider permissions. Our MCP gateway guide explains how several approved connections can share that endpoint.

Connect Claude to Supabase

In Claude, open Customize → Connectors and add a custom connector with your AIPx URL. Continue through AIPx sign-in, then check the tools available in a conversation. Custom connector access depends on account and workspace policy; administrators can restrict it. The Claude MCP setup guide covers the current controls. A direct vendor connection can be simpler when Supabase is the only service you need.

Supabase MCP in Claude Code

claude mcp add --transport http aipx https://dash.aipx.run/mcp/AGENT_ID

Authorize through /mcp and inspect the development schema with upstream read-only mode enabled. Ask for migration code in the repository, not an applied migration. Claude Code MCP setup explains client configuration.

Supabase MCP in Cursor

Add this server to .cursor/mcp.json for the project or ~/.cursor/mcp.json for your user:

{
  "mcpServers": {
    "aipx": { "url": "https://dash.aipx.run/mcp/AGENT_ID" }
  }
}

After Cursor login, check project_ref and read-only settings before inspecting tables. Keep production and mixed SQL execution unavailable during development research. Cursor MCP setup covers discovery and approval controls.

Supabase MCP in Codex

codex mcp add aipx --url https://dash.aipx.run/mcp/AGENT_ID
codex mcp login aipx
codex mcp list

Codex uses the HTTP endpoint and browser OAuth; it does not need a copy of the Supabase credential in its config. See Codex MCP setup for TOML configuration and project trust requirements.

Use the Supabase endpoint in ChatGPT only with supported custom MCP access. Start with development schema context and keep customer rows out of the task. ChatGPT MCP setup explains workspace policy and client eligibility.

Scope Supabase per agent: read-only by default, writes on Confirm

Keep development and production as independently configured connections. The coding agent can inspect the development schema while the production connection stays hidden. A diagnostic agent may read narrowly chosen production logs, but that does not require migrations or SQL writes.

The vendor’s read_only: true setting and AIPx Hide serve different purposes. Preserve the upstream read-only boundary, then hide tools irrelevant to the agent’s task. General read tools start on Allow; dangerous mixed execution requires explicit review when enabled. Confirm relies on client behavior, so use Hide where writes must be unavailable. See MCP permissions.

Keep schema work connected to the application

Linear can provide the acceptance criteria, PostHog the observed behavior and Cloudflare the deployment context. Have the agent assemble a diagnosis from those sources before proposing SQL. A diagnosis is reviewable; a database write has an immediate effect and belongs behind a separate decision.

Supabase limits and production data

Read-only access still exposes data. A model does not need production customer rows merely to understand a foreign key. Use a development project with appropriate test data, and keep production credentials unavailable to the coding agent unless the task requires them.

Supabase project permissions, feature availability and API limits remain in force. Branching, migration and deployment tools depend on selected features. If a tool is absent, inspect the configured feature groups and refresh discovery rather than assuming the gateway dropped a supported operation. AIPx does not promise to forward every upstream protocol resource or subscription primitive.

Browse all MCP integrations to choose another connection for this agent.

The Supabase connection can use AIPx Free with 3 active accounts and 1 agent; check AIPx pricing for gateway plans and keep provider or client charges separate.

AIPx permission matrix for two Gmail accounts, with per-tool Allow, Confirm and Hide modes
Two Gmail accounts on one agent, each with its own Allow, Confirm and Hide rules. Allow and Confirm are client execution hints; Hide removes the tool from this agent.
Connect Supabase once for your agents
Choose the account, enable the needed tools and review the first result.
Connect Supabase free

What to ask your agent

Name the Supabase account and a bounded task. Ask for source identifiers and a proposed result before approving a change.

> List tables in the development project and explain their foreign-key relationships without querying customer rows.
> Compare generated TypeScript types with this repository and list mismatches.
> Read recent development logs for this function and identify the first failing request.
> Review the database advisors and separate findings requiring code changes from schema changes.
> Draft a migration for the proposed index in the repository; do not apply it.
> Inspect migration history and tell me whether the proposed migration has already been applied.

FAQ

Can I connect Supabase to Claude?

Yes. Connect Supabase in AIPx, create an MCP agent and add its copied URL as a Claude custom connector when your account and workspace permit. Choose tools before using the connection.

How do I add Supabase MCP to Claude Code?

Run claude mcp add --transport http aipx https://dash.aipx.run/mcp/AGENT_ID with your actual agent endpoint, then use /mcp to authorize and inspect tools. See Claude Code MCP setup.

Is the Supabase integration free?

AIPx Free includes 3 active connected accounts and 1 agent; Pro is $3/month. Provider subscriptions, API charges and the AI client's own connector access are separate. See AIPx pricing.

Can I connect two Supabase accounts?

Yes. Add separately authorized Supabase connections and choose each account's tools independently for the agent. One endpoint can include both; it does not merge accounts or synchronize provider data.

Can my agent change Supabase data?

Yes, if upstream read-only mode is disabled, the selected feature group exposes the tool and your user has permission. Keep migrations, deployments and mixed SQL execution on Confirm or Hide.

When should I use the official Supabase connection?

Use a direct vendor connection when one service and one client meet your needs and you prefer fewer services handling data. For an API-only service, that can mean using the official API or a compatible server you maintain. AIPx adds shared connections and agent-specific rules.

Other integrations