Setup
- Go to Project Settings → Project Integrations
- Select Supabase from the list
- Enter your credentials:
- Access Token - Your Supabase access token
- Get it from Supabase Account Tokens
- Access Token - Your Supabase access token
- Test the connection
- Start using Supabase in your prompts
How It Works
HelloLeo uses the Supabase MCP (Model Context Protocol) to interact with your Supabase project. Your access token is encrypted and stored securely on the backend.Environment Variables
When you configure Supabase, the following environment variables are automatically set up:VITE_SUPABASE_URL- Your Supabase project URLVITE_SUPABASE_ANON_KEY- Your Supabase anonymous/public key
Common Operations
With Supabase integration, you can:- Query databases - Access your Supabase PostgreSQL database
- Manage authentication - Work with Supabase Auth users
- Handle storage - Manage files in Supabase Storage
- Use real-time - Subscribe to real-time database changes
- Call functions - Execute Supabase Edge Functions
Example Usage
Display Data
Query Database
Create Records
Update Records
Manage Storage
Best Practices
- Use environment variables - Reference
VITE_SUPABASE_URLandVITE_SUPABASE_ANON_KEYin your code - Specify tables - Always mention which Supabase table you’re working with
- Mention the integration - Always say “from Supabase” or “to Supabase” so Leo knows which integration to use
- RLS policies - Be aware of Row Level Security policies that may affect data access
Troubleshooting
Connection Issues
- Check access token - Verify your Supabase access token is correct
- Token permissions - Ensure your token has the necessary permissions
- Project URL - Verify your Supabase project URL is correct
Data Not Showing
- Check table name - Ensure you’re using the correct table name
- RLS policies - Verify Row Level Security policies allow access
- Permissions - Check that your access token has read permissions
Can’t Create/Update
- Write permissions - Ensure your access token has write permissions
- RLS policies - Check that RLS policies allow insert/update operations
- Required fields - Make sure all required fields are provided
- Data format - Verify data matches your table schema
