This quickstart gets you from zero to “ask the AI a question about your data” in about 5 minutes.Documentation Index
Fetch the complete documentation index at: https://docs.querybear.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A QueryBear account (free tier works).
- A database to connect (PostgreSQL, MySQL, or SQLite).
- One of the supported AI clients.
1. Add a connection in the dashboard
Go to querybear.com/dashboard → Connections → New connection. Choose your database type and either paste a connection string or fill in the fields:- Host — your database host (e.g.
db.example.comor127.0.0.1) - Port —
5432(Postgres),3306(MySQL) - Database name
- User / password — use a read-only role (see security)
- SSL mode —
requirerecommended for any remote DB
2. Configure access rules
After connecting, QueryBear pulls your schema. You can then:- Allow-list tables — only checked tables are visible to the agent. Default is “all tables.”
- Block columns — mark sensitive columns (password hashes, API keys, PII). They’re stripped from schema responses and any query mentioning them is rejected.
- Set a row limit — every query gets
LIMIT nenforced. Default1000. - Set a query timeout — long-running queries are killed. Default
30s.
3. Wire up your AI client
In the dashboard, open the MCP Config tab on your connection. Pick your client — Claude Code, Claude Desktop, Cursor, Codex, Windsurf, or ChatGPT — and copy the one-line config. For example, Claude Code:4. Authorize the client
The first tool call from your client triggers an OAuth flow — QueryBear opens a browser tab and asks you to grant the client access to your connections. Approve, and you’re done.5. Ask a question
In your AI client, try:“What QueryBear tools are available?”You should see
list_connections, get_schema, and run_query.
Then try something real:
“How many users signed up in the last 7 days?”The agent will:
- Call
get_schemato learn your tables. - Write a SQL query.
- Call
run_query, which runs the query through QueryBear’s security pipeline. - Return the result.
What’s next?
Setup guides by combination
Step-by-step guides for every database × AI client combination.
Security model
Understand exactly what the gateway protects against.