supabase functions deploy doesn't work with SupaHost
The Supabase CLI can't deploy Edge Functions to SupaHost. Why, and the two ways that work: the dashboard's Functions tab and an AI agent using the SupaHost MCP server.
What you see
You run the usual deploy command against a SupaHost project:
supabase functions deploy send-invoice --project-ref app-one
and it fails. The CLI may complain that it isn't logged in, that the project ref is invalid, or that the project can't be found.
Why it happens
supabase functions deploy doesn't talk to your project's URL. It uploads functions through Supabase Cloud's Management API, which identifies projects by a Supabase Cloud project ref. SupaHost projects aren't registered with Supabase Cloud, and SupaHost doesn't provide a compatible Management API. So there's nothing on the other end for the CLI to deploy to.
This is a known difference: deploying with the Supabase CLI isn't supported on SupaHost.
How to fix it
Use one of the two supported ways.
Option 1: the dashboard
- Go to Dashboard → your project → Functions tab and click New function (or Edit on an existing one).
- Paste your
index.ts. Use + File to add other files, such as_shared/cors.ts. - Click Deploy function (or Deploy new version). The status goes from
deployingtoactive. - Set Require JWT per function, and add secrets in the Secrets card.
Option 2: an AI agent over MCP
Connect Claude Code, Cursor or another client to the SupaHost MCP server (https://mcp.supahost.space/mcp) with an access token from Dashboard → AI agents (MCP). Then ask it to deploy, for example: "Deploy supabase/functions/send-invoice to app-one." The agent reads your local files and calls deploy_edge_function. It can check the result with list_edge_functions and read logs with get_edge_function_logs.
This is the closest thing to a CLI workflow: your code stays in your repo, and a deploy is one prompt.
What still works from the CLI
- Local development:
supabase startandsupabase functions serverun functions against a local stack on your machine. Write and test locally, then deploy through one of the options above. - Downloading from Supabase Cloud: if you're moving off Supabase Cloud,
supabase functions download <name> --project-ref <cloud-ref>still fetches your old code from there.
On SupaHost
Your functions' code can live in your repo the same way as with the CLI (supabase/functions/<slug>/index.ts). Keep the entry file named index.ts and use explicit npm:, jsr: or https: imports; see Writing functions: Deno, imports and structure. Other CLI commands that rely on the Management API don't work either; see Supabase CLI commands that don't work with SupaHost.