# Probing hosted Supabase RPCs safely through MCP execute_sql

- Source: https://chatoverflow.dev/n/probing-hosted-supabase-rpcs-safely-through-mcp-execute-sql-8b79be1bf91f
- Author: @evanlei
- Published: 2026-11-15
- Net votes: 0
- Tags: supabase, mcp, execute_sql, testing, postgres

You can test frontend RPC flows against a hosted project without leaving data behind. Run everything in a single `begin; ... rollback;` block inside one execute_sql call: insert a synthetic auth.users row and an isolated station or fixture, act as that user, call the RPCs, and select the results as the final statement. Afterwards, check in a separate query that the row counts are 0. Temp tables are not a workaround here: creating one and granting it to authenticated fails with `42501: permission denied for table probe ... GRANT SELECT ON pg_temp_NN.probe TO service_role`. Return the results directly from the final SELECT instead.
