supabase.com
supabase.com logo

Supabase

Integrates with Supabase to enable database operations, file storage, and user authentication for scalable, real-time ap...

Created byApr 22, 2025

Supabase MCP Server

![smithery badge](https://smithery.ai/badge/supabase-server) A Model Context Protocol (MCP) server that provides comprehensive tools for interacting with Supabase databases, storage, and edge functions. This server enables seamless integration between Supabase services and MCP-compatible applications.
<a href="https://glama.ai/mcp/servers/vwi6nt8i80"><img width="380" height="200" src="https://glama.ai/mcp/servers/vwi6nt8i80/badge" alt="supabase-mcp MCP server" /></a>

Overview

The Supabase MCP server acts as a bridge between MCP clients and Supabase's suite of services, providing:
  • Database operations with rich querying capabilities
  • Storage management for files and assets
  • Edge function invocation
  • Project and organization management
  • User authentication and management
  • Role-based access control

Architecture

The server is built using TypeScript and follows a modular architecture:

Key Components

  • Server Class: Implements the MCP server interface and handles all client requests
  • Type Definitions: Comprehensive TypeScript definitions for all operations
  • Environment Configuration: Secure configuration management via environment variables
  • Error Handling: Robust error handling with detailed error messages

Prerequisites

  • Node.js 16.x or higher
  • A Supabase project with:
  • MCP-compatible client

Installation

Installing via Smithery

To install Supabase Server for Claude Desktop automatically via Smithery:
  1. Clone the repository:
  1. Install dependencies:
  1. Create environment configuration:
  1. Configure environment variables:
  1. Create server configuration:
  1. Build the server:

Configuration

The server supports extensive configuration through both environment variables and a config.json file. Here's a detailed breakdown of the configuration options:

Server Configuration

Supabase Configuration

Logging Configuration

Security Configuration

Monitoring Configuration

See config.json.example for a complete example configuration file.

MCP Integration

Add the server to your MCP settings (cline_mcp_settings.json):

Available Tools

Database Operations

create_record

Create a new record in a table with support for returning specific fields.
Example:

read_records

Read records with advanced filtering, joins, and field selection.
Example:

update_record

Update records with filtering and returning capabilities.
Example:

delete_record

Delete records with filtering and returning capabilities.
Example:

Storage Operations

upload_file

Upload files to Supabase Storage with configurable options.
Example:

download_file

Download files from Supabase Storage.
Example:

Edge Functions

invoke_function

Invoke Supabase Edge Functions with parameters and custom options.
Example:

User Management

list_users

List users with pagination support.

create_user

Create a new user with metadata.

update_user

Update user details.

delete_user

Delete a user.

assign_user_role

Assign a role to a user.

remove_user_role

Remove a role from a user.

Error Handling

The server provides detailed error messages for common scenarios:
  • Invalid parameters
  • Authentication failures
  • Permission issues
  • Rate limiting
  • Network errors
  • Database constraints
Errors are returned in a standardized format:

Development

Running Tests

Building

Linting

Contributing

  1. Fork the repository
  1. Create a feature branch
  1. Commit your changes
  1. Push to the branch
  1. Create a Pull Request

License

MIT License - see LICENSE for details

Support

For support, please:
  1. Check the issues for existing problems/solutions
  1. Create a new issue with detailed reproduction steps
  1. Include relevant error messages and environment details

Supabase MCP Server

![smithery badge](https://smithery.ai/badge/supabase-server) A Model Context Protocol (MCP) server that provides comprehensive tools for interacting with Supabase databases, storage, and edge functions. This server enables seamless integration between Supabase services and MCP-compatible applications.
<a href="https://glama.ai/mcp/servers/vwi6nt8i80"><img width="380" height="200" src="https://glama.ai/mcp/servers/vwi6nt8i80/badge" alt="supabase-mcp MCP server" /></a>

Overview

The Supabase MCP server acts as a bridge between MCP clients and Supabase's suite of services, providing:
  • Database operations with rich querying capabilities
  • Storage management for files and assets
  • Edge function invocation
  • Project and organization management
  • User authentication and management
  • Role-based access control

Architecture

The server is built using TypeScript and follows a modular architecture:

Key Components

  • Server Class: Implements the MCP server interface and handles all client requests
  • Type Definitions: Comprehensive TypeScript definitions for all operations
  • Environment Configuration: Secure configuration management via environment variables
  • Error Handling: Robust error handling with detailed error messages

Prerequisites

  • Node.js 16.x or higher
  • A Supabase project with:
  • MCP-compatible client

Installation

Installing via Smithery

To install Supabase Server for Claude Desktop automatically via Smithery:
  1. Clone the repository:
  1. Install dependencies:
  1. Create environment configuration:
  1. Configure environment variables:
  1. Create server configuration:
  1. Build the server:

Configuration

The server supports extensive configuration through both environment variables and a config.json file. Here's a detailed breakdown of the configuration options:

Server Configuration

Supabase Configuration

Logging Configuration

Security Configuration

Monitoring Configuration

See config.json.example for a complete example configuration file.

MCP Integration

Add the server to your MCP settings (cline_mcp_settings.json):

Available Tools

Database Operations

create_record

Create a new record in a table with support for returning specific fields.
Example:

read_records

Read records with advanced filtering, joins, and field selection.
Example:

update_record

Update records with filtering and returning capabilities.
Example:

delete_record

Delete records with filtering and returning capabilities.
Example:

Storage Operations

upload_file

Upload files to Supabase Storage with configurable options.
Example:

download_file

Download files from Supabase Storage.
Example:

Edge Functions

invoke_function

Invoke Supabase Edge Functions with parameters and custom options.
Example:

User Management

list_users

List users with pagination support.

create_user

Create a new user with metadata.

update_user

Update user details.

delete_user

Delete a user.

assign_user_role

Assign a role to a user.

remove_user_role

Remove a role from a user.

Error Handling

The server provides detailed error messages for common scenarios:
  • Invalid parameters
  • Authentication failures
  • Permission issues
  • Rate limiting
  • Network errors
  • Database constraints
Errors are returned in a standardized format:

Development

Running Tests

Building

Linting

Contributing

  1. Fork the repository
  1. Create a feature branch
  1. Commit your changes
  1. Push to the branch
  1. Create a Pull Request

License

MIT License - see LICENSE for details

Support

For support, please:
  1. Check the issues for existing problems/solutions
  1. Create a new issue with detailed reproduction steps
  1. Include relevant error messages and environment details