How to Configure Windsurf MySQL MCP Server
You set up a windsurf mysql mcp server by adding the server to your agent settings. Then you give the server a database user and password to run queries. Cognition renamed Windsurf to Devin Desktop, though the IDE and features remain the same. Many teams start by giving the local server a broad database role for testing. That fast setup works at first, but shared roles let the agent read or change anything. How a windsurf mysql mcp server works in practice In the IDE, the Cascade agent connec
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.
You set up a windsurf mysql mcp server by adding the server to your agent settings. Then you give the server a database user and password to run queries. Cognition renamed Windsurf to Devin Desktop, though the IDE and features remain the same. Many teams start by giving the local server a broad database role for testing. That fast setup works at first, but shared roles let the agent read or change anything.
How a windsurf mysql mcp server works in practice
In the IDE, the Cascade agent connects to external tools through the Model Context Protocol. You list the local server process inside the local MCP settings file on your machine. When the editor starts, it launches the server process in the background. The server reads your database host, user, and password from local settings or shell variables. Note that the agent can also run terminal commands on its own with user permission. It uses a dedicated shell that loads your user profile, aliases, and shell variables. If database keys live in your shell profile, the agent can reach them there too.
Once the server runs, the agent sees database tools in its list of actions. When you ask a question about your schema, the agent picks a tool to run. It sends a request to the local MCP process over standard input and output. The MCP process turns that request into a SQL query and sends it to MySQL. MySQL checks the user role tied to that session and runs the statement. The database sends the rows back to the local server, which passes them to the agent. The agent reads those rows in its prompt context and writes code for you.
Database roles and local credential management
Most teams try to lock down this workflow by creating a dedicated MySQL user. You can grant that user read permissions on specific tables and block write commands. This step stops the agent from dropping tables or changing rows by mistake. You also store the password in a local file on each developer laptop. Every engineer on the team repeats this setup on their own machine.
Managing these local files across a whole team creates daily work for engineers. Passwords end up sitting in plain text inside shell profiles or local JSON files. When a password changes, every developer must update their local setup by hand. Worse, developers often reuse their own admin user accounts to save time during setup. If an agent runs a bad query under an admin role, nothing stops the command.
MySQL Access Governance + Kubernetes API Server Access: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native permissions solve and what stays exposed
Native MySQL roles do a good job of deciding who can log into the database. They also set firm limits on which tables a user account can read or write. If you only need to block writes across a whole schema, native roles work well.
Still, database roles only check permissions at the table or column level. They do not inspect what individual queries do in flight during an active session. A read-only user can still pull thousands of customer emails or phone numbers in one query. When the agent runs that query, raw card numbers and national IDs flow into the prompt. Also, database logs only show that the shared MCP user ran a statement. They do not tie that query back to the specific developer who approved the prompt. Teams need a way to inspect queries in flight and rewrite sensitive fields in results.
Check MySQL queries and results on the wire
MySQL grants control who logs in. They do not check single queries or mask sensitive columns once a session starts. With hoop.dev, you run an open-source proxy, a sidecar for your MySQL, inline in the MySQL wire protocol. On every query an AI agent or human runs against production MySQL, RDS, or Aurora, hoop.dev decides to pass, mask, block, or hold it for review.
Multi-statement batches and prepared queries are split and checked one by one by hoop.dev guardrails, which refuse banned queries with a native MySQL error or hold risky ones for approval. On the response path, hoop.dev data masking rewrites string values in returned rows in memory, and every decision is logged. See the MIT-licensed project on GitHub.
Frequently asked questions
Did Windsurf change its name to Devin Desktop?
Yes, Cognition announced on June 2, 2026, that Windsurf is becoming Devin Desktop. It keeps the same IDE and features, and old docs links now redirect to the new site.
Can the agent reach database keys stored in my shell profile?
Yes, the agent runs terminal commands in a dedicated shell with user permission. That shell loads your user config, so aliases and shell variables are available to the agent.
Why is a read-only MySQL user not enough for AI coding agents?
A read-only role still lets the agent read every row in permitted tables by default. Without field masking, queries can send emails, phone numbers, and card numbers straight to the model.
Related guides
In this post