Windsurf MySQL MCP
A windsurf mysql mcp setup links the IDE agent to your database. It lets the AI agent read schemas and run SQL queries through a protocol server. On June 2, 2026, Cognition renamed Windsurf to Devin Desktop. The editor keeps the same features and still uses its Cascade agent. Many engineers still search for the old name when they set up database tools. Regardless of the name, the agent needs safe ways to query live data. How a windsurf mysql mcp workflow runs queries The Cascade agent inside
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
A windsurf mysql mcp setup links the IDE agent to your database. It lets the AI agent read schemas and run SQL queries through a protocol server.
On June 2, 2026, Cognition renamed Windsurf to Devin Desktop. The editor keeps the same features and still uses its Cascade agent. Many engineers still search for the old name when they set up database tools. Regardless of the name, the agent needs safe ways to query live data.
How a windsurf mysql mcp workflow runs queries
The Cascade agent inside the editor connects to external tools through the Model Context Protocol. Engineers set up a local or remote server that speaks this protocol. That server holds the database credentials and opens a session to MySQL. When a developer asks a question, the agent picks a tool from the server. It sends a request to list tables, check columns, or run a query.
The agent can also run terminal commands on its own with user permission. It uses a dedicated shell that loads the user shell setup. Because of this, local aliases and exported database keys are ready for the agent. Whether the agent uses the protocol server or the shell, it acts with the user role. MySQL sees a normal client session and runs every valid query it receives.
Security gaps with static database credentials and roles
Most protocol servers need a database user and a password stored in a local file. If you give that user write rights, the AI agent can alter or drop rows. Even a read-only database role leaves big security gaps during an active session. A read-only role still lets the agent pull full tables of customer data.
MySQL Access Governance: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
When the agent reads a user table, the query result returns raw values. Sensitive fields like emails, phone numbers, card numbers, and national IDs enter the prompt context. Once those values reach the editor, they also go to the model provider. Standard MySQL roles cannot rewrite single fields inside a query result on the fly. They also cannot pause a single risky query to ask a human reviewer for approval. Teams need a control layer that sits between the protocol server and the database.
What to check before connecting agents to live data
Start by separating local test databases from production systems. Never store production passwords in plain text files on developer laptops. Instead, tie every database session to a central user identity so logs show who asked what. Set up query rules that block destructive statements before they reach the database engine. Add real-time data masking that rewrites matched fields in results before the agent reads them. This keeps emails, phone numbers, card numbers, and national IDs out of model prompts. Finally, require peer approval when an engineer or an agent tries to run a write command.
Add wire guardrails and masking beside MySQL
Database grants and TLS setup decide who can reach MySQL. Even so, an open session can run broad updates or read raw personal data from allowed tables. In practice, hoop.dev sits inline in the wire protocol beside the database as a sidecar for your MySQL. On every production query an agent or engineer sends, hoop.dev decides to pass, mask, block, or escalate it for human review.
With hoop.dev MySQL support, guardrails refuse bad queries before they run or hold risky calls for approval, while data masking rewrites matched sensitive values in result rows in memory. Furthermore, hoop.dev holds SOC 2 Type II and generates evidence for GDPR, HIPAA, and PCI DSS programs. Read the docs and source on GitHub.
Frequently asked questions
Did Windsurf change its name to Devin Desktop?
Yes, Cognition announced on June 2, 2026, that Windsurf became Devin Desktop. The app keeps the same IDE features, terminal runner, and Cascade agent support.
Can the agent reach MySQL without an MCP server?
Yes, the agent can run terminal commands with user permission in a dedicated shell. Since the shell loads user settings, the agent can use local CLI tools and keys.
Why is a read-only MySQL user not enough for AI agents?
A read-only user can still read all column in the tables it can reach by default. Without data masking, raw emails, phone numbers, and card numbers flow straight into the model prompt.
Related guides
In this post