Connect Supabase
What the Supabase connection creates on your account, how to link a database, which tables an agent can really read, and what each error message means.
Connect
Supabase is a managed PostgreSQL database with authentication and storage. Connecting it lets MaShop create the database of your project on your own account and apply its schema.
What MaShop can do with Supabase
- Creates a project in your Supabase account, in the eu-central-1 region by default, and waits until it reports healthy. It checks every four seconds.
- Applies 30 migrations one at a time. Each one is recorded as soon as it passes, so it is never replayed.
- Pushes the connection keys of that database to your sites before every build.
- Reads your data on request, read only. This is one of the two capabilities that answer today. What it can actually answer depends on which tables exist, and the section below names them.
The catalogue also declares four tools: db.schema_read, db.migration_run, db.sql_execute and db.rls_check. None of them has an executor yet. An agent that calls one is refused, and nothing is attempted.
What an agent can read, and what exists
The read capability works against an allow list of table names. That list is a permission, not an inventory. It names tables the shipped schema does not create.
Twenty two names sit on that list. The 30 migrations create thirteen of them:
products, product_variants, categories, collections, orders, order_items, customers, payment_transactions, inventory_stock, coupons, reviews, blog_posts, blog_comments.
The other nine are allowed but absent: addresses, invoices, invoice_items, quotes, payments, appointments, bookings, availability, subscriptions. No migration creates them. An agent that asks for one gets the database error back, and answers nothing.
So a question about your orders, your customers or your stock is answerable today. A question about your invoices is not, because that table does not exist in the schema you were given.
Three limits apply to every read. It is read only. At least one column must be named, because a bare star on a customers table would hand over personal data nobody asked for. And 200 rows is the ceiling.
What it touches
- One database on your account, holding your products, your orders, your customers and everything your activity records.
- Its schema, posed once at creation by the migrations.
- Its service key, which MaShop encrypts before storing.
Default permissions
| Tool | Level | Default state |
|---|---|---|
| db.schema_read | Read only | Allow |
| db.rls_check | Read only | Allow |
| db.migration_run | Write and edit | Ask |
| db.sql_execute | Critical action | Ask |
Before your first project
The setup wizard asks for Supabase at step two, before any project exists. That is the same authorization as the one below, and it is stored on your account rather than on a project.
Connect it
- Open your project in the workspace.
- Click the gear in the top bar, Project settings.
- Open the Deployment tab.
- On the Supabase card, click Connect. A popup opens Supabase and asks for full access to your account.
- Approve, and let the popup close on its own.
If a database has not been created yet, the card reads Account authorised, no database linked. A picker appears just below it. Pick the database this project should use.
Check that it works
- The Supabase card subtitle reads Database connected once a database is linked.
- The Supabase popover in the top bar reads Supabase connected, with a link that opens your dashboard.
- A green card with no linked database is the state to watch. The account is authorized, the data is not reachable yet.
Limits
- One database per project.
- The Supabase access token is short lived, about a day. MaShop refreshes it, and tells you to reconnect only when reconnecting is genuinely required.
- The project limit of your Supabase plan applies. MaShop cannot create beyond it.
- Duplicating a project leaves the copy without a database.
- Four catalogue tools, none executable. Reading your data goes through a separate capability.
When it breaks
- Your Supabase account has reached its project limit. The database could not be created automatically. Pick an existing one, or free a project on Supabase.
- The database could not be created automatically, and trying again will not change that. Pick an existing database. This message means the cause is permanent, so retrying is a waste of your evening.
- Your Supabase account is authorised, but no database is linked to this project. Pick one to give access to the data.
- Your Supabase session has expired. Reconnect it to see your projects and link one.
- An agent says a table does not exist. The name is on the allow list but not in the schema. See the section above.
Remove the connection
Project settings, Deployment tab, Supabase card, Disconnect. A confirmation asks Disconnect this service, and tells you that you can reconnect at any time.
MaShop deletes the token it stored. Your database, its schema and every row in it stay on your account. Deleting your MaShop project does not delete the Supabase project either, and that is deliberate: it holds your orders, your customers and your products.
