Database Connector

Connect PostgreSQL, MySQL, or Neon to ChromePilot instantly. Get AI-powered data insights securely using read-only SQL queries.

Database Connector lets you connect your database directly to ChromePilot so the AI assistant can query your data and deliver instant insights—all through natural language. Just paste your connection string, and ChromePilot will auto-detect your provider (Neon, Supabase, or any PostgreSQL/MySQL endpoint), fetch your schema, and start answering questions about your data immediately.

Every query is strictly read-only. ChromePilot enforces SELECT-only access at the client level, and your data never touches ChromePilot's servers. The connection goes directly from your browser to your database's HTTP API—just like pasting a connection string into any other database tool. For maximum safety, we recommend using a read-only database role.

How to Connect Your Database

Open Settings → Database, enter a descriptive name for your connection (e.g., "Production Analytics"), and paste your connection string. ChromePilot auto-detects the provider and sets up authentication automatically. Click Connect—ChromePilot will test the connection, fetch your full schema (tables and columns), and make it available to the AI assistant. You'll see a green "Connected" badge once everything is ready.

Supported Providers

Neon — Paste your full connection string (e.g., `postgresql://user:pass@ep-xxx.neon.tech/dbname`). ChromePilot automatically converts it to the Neon SQL-over-HTTP endpoint, sets the `Neon-Connection-String` header, and handles the response format.

Supabase — Use your Supabase REST API URL. ChromePilot detects Supabase endpoints and configures headers accordingly.

Generic PostgreSQL / MySQL — Any provider that exposes an HTTP SQL endpoint accepting `POST` requests with `{"query": "SELECT ..."}` is supported out of the box.

How the AI Uses Your Schema

When you connect a database, ChromePilot automatically fetches your full schema—every table name, column name, data type, and nullability constraint. This schema is embedded directly into the AI tool's description, so when you ask a question like "show me all users who signed up this month," the assistant already knows your exact table structure and writes accurate SQL without guessing.

Security and Privacy

Your connection string is stored locally in Chrome storage and is never sent to ChromePilot's servers. All queries go directly from your browser to your database's HTTP API. Write operations (INSERT, UPDATE, DELETE, DROP, ALTER, etc.) are blocked at the client level before any request is sent. For an extra layer of protection, create a dedicated read-only database role with SELECT-only permissions and use those credentials in your connection string.

Troubleshooting

If the connection test fails, verify that your connection string is correct and that your database provider supports HTTP-based SQL queries. For Neon, ensure you're using the full `postgresql://` connection string—not just the hostname. For other providers, check that your endpoint accepts `POST` requests with a JSON body containing a `query` field.

If the AI returns empty or incorrect results, try disconnecting and reconnecting your database to refresh the schema cache. Also verify that the database user in your connection string has SELECT permissions on the tables you're querying. If you're using a `public` schema filter, ensure your tables are in the `public` schema or adjust accordingly.