Skip to content
VS Code

SQL Server MCP for VS Code

io.github.cvelasquez/mcp-sqlserver

MCP server for DBAs running dozens of SQL Server instances: grouped connections, plans, indexes

client:VS Code transport:stdio runtime:npm

Install SQL Server MCP in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "mssql-mcp-connections",
      "description": "MSSQL_MCP_CONNECTIONS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "mssql-mcp-connections-json",
      "description": "MSSQL_MCP_CONNECTIONS_JSON",
      "password": true
    }
  ],
  "servers": {
    "mcp-sqlserver": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@cevelas/mcp-sqlserver"
      ],
      "env": {
        "MSSQL_MCP_CONNECTIONS": "${input:mssql-mcp-connections}",
        "MSSQL_MCP_CONNECTIONS_JSON": "${input:mssql-mcp-connections-json}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

SQL Server MCP in other clients