Query MCP for Supabase

by @alexander-zuev

Query For Supabase MCP Server

Query MCP connects coding assistants to Supabase SQL, schema changes, project management, and user administration. It includes SQL risk controls, but its author has stopped active maintenance.

Databases833pythonApache-2.0

Server facts

Query MCP for Supabase

GitHub stars

833

Last commit

Aug 21, 2026

Runtime

python

License

Apache-2.0

Project

License
Apache-2.0
Category
Databases

Tech

Runtime
pythonPython
Transports
stdio
Remote access
No

Activity

GitHub stars
833
Last commit
Data as of

Tags

  • Python
  • Schema Management
  • Sql
  • Supabase

Overview

Query MCP for Supabase gives an MCP-enabled coding environment access to database work and selected Supabase administration features. It supports SQL execution with configurable read and write access, evaluates query risk at runtime, and separates operations into safe, write, and destructive classes. Schema changes receive automatic versions, while transaction handling covers direct local connections and remote transaction pooling. The README lists Cursor, Windsurf, Cline, and Claude Desktop among the clients tested with its stdio interface. The package requires Python 3.12 or newer.

Beyond SQL, the server can use the Supabase Management API and Auth Admin methods from the Python SDK. Those capabilities need their respective access token and service-role credential. Every operation also requires a Query API key from thequery.dev. Remote database configuration includes a project reference, password, and matching hosting region; local defaults target a development instance. Packaged installations read environment variables or a global configuration file rather than a project-local environment file. Custom connection strings, session pooling, and self-hosted deployments outside the documented local setup are unsupported. Most importantly, the author says active maintenance has ended following the release of Supabase's official MCP server. That status is central when deciding whether to adopt this implementation.

Install & configure

Requirements

  • Python 3.12+
  • uv for this launch command
  • Install the supabase-mcp-server package
  • A Supabase hosted project or local development instance
Documented launch / install command
uv run supabase-mcp-server

The README installs the package with uv pip install supabase-mcp-server before launching it. Packaged installs do not load project-local .env files. Claude Desktop requires an absolute executable path. Active maintenance has ended.

Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Desktop configuration
{
  "mcpServers": {
    "supabase-mcp-server": {
      "command": "uv",
      "args": [
        "run",
        "supabase-mcp-server"
      ],
      "env": {
        "QUERY_API_KEY": "<API key from thequery.dev>",
        "SUPABASE_PROJECT_REF": "<Project reference or local host and port>",
        "SUPABASE_DB_PASSWORD": "<Database password>",
        "SUPABASE_REGION": "<Hosting region for a remote project>",
        "SUPABASE_ACCESS_TOKEN": "<Optional Management API access token>",
        "SUPABASE_SERVICE_ROLE_KEY": "<Optional Auth Admin service-role key>"
      }
    }
  }
}

Read the Claude Desktop setup guide

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.

Cursor configuration
{
  "mcpServers": {
    "supabase-mcp-server": {
      "command": "uv",
      "args": [
        "run",
        "supabase-mcp-server"
      ],
      "env": {
        "QUERY_API_KEY": "<API key from thequery.dev>",
        "SUPABASE_PROJECT_REF": "<Project reference or local host and port>",
        "SUPABASE_DB_PASSWORD": "<Database password>",
        "SUPABASE_REGION": "<Hosting region for a remote project>",
        "SUPABASE_ACCESS_TOKEN": "<Optional Management API access token>",
        "SUPABASE_SERVICE_ROLE_KEY": "<Optional Auth Admin service-role key>"
      }
    }
  }
}

Read the Cursor setup guide

Config file · Workspace: .vscode/mcp.json

For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.

VS Code configuration
{
  "servers": {
    "supabase-mcp-server": {
      "type": "stdio",
      "command": "uv",
      "args": [
        "run",
        "supabase-mcp-server"
      ],
      "env": {
        "QUERY_API_KEY": "<API key from thequery.dev>",
        "SUPABASE_PROJECT_REF": "<Project reference or local host and port>",
        "SUPABASE_DB_PASSWORD": "<Database password>",
        "SUPABASE_REGION": "<Hosting region for a remote project>",
        "SUPABASE_ACCESS_TOKEN": "<Optional Management API access token>",
        "SUPABASE_SERVICE_ROLE_KEY": "<Optional Auth Admin service-role key>"
      }
    }
  }
}

Read the VS Code setup guide

Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json

Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json

Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.

Windsurf configuration
{
  "mcpServers": {
    "supabase-mcp-server": {
      "command": "uv",
      "args": [
        "run",
        "supabase-mcp-server"
      ],
      "env": {
        "QUERY_API_KEY": "<API key from thequery.dev>",
        "SUPABASE_PROJECT_REF": "<Project reference or local host and port>",
        "SUPABASE_DB_PASSWORD": "<Database password>",
        "SUPABASE_REGION": "<Hosting region for a remote project>",
        "SUPABASE_ACCESS_TOKEN": "<Optional Management API access token>",
        "SUPABASE_SERVICE_ROLE_KEY": "<Optional Auth Admin service-role key>"
      }
    }
  }
}

Read the Windsurf setup guide

Config file · Project scope: .mcp.json at the repository root

The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Code configuration
{
  "mcpServers": {
    "supabase-mcp-server": {
      "type": "stdio",
      "command": "uv",
      "args": [
        "run",
        "supabase-mcp-server"
      ],
      "env": {
        "QUERY_API_KEY": "<API key from thequery.dev>",
        "SUPABASE_PROJECT_REF": "<Project reference or local host and port>",
        "SUPABASE_DB_PASSWORD": "<Database password>",
        "SUPABASE_REGION": "<Hosting region for a remote project>",
        "SUPABASE_ACCESS_TOKEN": "<Optional Management API access token>",
        "SUPABASE_SERVICE_ROLE_KEY": "<Optional Auth Admin service-role key>"
      }
    }
  }
}

Read the Claude Code setup guide

Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.

Use cases

  • Run SQL from an MCP-enabled IDE.
  • Version database schema changes during development.
  • Administer hosted Supabase projects through the Management API.
  • Manage users through Supabase Auth Admin methods.

Strengths

  • SQL risk classification and configurable write access.
  • Combines database, project, and user administration.
  • Supports local development and hosted Supabase projects.

Limitations

  • No longer actively maintained by its author.
  • Requires a separate Query API key.
  • Does not support arbitrary connection strings or session pooling.

Query MCP for Supabase setup notes

  • Check QUERY_API_KEY, SUPABASE_ACCESS_TOKEN, SUPABASE_DB_PASSWORD, SUPABASE_PROJECT_REF, SUPABASE_REGION, SUPABASE_SERVICE_ROLE_KEY in the Query MCP for Supabase configuration if startup or authentication fails.
  • Query MCP for Supabase's stdio example needs a client that launches local processes.

Frequently asked questions

No. The author points readers to the official server and says this implementation is no longer actively maintained.

Related MCP servers