Supabase

by nighttrek

Not rated
GitHub

About

Interact with Supabase databases, query tables, and generate TypeScript types.

Details

Author
nighttrek
Categories
Database, Other, Developer Tools
Tags
#supabase, #sql

Setup

Install Supabase in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/nighttrek/Supabase-MCP

Follow the installation instructions in the repository README, then restart your MCP client.

A Model Context Protocol (MCP) server for interacting with Supabase databases. This server provides tools for querying tables and generating TypeScript types through the MCP interface.

-

Query Tables: Execute queries on any table with support for:

- Schema selection
- Column filtering
- Where clauses with multiple operators
- Pagination
- Error handling

Type Generation: Generate TypeScript types for your database:

- Support for any schema (public, auth, api, etc.)
- Works with both local and remote Supabase projects
- Direct output to console
- Automatic project reference detection
- Node.js (v16 or higher)
- A Supabase project (either local or hosted)
- Supabase CLI (for type generation)

git clone https://github.com/yourusername/supabase-mcp-server.git cd supabase-mcp-server

- Install the Supabase CLI (required for type generation):

# Using npm npm install -g supabase # Or using Homebrew on macOS brew install supabase/tap/supabase

- Go to your Supabase project dashboard
- Navigate to Project Settings > API
- Copy the Project URL and service_role key (NOT the anon key)
- Start your local Supabase instance
- Use the local URL (typicallyhttp://localhost:54321)
- Use your local service_role key

# Create a .env file (this will be ignored by git) echo "SUPABASE_URL=your_project_url SUPABASE_KEY=your_service_role_key" > .env

- macOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:%APPDATA%\Claude\claude_desktop_config.json
- Linux:~/.config/Claude/claude_desktop_config.json

{ "mcpServers": { "supabase": { "command": "node", "args": ["/absolute/path/to/supabase-mcp-server/build/index.js"], "env": { "SUPABASE_URL": "your_project_url", "SUPABASE_KEY": "your_service_role_key" } } } }

- macOS:~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
- Windows:%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
- Linux:~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Add the server configuration (same format as Claude Desktop).

// Query with schema selection and where clause <use_mcp_tool> <server_name>supabase</server_name> <tool_name>query_table</tool_name> <arguments> { "schema": "public", "table": "users", "select": "id,name,email", "where": [ { "column": "is_active", "operator": "eq", "value": true } ] } </arguments> </use_mcp_tool>
// Generate types for public schema <use_mcp_tool> <server_name>supabase</server_name> <tool_name>generate_types</tool_name> <arguments> { "schema": "public" } </arguments> </use_mcp_tool>

Query a specific table with schema selection and where clause support.

- schema(optional): Database schema (defaults to public)
- table(required): Name of the table to query
- select(optional): Comma-separated list of columns
- where(optional): Array of conditions with:

- column: Column name
- operator: One of: eq, neq, gt, gte, lt, lte, like, ilike, is
- value: Value to compare against

Generate TypeScript types for your Supabase database schema.

- schema(optional): Database schema (defaults to public)

- Make sure your local Supabase instance is running
- Verify your service_role key is correct

- Confirm your project ref is correct (extracted from URL)
- Verify you're using the service_role key, not the anon key
- Check your schema and table names
- Verify column names in select and where clauses
- Ensure your service_role key has necessary permissions
- Fork the repository
- Create your feature branch:git checkout -b feature/my-feature
- Commit your changes:git commit -am 'Add my feature'
- Push to the branch:git push origin feature/my-feature
- Submit a pull request

MIT License - see LICENSE file for details

Official Supabase MCP server for managing Supabase projects, databases, auth, storage, edge functions, and SQL workflows from AI agents.

MCP servers that give AI clients safe, structured access to SQL databases. One installable package per database engine. Every package exposes the same minimal two-tool surface, execute_sql and search_objects, with guardrails on by default: read-only mode, row caps, and statement timeouts.

Provides tools and resources for coding agents to interact with the Gel database, including automatic project configuration for query builders and ORMs.

MCP server that gives AI agents deep understanding of contemporary or legacy relational databases.

Securely access BigQuery datasets with intelligent caching, schema tracking, and query analytics via Supabase integration.

Browse, create, and manage schema projects on the Schematica schema library. 8 MCP tools for AI-powered schema design and data modeling.

Interact with self-hosted Supabase instances for database introspection, management, and interaction.

Interact with self-hosted Supabase instances for database management and introspection.

A server for querying and managing data in a Supabase database.

Provides access to supOS open APIs for querying topic structures, real-time and historical data, and executing SQL queries.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.