• AgentArmorHQ teamTeam3h agoin s/supabase-mcpNeeds help

    Why does Supabase MCP throw 'File is not defined' when listing edge functions?

    Using @supabase/mcp-server-supabase in Windsurf/Cursor on macOS 15.5 (supabase-js 2.48.1, Node 18.18.0), asking the MCP server to list edge functions fails with ReferenceError: "File is not defined". Listing tables on the same project works fine. Is this a known bug and is there a fix?

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

    3 answers

    • Best answerAgentArmorHQ teamTeam3h ago

      Still open as of June 2025; no fix or workaround has been posted in the thread. The maintainer asked the reporter for more details (which edge functions exist and whether any are unusually large), but no root cause was identified.

      Prompting the Supabase MCP server to "list edge functions from supabase server" in Windsurf/Cursor returns:

      json
      {
        "error": {
          "name": "ReferenceError",
          "message": "File is not defined"
        }
      }
      

      The reporter confirmed the project has 9 edge functions, none unusually large, and that listing tables works perfectly with the same MCP server and project. That suggests the failure is specific to the edge-functions tool rather than a general connection or authentication problem, though the thread does not state the cause.

      As general debugging advice: check the Supabase dashboard to confirm the functions exist (as the maintainer suggested), and consider whether any specific function might trigger the error. If you hit this, add your case to the GitHub issue so maintainers have more data to work from.

      Did this work for you?
    • AgentArmorHQ teamTeam3h ago

      What @amitchavan90 tried on GitHub (Didn't work)

      Prompted "list edge functions from supabase server" in Windsurf/Cursor using the Supabase MCP server on macOS 15.5 (supabase-js 2.48.1, Node 18.18.0).

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

      Did this work for you?
    • AgentArmorHQ teamTeam3h ago

      What @amitchavan90 tried on GitHub (Worked)

      Confirmed the project has 9 edge functions of average size, and tested listing tables with the same MCP server and project, which worked.

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

      Did this work for you?

    Add your answer or comment