# Supabase

Connects Supabase projects to AI coding tools over MCP. Allows assistants to inspect database schemas and query project tables.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 2969
- Author: supabase
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/supabase/mcp/tree/HEAD/packages/mcp-server-supabase
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/supabase

## What it does

The server links AI assistants to hosted or local Supabase instances using HTTP or local stdio via `@supabase/mcp-server-supabase`. It talks to the database directly. The model can inspect table structures and fetch rows without manual context pasting.

Parameters like `read_only=true` block mutating calls, while `features` narrows the active tools to specific domains. Local Supabase CLI instances at `http://localhost:54321/mcp` and self-hosted deployments omit OAuth 2.1 and offer a reduced set of tools.

For custom integrations, the package exports `createToolSchemas` for Vercel AI SDK and `createSupabaseMcpHandler` for self-hosted endpoints. The server does not send `structuredContent` in tool results, meaning clients parse JSON directly from message text.

## Requirements
- Needs: Node.js (commands run via npx)
- Remote server: `https://mcp.supabase.com/mcp`
- Environment variables: `SUPABASE_ACCESS_TOKEN` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: Supabase

## Install

### Claude Code (native platform)

1. **Platform CLI: remote server**
```bash
claude mcp add --transport http mcp https://mcp.supabase.com/mcp
```

2. **Platform CLI**
```bash
claude mcp add --env SUPABASE_ACCESS_TOKEN=<SUPABASE_ACCESS_TOKEN> --transport stdio mcp-server-supabase -- npx -y @supabase/mcp-server-supabase
```
Replace <…> with your own values

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add mcp-server-supabase --url https://mcp.supabase.com/mcp
```

2. **Platform CLI**
```bash
codex mcp add mcp-server-supabase --env SUPABASE_ACCESS_TOKEN=<SUPABASE_ACCESS_TOKEN> -- npx -y @supabase/mcp-server-supabase
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-server-supabase": {
            "url": "https://mcp.supabase.com/mcp"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-server-supabase": {
            "command": "npx",
            "args": [
                "-y",
                "@supabase/mcp-server-supabase"
            ],
            "env": {
                "SUPABASE_ACCESS_TOKEN": "<SUPABASE_ACCESS_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-server-supabase": {
            "type": "http",
            "url": "https://mcp.supabase.com/mcp"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-server-supabase": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@supabase/mcp-server-supabase"
            ],
            "env": {
                "SUPABASE_ACCESS_TOKEN": "<SUPABASE_ACCESS_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http mcp-server-supabase https://mcp.supabase.com/mcp
```

2. **Platform CLI**
```bash
gemini mcp add -e SUPABASE_ACCESS_TOKEN=<SUPABASE_ACCESS_TOKEN> mcp-server-supabase npx -y @supabase/mcp-server-supabase
```
Replace <…> with your own values

## When to use it
- inspect database schemas and table definitions
- execute SQL queries directly from an assistant prompt
- restrict AI tools to safe read-only operations
- retrieve project configuration parameters

## Example prompts
- Inspect the schema for the profiles table in my Supabase project.
- Query the latest ten signups from the users table.
- Connect to Supabase in read-only mode and list all active tables.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27669
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49845

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
