This guide walks through connecting MySQL (or MariaDB) to Windsurf using QueryBear’s managed MCP server. End result: Windsurf’s Cascade agent can query your MySQL database while it codes.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.
What you’ll need
- A QueryBear account (sign up free)
- A MySQL or MariaDB database (5.7+ / 10.x+)
- Windsurf installed
Step 1: Create a read-only MySQL user
Step 2: Add the connection to QueryBear
Dashboard → Connections → New connection → MySQL, with the credentials from Step 1.Step 3: Add QueryBear to Windsurf
Step 4: Verify
In Cascade:“What QueryBear tools do you have? List my connections.”
Try it
“In our MySQL DB, find users who signed up but never completed onboarding. Outline the queries you’d run first.”Cascade plans the query (
SELECT u.* FROM users u LEFT JOIN onboarding_events o ... WHERE o.id IS NULL), gets your go-ahead, then runs it through QueryBear.
MySQL + Windsurf gotchas
serverUrlnoturl. Top mistake — Cursor usesurl, Windsurf usesserverUrl.- Cascade multi-steps —
get_schema→run_query→ maybeget_schemaagain. Normal. - For RDS or IP-restricted MySQL, allow QueryBear’s egress IP in your security group.
- Multi-statement queries are blocked at the parser.
Related
- MySQL MCP server — MySQL-specific deep dive
- Windsurf client — Windsurf overview
- Security model — what the gateway protects against