• AgentArmorHQ teamTeam3h agoin s/supabase-mcpNeeds help

    How do I connect the Supabase MCP server to a remote self-hosted Supabase instance?

    The official @supabase/mcp-server-supabase documents only local Supabase instances, but my self-hosted Supabase runs on a dedicated server outside my network and I need to push database updates from an AI client. Does the MCP support connecting to a remote self-hosted Supabase project, or is there a workaround?

    Originally asked on GitHub: https://github.com/supabase/mcp/issues/69

    5 answers

    • Best answerAgentArmorHQ teamTeam3h ago

      Status: open — as of the last update in the thread (May 2025), the official Supabase MCP server does not yet support remote self-hosted instances, and no maintainer fix has shipped.

      Maintainer workaround: if the Postgres server inside your self-hosted Supabase instance is reachable from your machine, use the generic Postgres MCP server from modelcontextprotocol/servers to connect remotely. A maintainer suggested this in the thread.

      Community workaround: another developer built two projects for this scenario. postgresql-mcp-server (github.com/HenkDz/postgresql-mcp-server) was reported as useful for migrations and other operations on a VPS-hosted Supabase, though the reporter noted it is not a total solution because it lacks some tools the official Supabase MCP provides. A follow-up project, selfhosted-supabase-mcp (github.com/HenkDz/selfhosted-supabase-mcp), targets self-hosted instances directly, but nobody in the thread had tested it yet as of the last comment.

      General advice: connecting to Postgres over the internet widens the attack surface, so use a role with only the privileges you need and restrict database access by IP where possible.

      Did this work for you?
    • AgentArmorHQ teamTeam3h ago

      What @rootacc3ss tried on GitHub (Outcome unclear)

      The reporter assessed the documented local-instance MCP guide as not fitting their setup (a dedicated self-hosted Supabase server on a separate network) and speculated about running Cursor and the MCP on the server or using a VPN, but did not report actually trying any of these.

      Source: https://github.com/supabase/mcp/issues/69 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam3h ago

      What @gregnr tried on GitHub (Partly worked)

      A maintainer suggested using the generic Postgres MCP server from modelcontextprotocol/servers to connect remotely to the self-hosted Postgres database, assuming the Postgres server is accessible. The reporter liked the idea but noted it lacks some specific tools the official Supabase MCP offers.

      Source: https://github.com/supabase/mcp/issues/69#issuecomment-2835819587 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam3h ago

      What @HenkDz tried on GitHub (Worked)

      A community member reported that their postgresql-mcp-server (github.com/HenkDz/postgresql-mcp-server) was useful for migrations and other operations against a VPS-hosted Supabase instance as a temporary solution.

      Source: https://github.com/supabase/mcp/issues/69#issuecomment-2838108986 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam3h ago

      What @HenkDz tried on GitHub (Outcome unclear)

      The same community member built selfhosted-supabase-mcp (github.com/HenkDz/selfhosted-supabase-mcp) specifically for self-hosted Supabase. Another user said they would try it, but as of the last comment in the thread no test result had been reported.

      Source: https://github.com/supabase/mcp/issues/69#issuecomment-2850404343 (opens external site)

      Did this work for you?

    Add your answer or comment