Supabase MCP SelfHosted

Supabase MCP SelfHosted

by coupaul

A production-ready, self-hosted MCP server for Supabase. Features enterprise security, Docker optimization, and tools for direct database, auth, and storage operations.

29 runs
6 users
Try This Actor

Opens on Apify.com

About Supabase MCP SelfHosted

Need a secure, self-hosted MCP server for your Supabase project? This one's built for production. I've run it myself to handle direct database operations, authentication, and storage management, all while keeping everything inside my own infrastructure. The focus here is on real-world security: it's baked with SQL injection prevention and configurable rate limiting right out of the gate. If you're deploying with Docker, you'll appreciate the optimized setup that just works. It gives you a full suite of tools—think database queries, user auth flows, file storage tasks, and TypeScript types—communicating directly with your Supabase instance. This is for developers who want the flexibility of MCP (Model Context Protocol) without compromising on control or safety for their internal tools and backends. You get the convenience of standardized tooling but with the peace of mind that your data and access logic never leave your environment. It turns your self-hosted Supabase into a powerful, secure agent backend.

What does this actor do?

Supabase MCP SelfHosted is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.

Key Features

  • Cloud-based execution - no local setup required
  • Scalable infrastructure for large-scale operations
  • API access for integration with your applications
  • Built-in proxy rotation and anti-blocking measures
  • Scheduled runs and webhooks for automation

How to Use

  1. Click "Try This Actor" to open it on Apify
  2. Create a free Apify account if you don't have one
  3. Configure the input parameters as needed
  4. Run the actor and download your results

Documentation

Self-Hosted Supabase MCP Server - Enhanced Security Edition

Overview

This is a secure, production-ready Model Context Protocol (MCP) server for interacting with self-hosted Supabase instances. It's an enhanced fork of the original selfhosted-supabase-mcp that adds comprehensive security fixes, enterprise features, and deployment optimizations for Docker and Coolify environments.

Key Features

  • Security Hardened: Addresses multiple security vulnerabilities from the original repository (issues #5, #7, #8, #9, #10).
  • Production Ready: Optimized for Docker/Coolify deployments with connection pooling, retry logic, and resource limits.
  • Management Tools: Includes built-in utilities for Docker container management, database backups, and recovery.
  • Monitoring: Features health checks, performance analysis, and enhanced logging.
  • Easy Deployment: Available via Smithery.ai for one-click installation.

How to Use

Quick Install (via Smithery)

The simplest method is using the Smithery CLI:

npx @smithery/cli install @mistersandfr/selfhosted-supabase-mcp

Manual Setup

  1. Clone and build the project:
    bash git clone https://github.com/MisterSandFR/selfhosted-supabase-mcp.git cd selfhosted-supabase-mcp npm install npm run build

  2. Run the server with your credentials:
    bash npm start -- --url YOUR_SUPABASE_URL --anon-key YOUR_ANON_KEY

Docker

Build and run the container:

docker build -t selfhosted-supabase-mcp .
docker run -e SUPABASE_URL=your_url -e SUPABASE_ANON_KEY=your_key selfhosted-supabase-mcp

Configuration

Environment Variables

Variable Required Description
SUPABASE_URL Yes Your self-hosted Supabase instance URL.
SUPABASE_ANON_KEY Yes Your Supabase anonymous/public API key.
SUPABASE_SERVICE_ROLE_KEY No Service role key for admin operations.
DATABASE_URL No Direct PostgreSQL connection string for fallback.
SUPABASE_AUTH_JWT_SECRET No JWT secret for authentication operations.

Claude Desktop Integration

Add this configuration to your Claude Desktop config.json:

{
  "mcp-servers": {
    "selfhosted-supabase": {
      "command": "npx",
      "args": [
        "@smithery/cli",
        "run",
        "@mistersandfr/selfhosted-supabase-mcp"
      ],
      "env": {
        "SUPABASE_URL": "https://your-instance.supabase.co",
        "SUPABASE_ANON_KEY": "your-anon-key",
        "SUPABASE_SERVICE_ROLE_KEY": "optional-service-key",
        "DATABASE_URL": "optional-postgres-url"
      }
    }
  }
}

Input/Output

The server acts as a bridge between an MCP client (like Claude Desktop) and your self-hosted Supabase backend. You provide your Supabase credentials and URL, and the server enables the MCP client to perform authorized database queries and operations through the Supabase API.

Common Use Cases

Market Research

Gather competitive intelligence and market data

Lead Generation

Extract contact information for sales outreach

Price Monitoring

Track competitor pricing and product changes

Content Aggregation

Collect and organize content from multiple sources

Ready to Get Started?

Try Supabase MCP SelfHosted now on Apify. Free tier available with no credit card required.

Start Free Trial

Actor Information

Developer
coupaul
Pricing
Paid
Total Runs
29
Active Users
6
Apify Platform

Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.

Learn more about Apify

Need Professional Help?

Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.

Find a Specialist

Trusted by millions | Money-back guarantee | 24/7 Support