Neon
Connect your Neon serverless PostgreSQL database to Memex.
What is Neon?
Neon provides PostgreSQL databases with a serverless architecture. Its design decouples storage from compute resources, which enables on-demand scaling (including scaling to zero when idle) and instant database branching for development workflows. It's a good fit for applications that need flexible, cost-efficient database access.
When you connect Neon to Memex, you can query your PostgreSQL database, analyze data, and generate insights—all through natural conversation.
What You'll Need
To connect Neon to Memex, you'll need your PostgreSQL connection string:
Connection URL
PostgreSQL connection string
postgresql://neondb_owner:[email protected]/neondb?sslmode=require
Finding Your Connection String
Step 1: Open the Neon Console
Go to console.neon.tech and sign in to your account.
Step 2: Select Your Project
Click on the project containing the database you want to connect.
Step 3: Get Your Connection String
Click the Connect button on your project dashboard
Select the Branch, Database, and Role you want to use
Copy the connection string displayed

The connection string follows this format:
Connecting to Memex
Open the Memex Hub from the sidebar
Click on the Connectors tab
Click on the Neon card
Enter a Connection Name (e.g., "Production Database")
Paste your Connection URL
Click Add Connection
Your Neon database is now connected! Memex can access it across all your conversations.
Verifying Your Connection
After connecting, try asking Memex:
If Memex returns your tables and columns, the connection is working correctly. The first query may take a moment if your Neon compute was suspended.
Using Your Connection
Once connected, you can ask Memex to work with your Neon database naturally:
Security Considerations
Connection String Security
Your connection string contains your database password. Memex stores this securely, but you should:
Never share your connection string publicly
Use role-based access to limit what the connected user can do
Consider creating a read-only role for Memex if you only need to query data
SSL/TLS Encryption
All Neon connections require SSL encryption (sslmode=require). This ensures your data is encrypted in transit between Memex and your database.
Your connection string includes your database password. If you suspect it has been compromised, reset the password in your Neon dashboard immediately.
Troubleshooting
You can ask the Memex agent to help troubleshoot, but here are a few common problems:
"Connection refused" Error
Verify your connection string is correct and complete
Check that your Neon project is active
Ensure SSL mode is set to
requirein the connection string
Slow Initial Queries
This is normal if your Neon compute has scaled to zero
The first query triggers a "cold start" that takes a few hundred milliseconds
Subsequent queries will be faster
"Authentication failed" Error
Double-check the username and password in your connection string
Verify you're connecting to the correct database and branch
Try regenerating your password in the Neon console
Learn More
Last updated
Was this helpful?