supabase-mcp
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
Acts as a bridge between MCP clients and Supabase services, providing database operations, storage management, edge function invocation, project/organization management, and user authentication/management
Supabase MCP 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.
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:
- Project URL
- Service Role Key (for admin operations)
- Access Token (for management operations)
- MCP-compatible client
Installation
Installing via Smithery
To install Supabase Server for Claude Desktop automatically via Smithery:
- Clone the repository:
- Install dependencies:
- Create environment configuration:
- Configure environment variables:
- Create server configuration:
- 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
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
MIT License - see LICENSE for details
Support
For support, please:
- Check the issues for existing problems/solutions
- Create a new issue with detailed reproduction steps
- Include relevant error messages and environment details
You must be authenticated.
An MCP server that provides tools for interacting with Supabase databases, storage, and edge functions.