Supabase Connection
The Supabase connection integrates your Supabase PostgreSQL database with OpsTower, giving agents the ability to run read-only SQL queries against your data. All queries are limited to SELECT statements and return a maximum of 100 rows per query.
Prerequisites
Section titled “Prerequisites”You need a Supabase account with an active project. Both free-tier and paid Supabase projects are supported.
Credentials Required
Section titled “Credentials Required”To set up a Supabase connection, you need two pieces of information:
- Project URL — the URL of your Supabase project
- Service Role Key — a privileged API key for server-side access
How to Find Your Project URL
Section titled “How to Find Your Project URL”- Log in to supabase.com and open your project.
- Go to Project Settings in the sidebar (the gear icon).
- Select API from the settings menu.
- Copy the Project URL shown at the top of the page. It follows the format
https://abc123.supabase.co.
How to Find Your Service Role Key
Section titled “How to Find Your Service Role Key”- In the same Project Settings > API page.
- Scroll to the Project API Keys section.
- Find the
service_rolekey (not theanonkey). - Click Reveal to display the full key and copy it. It is a JWT that starts with
eyJ.
Important: The service role key bypasses Row Level Security (RLS). OpsTower only runs read-only SELECT queries against your database, but you should treat this key as highly sensitive. Do not share it or expose it in client-side code.
Setting Up the Connection in OpsTower
Section titled “Setting Up the Connection in OpsTower”- In OpsTower, navigate to Connections in the sidebar.
- Click Add Connection and select Supabase.
- Enter your Project URL and Service Role Key.
- Click Save to create the connection.
What Agents Can Do with Supabase
Section titled “What Agents Can Do with Supabase”Once connected and enabled on an agent, the agent can:
- Execute read-only SQL queries (SELECT statements only) against your PostgreSQL database
- List all tables in the database
- Inspect table schemas and relationships to understand your data model
All queries are validated as read-only before execution. Write operations (INSERT, UPDATE, DELETE, DROP, etc.) are rejected.
Troubleshooting
Section titled “Troubleshooting”- Authentication errors: Verify that you are using the
service_rolekey, not theanonkey. The anon key has limited permissions that may not cover all tables. - No data returned: Confirm that your project URL is correct and that the database contains data in the tables you are querying.
- Connection refused: Ensure your Supabase project is active and not paused. Free-tier projects may be paused after a period of inactivity — reactivate them from the Supabase dashboard.
- Missing tables: If you cannot see certain tables, verify that they exist in the
publicschema. Tables in other schemas may require explicit schema qualification in queries.