dbatools mcp server for VS Code
io.github.dataplat/dbatools-mcp-server
MCP server for dbatools — exposes SQL Server management commands as MCP tools
client:VS Code
transport:stdio
runtime:npm
Install dbatools mcp server in VS Code
.vscode/mcp.json
{
"inputs": [
{
"type": "promptString",
"id": "dbatools-safe-mode",
"description": "DBATOOLS_SAFE_MODE",
"password": true
},
{
"type": "promptString",
"id": "max-output-rows",
"description": "MAX_OUTPUT_ROWS",
"password": true
},
{
"type": "promptString",
"id": "command-timeout-seconds",
"description": "COMMAND_TIMEOUT_SECONDS",
"password": true
},
{
"type": "promptString",
"id": "pwsh-exe",
"description": "PWSH_EXE",
"password": true
}
],
"servers": {
"dbatools-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"dbatools-mcp-server"
],
"env": {
"DBATOOLS_SAFE_MODE": "${input:dbatools-safe-mode}",
"MAX_OUTPUT_ROWS": "${input:max-output-rows}",
"COMMAND_TIMEOUT_SECONDS": "${input:command-timeout-seconds}",
"PWSH_EXE": "${input:pwsh-exe}"
}
}
}
}
VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs