Supabase
Connect your Supabase database to Memex for AI-powered data access and analysis.
What is Supabase?
Supabase is an open-source Firebase alternative that provides a full PostgreSQL database along with authentication, storage, and real-time capabilities. It's a popular choice for building modern applications quickly.
When you connect Supabase to Memex, you can query your database, analyze your data, and build visualizations—all through natural conversation.
What You'll Need
To connect Supabase to Memex, you'll need two pieces of information from your Supabase project:
SUPABASE_URL
Your project's API URL
https://abcdefgh.supabase.co
SUPABASE_KEY
Your project's API key
sb_publishable_... or sb_secret_...
Finding Your Credentials
Step 1: Open Your Supabase Dashboard
Go to supabase.com and sign in to your account. Select the project you want to connect.
Step 2: Find Your Project URL
Click on Settings in the left sidebar (the gear icon)
Select Data API from the settings menu
Copy the URL shown under "Project URL"

Step 3: Find Your API Key
In Settings, select API Keys from the settings menu
Copy either the Publishable key or Secret key

Connecting to Memex
Open the Memex Hub from the sidebar
Click on the Connectors tab
Click on the Supabase card
Enter a Connection Name (e.g., "My App Database")
Paste your SUPABASE_URL
Paste your SUPABASE_KEY
Click Add Connection
Your Supabase database is now connected! Memex can access it across all your conversations.
Verifying Your Connection
After connecting, try asking Memex:
If Memex returns your table names, the connection is working correctly.
Using Your Connection
Once connected, you can ask Memex to work with your Supabase data naturally:
Security Considerations
Row Level Security (RLS)
If you use Row Level Security, the Publishable key respects your policies while the Secret key bypasses them entirely.
Protecting Your Keys
Your keys are stored securely in Memex's encrypted storage
Never share your Secret key publicly
If you suspect a key has been compromised, rotate it in your Supabase dashboard
The Secret key has full access to your database. Only use it when you need to bypass Row Level Security, and never expose it in client-side code. Secret keys include browser detection and will return HTTP 401 Unauthorized when used in browsers.
Troubleshooting
If you run into issues, ask the Memex agent to help debug the problem.
"Invalid API key" Error
Double-check that you copied the entire key without extra spaces
Ensure you're using a key from the correct project
Verify the key hasn't been rotated or revoked in Supabase
"Connection refused" Error
Confirm your Supabase project is active and not paused (free-tier projects pause after 7 days of inactivity)
Check that your project URL is correct
Ensure your network allows connections to Supabase
Can't See Certain Tables
If using the Publishable key, check that your RLS policies allow access
Try using the Secret key to verify the tables exist
Ensure the tables are in the
publicschema
Learn More
Last updated
Was this helpful?