dbatools-mcp-server
About
MCP server for dbatools — exposes SQL Server management commands as MCP tools
Use this server
Add it to your MCP client. The catalogue lists this config verbatim from its source — it does not run, download, or vouch for the server. Review the command before you run it.
Transportstdio (runs a local command)
Env vars
DBATOOLS_SAFE_MODE MAX_OUTPUT_ROWS COMMAND_TIMEOUT_SECONDS PWSH_EXEClaude Code
claude mcp add --env DBATOOLS_SAFE_MODE= --env MAX_OUTPUT_ROWS= --env COMMAND_TIMEOUT_SECONDS= --env PWSH_EXE= dbatools-mcp-server -- npx dbatools-mcp-server
Cursor
If the button doesn't open Cursor, use the JSON below — Cursor accepts the same mcpServers config.
VS Code
code --add-mcp '{"name":"dbatools-mcp-server","command":"npx","args":["dbatools-mcp-server"],"env":{"DBATOOLS_SAFE_MODE":"","MAX_OUTPUT_ROWS":"","COMMAND_TIMEOUT_SECONDS":"","PWSH_EXE":""}}'
JSON
{
"mcpServers": {
"dbatools-mcp-server": {
"command": "npx",
"args": [
"dbatools-mcp-server"
],
"env": {
"DBATOOLS_SAFE_MODE": "",
"MAX_OUTPUT_ROWS": "",
"COMMAND_TIMEOUT_SECONDS": "",
"PWSH_EXE": ""
}
}
}
}
Environment variables are listed by name only — fill in your own values. Entries never carry secrets.