Windsurf is Codeium’s AI-first code editor. It supports MCP servers via its settings UI — paste in a JSON snippet and Windsurf’s Cascade agent gets access.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.
Connect
In Windsurf:Paste the QueryBear config
serverUrl, not url — easy to miss if you’re copy-pasting from a Cursor config.Verify
In Cascade, ask:“What QueryBear tools do you have?”You should see
list_connections, get_schema, and run_query.
Why QueryBear + Windsurf
Windsurf’s Cascade agent shines on long-running, multi-step tasks. The more it can see, the better its plans. QueryBear lets Cascade:- Reference real database schemas when writing or refactoring data access code.
- Verify the impact of a migration before suggesting one.
- Look up specific rows when debugging customer reports.
- Generate analytics queries on demand.
Per-database setup guides
PostgreSQL + Windsurf
Step-by-step Postgres setup, including read-only role SQL.
MySQL + Windsurf
Step-by-step MySQL setup, including read-only user SQL.
SQLite + Windsurf
Local SQLite file setup.
Tips for using QueryBear in Windsurf
- Cascade plans before it acts. For database work, ask Cascade to “outline the queries you’d run first” before letting it execute. You get a free preview of what’s about to hit your DB.
- Use the connection name in prompts. “Using the staging connection, list tables that have a
deleted_atcolumn” — saves time vs. letting Cascade enumerate. - Cascade is multi-step. Watch for it to call
get_schema→run_query→get_schema→run_query. This is normal and produces better answers than one-shot prompts. - QueryBear’s audit log captures every call. Useful for post-mortems when Cascade does something surprising.
Common workflows
- “Refactor this query to use a window function. First, run both versions against production and compare row counts.”
- “Add an index recommendation: pull the 10 slowest queries from
pg_stat_statements, then suggest indexes that would help.” - “Audit the
userstable for rows that violate the new email-uniqueness constraint we’re about to add.”
Related
- Quickstart — full QueryBear setup
- Security model — what the gateway enforces
- Cursor — the other AI-first code editor