Connect Devin Desktop (formerly Windsurf) to Your SQL Database with MCP

· AI2SQL

Short answer: add AI2SQL to Devin Desktop’s mcp_config.json with "serverUrl": "https://builder.ai2sql.io/api/chatgpt-mcp", refresh the MCP servers, and sign in with your AI2SQL account. The agent can then read your real schema and run read-only SQL on PostgreSQL, MySQL or SQL Server.

Windsurf is now Devin Desktop. Cognition renamed the editor in June 2026. Your settings and MCP servers carried over, so if you still think of it as Windsurf, this is the right guide.

What you get

AI2SQL is a hosted MCP server for SQL databases. Once it is connected, the agent in Devin Desktop stops guessing your table names: it reads the schema, writes queries that match it, and can run a SELECT to check real data while you work on the code that uses it.

Add the server

First connect your database in AI2SQL (Connections → Add database).

Then open the MCP settings in Devin Desktop, or edit the config file directly:

OSConfig file
macOS / Linux~/.config/devin/mcp_config.json
Windows%APPDATA%\devin\mcp_config.json
Older Windsurf builds~/.codeium/windsurf/mcp_config.json

Add AI2SQL under mcpServers:

{
  "mcpServers": {
    "ai2sql": {
      "serverUrl": "https://builder.ai2sql.io/api/chatgpt-mcp"
    }
  }
}

Save, then refresh the MCP servers from the MCP settings panel.

Sign in

When the server first connects, Devin Desktop opens a browser tab to sign in. Log in to AI2SQL and press Allow. The page then tells you to close the tab and go back to the editor. No token or password is written to mcp_config.json.

Try it

Ask the agent:

Describe the tables in my database and how they relate.

It calls list_connections, then describe_schema, and answers from your real schema. For a data question it writes a SELECT and runs it with run_query.

Tools the agent gets

ToolWhat it does
list_connectionsLists the databases you connected in AI2SQL
describe_schemaTables, columns and types for one connection
run_queryOne read-only SELECT / WITH, up to 1,000 rows
generate_sqlWrites SQL from a plain-English request
fix_sql, explain_sql, optimize_sql, convert_sqlRepair, explain, tune or translate a query

Safety

  • Read-only. Writes and DDL are blocked before they reach your database. More in is it safe to connect AI to a database.
  • No credentials in the editor. The agent holds a revocable sign-in token, not your connection string.
  • Logged. Every call appears in Agent activity in the AI2SQL dashboard.

Plans

Signing in, listing connections, reading schemas and a few SQL writing requests a day are free. Running queries on your own database needs Pro or Team, which start with a 7-day trial.

Other clients

The same server works from VS Code, Cursor, Gemini CLI, Claude, n8n and your own agent.

Frequently asked questions

Is Windsurf the same as Devin Desktop?

Yes. Windsurf was renamed Devin Desktop in June 2026. MCP servers you added in Windsurf carry over, and the setup in this guide works in both.

Where is the MCP config file in Devin Desktop?

On macOS and Linux it is ~/.config/devin/mcp_config.json; on Windows it is %APPDATA%\devin\mcp_config.json. Older Windsurf builds used ~/.codeium/windsurf/mcp_config.json.

Do I need an API key to connect AI2SQL to Devin Desktop?

No. Add the server URL and sign in with your AI2SQL account. Devin Desktop supports OAuth for remote MCP servers, so no key or database password goes into the config file.

Can the agent modify my database?

No. AI2SQL's run_query accepts one SELECT or WITH statement and blocks INSERT, UPDATE, DELETE and DDL before they reach the database.

Which databases work?

PostgreSQL, MySQL and SQL Server connections support live schema reads and queries.