Back to Blog/databases

Supabase MCP Server: OAuth, Project Scope, and Read-Only Setup

Configure hosted Supabase MCP with OAuth, project scope, read-only mode, and selected feature groups before granting database access.

Gus MarquezGus MarquezMay 14, 20264 min read
#mcp#developer#databases#supabase

The Supabase MCP server connects an AI client to selected database and platform tools. Use the Supabase listing to identify the official project, then constrain the connection before exposing data. The available tools depend on the selected feature groups and server version.

Docs reviewed October 17, 2026 from Supabase's hosted MCP guide, official repository, and self-hosting instructions. This guide is docs-derived; MCPFind did not connect to a project or execute SQL.

What Tools Does the Supabase MCP Server Expose?

The repository groups tools by purpose, including database, documentation, development, debugging, and functions capabilities. Inspect the enabled groups and tool list for your connection instead of assuming full-platform access. Database schema inspection and applying a migration have different consequences, even when the same client can request both.

Choose Tool Groups for the Task

Choose access around the task:

TaskInitial boundaryReview before expansion
Understand one schemaOne development project, read-only database toolsConfirm the schema and table names in the Dashboard
Consult platform documentationDocumentation toolsKeep retrieved text separate from instructions authorizing a write
Propose a migrationDraft SQL for reviewCheck target, diff, data impact, and normal migration process before applying
Work on an Edge FunctionInspect the current functions tools and permissionsReview source and deployment target before deployment

These are suggested boundaries, not claims that MCPFind exercised the tools. Enable only the groups needed for the chosen task.

How Do You Configure the Supabase MCP Server in Claude and Cursor?

The hosted endpoint is https://mcp.supabase.com/mcp. OAuth with dynamic client registration is the default; interactive setup does not require manually creating a PAT. Use your client's current remote MCP setup and complete the browser sign-in.

For a development schema lookup, the documented parameters can be combined as follows. Replace YOUR_PROJECT_REF and verify the feature groups against the current guide:

json
{
  "mcpServers": {
    "supabase": {
      "url": "https://mcp.supabase.com/mcp?project_ref=YOUR_PROJECT_REF&read_only=true&features=database,docs"
    }
  }
}

project_ref restricts the project and disables account tools; read_only=true uses a read-only Postgres user for queries; features limits tool groups. For CI without browser authentication, Supabase documents a scoped PAT sent in the Authorization header. Keep the value in protected secret storage and grant only the permissions the enabled tools require.

What Are the Security Best Practices for Supabase MCP?

Start with synthetic data in a development project. For the first check, ask:

List table names in the public schema of the selected project. Do not read row contents, apply migrations, or modify anything.

Compare the result with the Dashboard. Read-only access still allows data disclosure, and project scoping does not make untrusted database text safe to follow as instructions. Review the permissions and the data your client can receive before connecting production.

Review proposed SQL and migrations through your normal change process. Require separate approval for a write, including its target and expected effect. Do not use the old service-role-key example as an official hosted MCP authentication route. For a self-hosted stack, follow the separate enablement and security instructions and inspect the resulting tool surface.

How Does Supabase MCP Compare to Other Database MCP Servers?

The official server is a candidate when the task includes Supabase platform capabilities. A direct PostgreSQL connector may better fit a database-only task on another host; compare permissions and supported operations rather than assuming one is universally more capable. See the PostgreSQL guide and database category for alternatives.

What Supabase Features Are Available Through MCP?

Consult the current repository for the enabled tool groups. Current documentation includes functions tools; availability depends on the setup and enabled groups. Hosted, local CLI, and self-hosted setups need their own configuration review; do not promise identical tools across them. For a related use case, see database servers for vector and RAG stacks.

Frequently Asked Questions

Does the Supabase MCP server work with self-hosted Supabase instances?

Follow Supabase's separate self-hosted MCP instructions. Do not assume hosted configuration or tool parity, and do not substitute a project URL and service-role key into the hosted setup.

What is the difference between Supabase MCP and using the Supabase JS client directly?

MCP exposes selected platform tools to an AI client; the JS client is an application library. Their authorization and operation surfaces differ, so they are not interchangeable.

Does the Supabase MCP server expose Edge Function tools?

The current repository documents a functions feature group, including Edge Function tools. Inspect the selected groups and actual exposed tools; availability is not determined by the MCP protocol revision.

How does authentication work with the Supabase MCP server?

The hosted server uses OAuth with dynamic client registration by default. Supabase documents a scoped PAT for CI where browser authentication is unavailable. Self-hosted access has separate instructions.

Related Articles