How to Configure Windsurf SQL Server Credentials

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up windsurf sql server credentials by creating a database user and loading its login details into your local shell or MCP server settings. This setup lets the coding agent query tables while keeping write actions restricted. Teams often start by reusing a shared admin account to get the agent running fast. Still, broad permissions let a single bad command alter or drop production tables. How windsurf sql server credentials work in the editor In June 2026, Cognition renamed Windsurf to

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 windsurf sql server credentials by creating a database user and loading its login details into your local shell or MCP server settings. This setup lets the coding agent query tables while keeping write actions restricted. Teams often start by reusing a shared admin account to get the agent running fast. Still, broad permissions let a single bad command alter or drop production tables.

How windsurf sql server credentials work in the editor

In June 2026, Cognition renamed Windsurf to Devin Desktop while keeping the same IDE features. The built-in agent can run terminal commands on its own after you grant permission. It opens a dedicated terminal that uses zsh on macOS or bash on Linux. That terminal loads your local shell profile, so all your shell aliases and variables work. You can store database login strings as local variables for command-line tools to read. The legacy Cascade agent also talks to Model Context Protocol servers defined in local settings. Both paths need valid database accounts to reach your data.

On the database side, SQL Server supports thirteen different types of database users. A database user serves as the identity of a login inside a specific database. If the agent needs to reach many databases on one instance, teams create a login in the master database first. If the agent only needs one or two databases, a contained database user works well. A contained user has its own password and does not tie back to master. An admin must enable contained databases on the server and database before using this option.

Choosing fixed database roles for agent logins

After creating the user, you assign a fixed database role to limit what the agent can do. Every role, including the public role, holds the basic permission to connect. You cannot change the built-in permissions assigned to fixed database roles. Adding the user to the datareader role lets the agent read all data from all user tables and views. Adding the datawriter role lets the user add, delete, or change data across all user tables. You can also apply deny roles to block read or write actions on tables and views. You should avoid the database owner role for coding agents. Members of the owner role can run all maintenance tasks and even drop the entire database.

What native database roles solve and what they miss

Native SQL Server logins and fixed roles solve the basic login problem. They verify who can log in and set broad rules at the database level. Pairing a contained user with a read-only role stops the agent from deleting rows or dropping tables.

Ephemeral Credentials + Kubernetes API Server Access: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Still, static roles leave a big gap during daily work. A read-only role still lets the agent read every single user table and view in that database. It cannot inspect individual SQL statements in flight or pause a single risky query for human review. If a table holds emails, phone numbers, card numbers, or national IDs, the datareader role returns all of them. Also, putting passwords in shell profiles leaves long-lived secrets sitting on developer laptops. Native roles decide who gets through the door, not what each query does once inside.

Add runtime guardrails beside SQL Server

Role grants and network rules are needed setup for SQL Server. Still, an allowed user or agent tool can send a bad delete or read raw customer fields over a valid session. In practice, hoop.dev sits inline in the TDS protocol beside the database as a sidecar for your SQL Server. For every query an agent or human runs in production, hoop.dev decides whether to pass, mask, block, or escalate it for review.

With hoop.dev SQL Server controls, rules refuse banned statements before they run, hold risky queries for human review, and mask matched sensitive values in supported result columns in memory. Furthermore, hoop.dev holds SOC 2 Type II and generates evidence for HIPAA, PCI DSS, SOX, and GDPR audits. See the source on GitHub.

Frequently asked questions

Did Windsurf change its name to Devin Desktop?

Yes, Cognition renamed Windsurf to Devin Desktop on June 2, 2026. The editor keeps the same core features, and old docs links now redirect to the Devin Desktop pages.

Should I use a master login or a contained user for the agent?

Use a contained database user if the agent only needs one or two databases. Use a login in the master database if the agent must query many databases on the same server instance.

Why is the datareader role still risky for an AI coding agent?

Members of the datareader role can read every user table and view in the database. This means the agent can pull sensitive columns like emails, phone numbers, and card numbers without table-level limits.

The query runs. The emails stay hidden.