code.ae
← code.ae

Code.ae docs

Practical guides for connecting code.ae to the rest of your stack.

Integration · Database + auth

Connect Supabase to your project

Paste a Supabase personal access token so the agent can create new Supabase projects, run migrations, manage storage, and auto-inject SUPABASE_URL + ANON_KEY + SERVICE_ROLE_KEY into your app's secrets.

Sign in to Supabase

Open supabase.com/dashboard and sign in. If you don't have an account, sign up with GitHub or email — both are free, and the free tier is plenty for any test project Code.ae will scaffold for you.

Open the access tokens page

Click your avatar in the bottom-left, choose Account Preferences, then Access Tokens in the left rail. Or jump directly to supabase.com/dashboard/account/tokens.

Generate a new token

Click Generate new token. Supabase's PATs inherit your account's permissions — there are no scope checkboxes to worry about, just a name field. Use code.ae so you remember which integration owns it.

Copy the token immediately

One-time view
Like Vercel, Supabase shows the token value once. The string starts with sbp_. Once you close the modal it's gone forever — if that happens, delete the token and generate a new one (no harm done).

Paste into the Connect Supabase dialog

Back in your Code.ae project, click Link Supabase in the workspace top bar. Paste the token and click Connect. We verify it once on the API side; if it's invalid you'll see a toast with the exact reason.

Pick or create a Supabase project to link

After connecting, the dialog shows the list of Supabase projects you have access to. Pick one — or click Create new to spin up a fresh project right from the Code.ae UI. We'll wait for it to provision (~60s on the free tier), then auto-link.

Tip
For testing it's fine to point all your Code.ae projects at one shared Supabase project. For real apps create a dedicated Supabase project per app — RLS rules and migrations are easier to reason about that way.

The agent takes it from there

After linking, three keys land in your project's secrets automatically: SUPABASE_URL, SUPABASE_ANON_KEY, and SUPABASE_SERVICE_ROLE_KEY. The agent gains access to list_tables, execute_sql, and apply_migration tools — when you ask for "user accounts", "comments table", "RLS so users only see their own rows", it'll write + apply the migrations directly.

What we use the token for
Strictly the Supabase Management API: listing your projects, creating new ones if you ask, fetching the URL + keys for the linked project, and routing the agent's introspection/migration calls through the per-project Supabase MCP server. We don't store or read your data — the agent does that through the keys you've explicitly approved.
If something goes wrong
If Link Supabase says "invalid token", regenerate on supabase.com/dashboard/account/tokens. If the agent's execute_sql tool fails with "project not linked", reopen the dialog and re-pick the project — the link is project-scoped, not account-scoped.
Next